Movatterモバイル変換


[0]ホーム

URL:


CN118803303A - A dual-link video transmission method, system, device and storage medium - Google Patents

A dual-link video transmission method, system, device and storage medium
Download PDF

Info

Publication number
CN118803303A
CN118803303ACN202411281460.6ACN202411281460ACN118803303ACN 118803303 ACN118803303 ACN 118803303ACN 202411281460 ACN202411281460 ACN 202411281460ACN 118803303 ACN118803303 ACN 118803303A
Authority
CN
China
Prior art keywords
link
video
data packet
sequence number
decoding
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202411281460.6A
Other languages
Chinese (zh)
Inventor
龚丽杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Cloud Byte Information Technology Co ltd
Original Assignee
Zhejiang Cloud Byte Information Technology Co ltd
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 Zhejiang Cloud Byte Information Technology Co ltdfiledCriticalZhejiang Cloud Byte Information Technology Co ltd
Priority to CN202411281460.6ApriorityCriticalpatent/CN118803303A/en
Publication of CN118803303ApublicationCriticalpatent/CN118803303A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种双链路视频传输方法、系统、设备和存储介质,涉及互联网技术领域,包括,通过视频服务器通过高清摄像头采集原始视频数据;对收集到的原始视频数据进行颜色空间转换和降噪处理;通过分析视频帧内像素的变化程度来评估视频内容的复杂度和视频的动作强度;根据视频内容的复杂度和视频的动作强度的评估结果,采用自适应编码技术,为不同的视频内容分配不同的编码参数;使用编码器对视频进行编码处理,生成初始视频流。根据网络状况和视频质量实时调整传输链路,提高了视频传输的流畅性和用户体验,降低了视频卡顿的风险。

The present invention discloses a dual-link video transmission method, system, device and storage medium, which relates to the field of Internet technology, including collecting original video data through a high-definition camera via a video server; performing color space conversion and noise reduction processing on the collected original video data; evaluating the complexity of video content and the action intensity of the video by analyzing the degree of change of pixels in the video frame; using adaptive coding technology to assign different coding parameters to different video contents according to the evaluation results of the complexity of the video content and the action intensity of the video; using an encoder to encode the video and generate an initial video stream. The transmission link is adjusted in real time according to the network status and video quality, which improves the fluency of video transmission and user experience and reduces the risk of video freeze.

Description

Translated fromChinese
一种双链路视频传输方法、系统、设备和存储介质A dual-link video transmission method, system, device and storage medium

技术领域Technical Field

本发明涉及互联网技术领域,特别是一种双链路视频传输方法、系统、设备和存储介质。The present invention relates to the field of Internet technology, and in particular to a dual-link video transmission method, system, device and storage medium.

背景技术Background Art

随着互联网技术的飞速发展,视频传输已成为现代社会不可或缺的一部分。视频会议、在线教育、远程医疗、直播娱乐等领域对高质量、低延时的视频传输提出了越来越高的要求。尽管双链路视频传输技术在一定程度上解决了单链路传输的局限性,但仍存在一些问题。首先,现有的双链路视频传输技术在数据包的分段、排序和管理方面往往不够精细,导致视频播放时可能出现断续现象。其次,传统的双链路技术在网络状况变化时的响应速度较慢,无法迅速适应网络环境的变化,导致视频传输质量下降。此外,现有的技术方案在处理乱序数据包时,缺乏有效的排序机制,容易造成数据包的重复或丢失,进而影响视频播放的流畅性和视频质量。With the rapid development of Internet technology, video transmission has become an indispensable part of modern society. Video conferencing, online education, telemedicine, live entertainment and other fields have put forward higher and higher requirements for high-quality, low-latency video transmission. Although dual-link video transmission technology has solved the limitations of single-link transmission to a certain extent, there are still some problems. First, the existing dual-link video transmission technology is often not sophisticated enough in the segmentation, sorting and management of data packets, which may cause intermittent video playback. Secondly, the traditional dual-link technology has a slow response speed when the network conditions change, and cannot quickly adapt to changes in the network environment, resulting in a decrease in video transmission quality. In addition, the existing technical solutions lack an effective sorting mechanism when processing out-of-order data packets, which easily causes duplication or loss of data packets, thereby affecting the smoothness and quality of video playback.

发明内容Summary of the invention

鉴于上述现有存在的问题,提出了本发明。In view of the above existing problems, the present invention is proposed.

因此,本发明提供了一种双链路视频传输方法、系统、设备和存储介质解决双链路视频传输中数据包乱序与丢包导致的视频播放不连续的问题。Therefore, the present invention provides a dual-link video transmission method, system, device and storage medium to solve the problem of discontinuous video playback caused by packet disorder and packet loss in dual-link video transmission.

为解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:

第一方面,本发明实施例提供了一种双链路视频传输方法,其包括,In a first aspect, an embodiment of the present invention provides a dual-link video transmission method, which includes:

视频服务器采集视频数据,并进行编码处理,形成初始视频流;链路备份发送器将初始视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号,通过主链路和备份链路发送数据包;链路备份接收器从两条链路接收数据包,并进行CRC校验,网络探测和链路选择模块实时监测网络状态,并根据实时网络状况和视频质量指标动态调整主要传输链路;提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包,上传有效数据包进行解码,并按照先进先出原则管理本地存储空间,使用链路冗余标识和顺序号进行排序;解码器对有效数据包进行解码处理,并在显示器上呈现视频流。The video server collects video data and encodes it to form an initial video stream; the link backup transmitter divides the initial video stream into multiple small segments, adds a link redundancy identifier and sequence number to each segment, and sends data packets through the main link and the backup link; the link backup receiver receives data packets from the two links and performs CRC check. The network detection and link selection module monitors the network status in real time and dynamically adjusts the main transmission link according to the real-time network status and video quality indicators; extracts the data packet sequence number, compares it with the sequence number of the received data packet, discards duplicate data packets, uploads valid data packets for decoding, and manages local storage space according to the first-in-first-out principle, using the link redundancy identifier and sequence number for sorting; the decoder decodes the valid data packet and presents the video stream on the display.

作为本发明所述双链路视频传输方法的一种优选方案,其中:视频服务器采集视频数据,并进行编码处理,形成初始视频流包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, the video server collects video data and performs encoding processing to form an initial video stream, including the following steps:

视频服务器通过高清摄像头采集原始视频数据;对收集到的原始视频数据进行颜色空间转换和降噪处理;通过分析视频帧内像素的变化程度来评估视频内容的复杂度和视频的动作强度;根据视频内容的复杂度和视频的动作强度的评估结果,采用自适应编码技术,为不同的视频内容分配不同的编码参数;The video server collects raw video data through a high-definition camera; performs color space conversion and noise reduction on the collected raw video data; evaluates the complexity of the video content and the intensity of the video action by analyzing the degree of change of pixels within the video frame; and uses adaptive coding technology to assign different coding parameters to different video contents based on the evaluation results of the complexity of the video content and the intensity of the video action;

使用编码器对视频进行编码处理,生成初始视频流。The video is encoded using an encoder to generate an initial video stream.

作为本发明所述双链路视频传输方法的一种优选方案,其中:链路备份发送器将初始视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号,通过主链路和备份链路发送数据包包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, the link backup transmitter divides the initial video stream into multiple small segments, and adds a link redundancy identifier and a sequence number to each segment, and sends the data packet through the main link and the backup link, including the following steps:

链路备份发送器接收来自视频服务器的视频流,并将其分成多个小片段;每个片段被赋予一个唯一的用于区分主链路和备份链路的数据包的链路冗余标识;每个片段被赋予一个用于保持片段的播放顺序递增的顺序号; 第一FPGA单元接收到视频流片段,添加链路冗余标识和顺序号并计算校验和,检测传输过程中的错误,并对其进行初步封装成数据包;第二FPGA单元接收到第一FPGA单元输出的初步封装好的数据包后,进行链路冗余备份处理;第二FPGA单元将处理好的数据包计算最终的校验和,同时通过主链路和备份链路发送数据包。The link backup transmitter receives the video stream from the video server and divides it into multiple small segments; each segment is assigned a unique link redundancy identifier for distinguishing the data packets of the main link and the backup link; each segment is assigned a sequence number for maintaining the ascending playback order of the segments; the first FPGA unit receives the video stream segment, adds the link redundancy identifier and sequence number and calculates the checksum, detects errors in the transmission process, and preliminarily encapsulates it into a data packet; after the second FPGA unit receives the preliminarily encapsulated data packet output by the first FPGA unit, it performs link redundancy backup processing; the second FPGA unit calculates the final checksum of the processed data packet, and sends the data packet through the main link and the backup link at the same time.

作为本发明所述双链路视频传输方法的一种优选方案,其中:链路备份接收器从两条链路接收数据包,并进行CRC校验,网络探测和链路选择模块实时监测网络状态,并根据实时网络状况和视频质量指标动态调整主要传输链路包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, wherein: the link backup receiver receives data packets from two links and performs CRC check, the network detection and link selection module monitors the network status in real time, and dynamically adjusts the main transmission link according to the real-time network status and video quality indicators, including the following steps:

链路备份接收器同时从主链路和备份链路接收数据包,对于每个接收到的数据包,接收器执行CRC校验,验证数据包的完整性;网络探测模块持续监控网络状态,收集关于丢包率和平均延时的关键性能指标的数据,评估网络链路的质量;视频质量监测模块实时分析包括编码码率、帧率和分辨率的视频参数;利用基于深度学习的预测模型来预测未来一段时间内的丢包率和平均延时的网络状况变化趋势;定义链路选择指数,通过综合评估当前链路的性能和预测结果,动态调整主要传输链路,表达式为:The link backup receiver receives data packets from the main link and the backup link at the same time. For each received data packet, the receiver performs a CRC check to verify the integrity of the data packet. The network detection module continuously monitors the network status, collects data on key performance indicators such as packet loss rate and average delay, and evaluates the quality of the network link. The video quality monitoring module analyzes video parameters including encoding bit rate, frame rate and resolution in real time. A prediction model based on deep learning is used to predict the network status change trend of packet loss rate and average delay in the future. The link selection index is defined to dynamically adjust the main transmission link by comprehensively evaluating the performance of the current link and the prediction results. The expression is:

;

其中,P为当前丢包率,反映网络传输中的数据包丢失情况,D为当前平均延时,表示数据包传输的时间长度,Ppred为预测的丢包率,预测模型对未来丢包情况的估计,Dpred为预测的平均延时,预测模型对未来延时情况的估计,τ为延时的影响因子,常数,影响延时在指数计算中的权重,B为编码码率,视频传输的数据量大小,F为帧率,每秒传输的视频帧数,R为分辨率,视频的清晰度;Among them, P is the current packet loss rate, reflecting the packet loss in network transmission, D is the current average delay, indicating the length of time for packet transmission, Ppred is the predicted packet loss rate, the prediction model's estimate of future packet loss, Dpred is the predicted average delay, the prediction model's estimate of future delay, τ is the delay influencing factor, constant, the weight of the delay in the index calculation, B is the encoding bit rate, the amount of data transmitted by the video, F is the frame rate, the number of video frames transmitted per second, and R is the resolution, the clarity of the video;

基于链路选择指数计算结果设定阈值,将链路选择指数与阈值进行比较,输出最优链路的选择结果。A threshold is set based on the link selection index calculation result, the link selection index is compared with the threshold, and the selection result of the optimal link is output.

作为本发明所述双链路视频传输方法的一种优选方案,其中:提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包,上传有效数据包进行解码包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, wherein: extracting the sequence number of the data packet, comparing it with the sequence number of the received data packet, discarding the duplicate data packet, and uploading the valid data packet for decoding includes the following steps:

从接收到的数据包中提取顺序号和链路冗余标识,与已接收数据包的顺序号列表进行比较,检查是否存在顺序号列表中;如果数据包的顺序号已存在于已接收数据包的顺序号列表中,则丢弃该数据包;如果数据包的顺序号不存在于已接收数据包的顺序号列表中,则标记为有效数据包,并上传至解码队列;将已经解码的有效数据包顺序号添加至已接收数据包的顺序号列表中,更新已接收数据包的顺序号列表。Extract the sequence number and link redundancy identifier from the received data packet, compare them with the sequence number list of the received data packet, and check whether they are in the sequence number list; if the sequence number of the data packet already exists in the sequence number list of the received data packet, discard the data packet; if the sequence number of the data packet does not exist in the sequence number list of the received data packet, mark it as a valid data packet and upload it to the decoding queue; add the sequence number of the decoded valid data packet to the sequence number list of the received data packet, and update the sequence number list of the received data packet.

作为本发明所述双链路视频传输方法的一种优选方案,其中:对解码后的数据包按照先进先出原则管理本地存储空间,使用链路冗余标识和顺序号进行排序包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, wherein: managing the local storage space of the decoded data packets according to the first-in-first-out principle and sorting them using the link redundancy identifier and the sequence number includes the following steps:

初始化一个解码队列,用于存储待解码的数据包;检查解码队列中包括队列中的数据包数量的当前状态;如果解码队列未满,则将有效数据包插入到解码队列中;如果解码队列已满,则从解码队列中移除最早的数据包,将有效数据包插入解码队列中,更新解码队列的状态信息;初始化一个数据包排序队列,用于存储待排序的数据包;引入数据包排序指数,使用链路冗余标识和顺序号对数据包进行排序,表达式为:Initialize a decoding queue to store the data packets to be decoded; check the current status of the decoding queue including the number of data packets in the queue; if the decoding queue is not full, insert the valid data packet into the decoding queue; if the decoding queue is full, remove the earliest data packet from the decoding queue, insert the valid data packet into the decoding queue, and update the status information of the decoding queue; initialize a data packet sorting queue to store the data packets to be sorted; introduce the data packet sorting index, and use the link redundancy identifier and sequence number to sort the data packets, the expression is:

其中,SN为数据包的顺序号,LID为数据包的链路冗余标识, SNmax为已接收数据包的最大顺序号,α为用于调整顺序号的影响程度的权重系数,β为用于调整链路冗余标识的影响程度的权重系数,γ为归一化系数;Wherein, SN is the sequence number of the data packet, LID is the link redundancy identifier of the data packet, SNmax is the maximum sequence number of the received data packet, α is the weight coefficient used to adjust the influence of the sequence number, β is the weight coefficient used to adjust the influence of the link redundancy identifier, and γ is the normalization coefficient;

根据链路冗余标识和顺序号的排序结果,更新数据包排序队列;检查数据包排序队列中的数据包是否按正确的顺序排列;如果数据包排序队列中的数据包已按正确顺序排列,则将数据包排序队列中的数据包上传至解码队列。According to the sorting results of the link redundancy identifier and the sequence number, the data packet sorting queue is updated; whether the data packets in the data packet sorting queue are arranged in the correct order is checked; if the data packets in the data packet sorting queue are arranged in the correct order, the data packets in the data packet sorting queue are uploaded to the decoding queue.

作为本发明所述双链路视频传输方法的一种优选方案,其中:解码器对有效数据包进行解码处理,并在显示器上呈现视频流包括以下步骤:As a preferred solution of the dual-link video transmission method of the present invention, the decoder decodes the valid data packet and presents the video stream on the display, including the following steps:

从解码队列中依次取出有效数据包,使用解码器对数据包进行解码处理;评估解码过程中解码速度和解码错误率指标的质量;将解码后的视频帧按照顺序重组为连续的视频流;将重组后的视频流在显示器上进行呈现。Take out valid data packets from the decoding queue in sequence, and use the decoder to decode the data packets; evaluate the quality of the decoding speed and decoding error rate indicators during the decoding process; reassemble the decoded video frames into a continuous video stream in sequence; and present the reassembled video stream on the display.

第二方面,本发明提供了一种双链路视频传输系统,包括,视频采集与编码模块:视频服务器采集视频数据,并进行编码处理,形成初始视频流;视频流分段与备份发送模块:链路备份发送器将初始视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号,通过主链路和备份链路发送数据包;链路质量监测与智能切换模块:链路备份接收器从两条链路接收数据包,并进行CRC校验,网络探测和链路选择模块实时监测网络状态,并根据实时网络状况和视频质量指标动态调整主要传输链路;数据包处理与排序模块:提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包,上传有效数据包进行解码,并按照先进先出原则管理本地存储空间,使用链路冗余标识和顺序号进行排序;视频解码与显示模块:解码器对有效数据包进行解码处理,并在显示器上呈现视频流。In a second aspect, the present invention provides a dual-link video transmission system, including a video acquisition and encoding module: a video server acquires video data and performs encoding processing to form an initial video stream; a video stream segmentation and backup sending module: a link backup transmitter divides the initial video stream into multiple small segments, adds a link redundancy identifier and a sequence number to each segment, and sends data packets through a main link and a backup link; a link quality monitoring and intelligent switching module: a link backup receiver receives data packets from two links and performs CRC check, a network detection and link selection module monitors the network status in real time, and dynamically adjusts the main transmission link according to the real-time network status and video quality indicators; a data packet processing and sorting module: extracts the data packet sequence number, compares it with the sequence number of the received data packet, discards duplicate data packets, uploads valid data packets for decoding, and manages the local storage space according to the first-in-first-out principle, and uses the link redundancy identifier and sequence number for sorting; a video decoding and display module: the decoder decodes the valid data packet and presents the video stream on the display.

第三方面,本发明实施例提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中:所述计算机程序被处理器执行时实现如本发明第一方面所述的双链路视频传输方法的任一步骤。In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the dual-link video transmission method as described in the first aspect of the present invention is implemented.

第四方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,其中:所述计算机程序被处理器执行时实现如本发明第一方面所述的双链路视频传输方法的任一步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the dual-link video transmission method as described in the first aspect of the present invention is implemented.

本发明有益效果为:通过视频服务器采集并自适应编码视频数据,实现针对不同复杂度和动作强度的视频内容高效传输。链路备份发送器对视频流分段并添加冗余标识和顺序号,确保即使在网络条件不佳时仍能准确传输。链路备份接收器进行CRC校验并实时监测网络状态,动态调整主要传输链路,增强了系统容错能力和视频传输的稳定性。数据包处理模块依据顺序号和链路冗余标识进行排序,优化了视频播放体验,提高了系统响应速度。最终,解码器高效解码有效数据包并呈现视频流,确保了视频播放的流畅性和清晰度。The beneficial effects of the present invention are as follows: by collecting and adaptively encoding video data through a video server, efficient transmission of video content with different complexities and action intensities is achieved. The link backup transmitter segments the video stream and adds redundant identifiers and sequence numbers to ensure accurate transmission even when network conditions are poor. The link backup receiver performs CRC verification and monitors the network status in real time, dynamically adjusts the main transmission link, and enhances the system's fault tolerance and the stability of video transmission. The data packet processing module sorts according to the sequence number and link redundancy identifier, optimizes the video playback experience, and improves the system response speed. Finally, the decoder efficiently decodes valid data packets and presents the video stream, ensuring the smoothness and clarity of video playback.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

图1为实施例1中双链路视频传输方法的流程图。FIG. 1 is a flow chart of a dual-link video transmission method in Embodiment 1.

图2为实施例1中数据包管理与排序流程图。FIG. 2 is a flow chart of data packet management and sorting in Example 1.

具体实施方式DETAILED DESCRIPTION

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合说明书附图对本发明的具体实施方式做详细的说明。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是本发明还可以采用其他不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本发明内涵的情况下做类似推广,因此本发明不受下面公开的具体实施例的限制。In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

其次,此处所称的“一个实施例”或“实施例”是指可包含于本发明至少一个实现方式中的特定特征、结构或特性。在本说明书中不同地方出现的“在一个实施例中”并非均指同一个实施例,也不是单独的或选择性的与其他实施例互相排斥的实施例。Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

实施例一Embodiment 1

参照图1和图2,为本发明第一个实施例,该实施例提供了一种双链路视频传输方法,包括以下步骤:1 and 2, which are the first embodiment of the present invention, the embodiment provides a dual-link video transmission method, comprising the following steps:

S1、视频服务器采集视频数据,并进行编码处理,形成初始视频流包括以下步骤:S1, the video server collects video data and performs encoding processing to form an initial video stream, including the following steps:

视频服务器通过高清摄像头采集原始视频数据;对收集到的原始视频数据进行颜色空间转换和降噪处理;通过分析视频帧内像素的变化程度来评估视频内容的复杂度和视频的动作强度;根据视频内容的复杂度和视频的动作强度的评估结果,采用自适应编码技术,为不同的视频内容分配不同的编码参数;使用编码器对视频进行编码处理,生成初始视频流。The video server collects raw video data through a high-definition camera; performs color space conversion and noise reduction on the collected raw video data; evaluates the complexity of the video content and the intensity of the video motion by analyzing the degree of change of pixels within the video frame; uses adaptive coding technology to assign different coding parameters to different video contents based on the evaluation results of the complexity of the video content and the intensity of the video motion; and uses an encoder to encode the video to generate an initial video stream.

更进一步地,将视频数据从RGB颜色空间转换到YUV颜色空间的表达式为:Furthermore, the expression for converting video data from RGB color space to YUV color space is:

;

;

;

其中,R,G,B代表红、绿、蓝三个通道的亮度值,Y是亮度分量,U和V是色度分量;Among them, R, G, B represent the brightness values of the red, green, and blue channels, Y is the brightness component, and U and V are the chrominance components;

采用双边滤波对视频帧进行降噪处理,表达式为:Bilateral filtering is used to reduce the noise of the video frame. The expression is:

;

其中,f(x,y)表示输出图像中坐标(x,y)位置的像素值,g(s,t)表示输入图像中坐标(s,t)位置的像素值,w(x−s,y−t)表示空间距离权重和灰度差异权重的权重函数,x和y代表中心像素的位x,y置,而s和t代表邻域像素的位置;Among them, f(x, y) represents the pixel value at the coordinate (x, y) position in the output image, g(s, t) represents the pixel value at the coordinate (s, t) position in the input image, w(x-s, y-t) represents the weight function of the spatial distance weight and the grayscale difference weight, x and y represent the position of the central pixel, and s and t represent the position of the neighboring pixels;

定义复杂评估函数,通过分析视频帧内像素的变化程度来评估视频内容的复杂度,表达式为:Define a complex evaluation function to evaluate the complexity of the video content by analyzing the degree of change of pixels within the video frame. The expression is:

;

其中,W和H分别是视频帧的宽度和高度,I(i,j)表示第i行第j列像素的灰度值,函数C的值域为[0,+∞),值越大,表示视频帧内的像素变化越大,视频内容越复杂;Where W and H are the width and height of the video frame respectively, I(i,j) represents the grayscale value of the pixel in the i-th row and j-th column, and the range of function C is [0,+∞). The larger the value, the greater the pixel change in the video frame and the more complex the video content.

定义动作强度评估函数,通过分析视频帧间像素的变化程度来评估视频的动作强度,表达式为:Define the action intensity evaluation function to evaluate the action intensity of the video by analyzing the degree of change of pixels between video frames. The expression is:

;

其中,Vn表示第n个宏块的运动矢量,N是宏块总数,函数M的值域为[0,+∞),值越大,表示视频中的动作强度越高;WhereVn represents the motion vector of the nth macroblock, N is the total number of macroblocks, and the value range of the function M is [0, +∞). The larger the value, the higher the intensity of the action in the video.

根据复杂度和动作强度的评估结果,采用自适应编码技术,为不同的视频内容分配不同的编码参数,设计编码参数分配函数,表达式为:According to the evaluation results of complexity and motion intensity, adaptive coding technology is used to assign different coding parameters to different video contents, and a coding parameter allocation function is designed, which is expressed as follows:

;

其中,α和β是调整复杂度和动作强度对编码参数影响程度的系数,E(C,M)表示根据实验数据拟合得到的经验函数,函数p的值域为[0,1],值越大表示编码参数越高,即压缩比越低,视频质量越高;反之,值越小表示压缩比越高,视频质量较低但传输效率更高;Among them, α and β are coefficients for adjusting the influence of complexity and motion intensity on encoding parameters. E(C, M) represents the empirical function obtained by fitting experimental data. The value range of function p is [0, 1]. The larger the value, the higher the encoding parameter, that is, the lower the compression ratio and the higher the video quality. On the contrary, the smaller the value, the higher the compression ratio, the lower the video quality but the higher the transmission efficiency.

使用编码器对视频进行编码处理,生成初始视频流。The video is encoded using an encoder to generate an initial video stream.

应说明的是,通过使用高清摄像头采集视频数据,能够获得更清晰、更细腻的画面,为后续处理提供了高质量的基础素材,从而提高了最终视频的视觉体验,经过颜色空间转换和降噪处理之后,视频的色彩更加准确,画面更加干净清晰,这有助于提高观看者的视觉舒适度,并减少后续编码过程中不必要的数据冗余,从而节省存储空间和带宽资源,通过对视频内容复杂度和动作强度的评估,可以更精确地识别哪些区域需要更高的编码质量,哪些区域可以适当降低编码质量而不会显著影响观感。这种智能的分析方法有助于提高编码效率,同时保证视频质量,通过采用自适应编码技术,可以实现对不同视频内容的高效编码,即在复杂度高的区域采用较高的编码参数,在复杂度低的区域采用较低的编码参数。这种方法不仅减少了不必要的数据传输,还确保了整体视频质量的一致性,提高了用户满意度。It should be noted that by using high-definition cameras to collect video data, clearer and more delicate images can be obtained, providing high-quality basic materials for subsequent processing, thereby improving the visual experience of the final video. After color space conversion and noise reduction processing, the color of the video is more accurate and the picture is cleaner and clearer, which helps to improve the visual comfort of viewers and reduce unnecessary data redundancy in the subsequent encoding process, thereby saving storage space and bandwidth resources. By evaluating the complexity of video content and the intensity of action, it is possible to more accurately identify which areas require higher encoding quality and which areas can appropriately reduce the encoding quality without significantly affecting the viewing experience. This intelligent analysis method helps to improve encoding efficiency while ensuring video quality. By adopting adaptive encoding technology, efficient encoding of different video content can be achieved, that is, higher encoding parameters are used in areas with high complexity and lower encoding parameters are used in areas with low complexity. This method not only reduces unnecessary data transmission, but also ensures the consistency of overall video quality and improves user satisfaction.

S2、链路备份发送器将初始视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号,通过主链路和备份链路发送数据包包括以下步骤:S2, the link backup transmitter divides the initial video stream into multiple small segments, and adds a link redundancy identifier and a sequence number to each segment. Sending data packets through the main link and the backup link includes the following steps:

链路备份发送器接收来自视频服务器的视频流,并将其分成多个小片段;片段的大小会根据网络带宽、视频分辨率、帧率以及视频内容的复杂度进行动态调整,以确保每个片段既不过大也不过小,适应网络传输的同时保证视频质量。每个片段被赋予一个唯一的用于区分主链路和备份链路的数据包的链路冗余标识;链路冗余标识是一个二进制标识符,如 0 表示主链路,1 表示备份链路;每个片段被赋予一个用于保持片段的播放顺序递增的顺序号;顺序号的初始值可以是0或1,随着片段的产生依次递增;第一FPGA单元接收到视频流片段,添加链路冗余标识和顺序号并计算校验和,检测传输过程中的错误,并对其进行初步封装成数据包;第二FPGA单元接收到第一FPGA单元输出的初步封装好的数据包后,进行链路冗余备份处理;第二FPGA单元将处理好的数据包计算最终的校验和,同时通过主链路和备份链路发送数据包。The link backup transmitter receives the video stream from the video server and divides it into multiple small segments; the size of the segment will be dynamically adjusted according to the network bandwidth, video resolution, frame rate and complexity of the video content to ensure that each segment is neither too large nor too small, adapting to network transmission while ensuring video quality. Each segment is assigned a unique link redundancy identifier for distinguishing data packets from the main link and the backup link; the link redundancy identifier is a binary identifier, such as 0 for the main link and 1 for the backup link; each segment is assigned a sequence number for maintaining the incrementing playback order of the segment; the initial value of the sequence number can be 0 or 1, and it increases in sequence as the segment is generated; the first FPGA unit receives the video stream segment, adds the link redundancy identifier and sequence number and calculates the checksum, detects errors in the transmission process, and preliminarily encapsulates it into a data packet; after the second FPGA unit receives the preliminarily encapsulated data packet output by the first FPGA unit, it performs link redundancy backup processing; the second FPGA unit calculates the final checksum for the processed data packet and sends the data packet through the main link and the backup link at the same time.

应说明的是,链路备份发送器接收来自视频服务器的视频流,并将其分成多个小片段,通过动态调整片段大小,实现了视频传输的灵活性和稳定性,提高了视频传输的效率和质量;通过为每个片段分配链路冗余标识,增强了系统的容错能力和可靠性,即使主链路发生故障也能保证视频传输的连续性;通过使用顺序号,保证了视频片段的正确排序,从而实现了视频流的流畅播放,提高了用户体验;通过计算校验和,提高了数据传输的完整性和准确性,减少了错误数据包的数量,提升了传输的可靠性;通过进一步的冗余备份处理,增强了系统的鲁棒性,即使在网络波动较大的情况下也能保证视频传输的连续性和稳定性;通过双链路发送数据包,极大地提高了系统的可用性和容错能力,即使在网络条件恶劣的情况下也能维持视频传输的连续性。It should be noted that the link backup transmitter receives the video stream from the video server and divides it into multiple small segments. By dynamically adjusting the segment size, the flexibility and stability of video transmission are achieved, and the efficiency and quality of video transmission are improved; by assigning a link redundancy identifier to each segment, the fault tolerance and reliability of the system are enhanced, and the continuity of video transmission can be guaranteed even if the main link fails; by using sequence numbers, the correct sorting of video segments is guaranteed, thereby achieving smooth playback of video streams and improving user experience; by calculating the checksum, the integrity and accuracy of data transmission are improved, the number of erroneous data packets is reduced, and the reliability of transmission is improved; through further redundant backup processing, the robustness of the system is enhanced, and the continuity and stability of video transmission can be guaranteed even in the case of large network fluctuations; sending data packets through dual links greatly improves the availability and fault tolerance of the system, and the continuity of video transmission can be maintained even in poor network conditions.

S3、链路备份接收器从两条链路接收数据包,并进行CRC校验,网络探测和链路选择模块实时监测网络状态,并根据实时网络状况和视频质量指标动态调整主要传输链路包括以下步骤:S3, the link backup receiver receives data packets from two links and performs CRC check. The network detection and link selection module monitors the network status in real time and dynamically adjusts the main transmission link according to the real-time network status and video quality indicators. The following steps are included:

链路备份接收器同时从主链路和备份链路接收数据包,对于每个接收到的数据包,接收器执行CRC校验,验证数据包的完整性;网络探测模块持续监控网络状态,收集关于丢包率和平均延时的关键性能指标的数据,评估网络链路的质量;视频质量监测模块实时分析包括编码码率、帧率和分辨率的视频参数;利用基于深度学习的预测模型来预测未来一段时间内的丢包率和平均延时的网络状况变化趋势;定义链路选择指数,通过综合评估当前链路的性能和预测结果,动态调整主要传输链路,表达式为:The link backup receiver receives data packets from the main link and the backup link at the same time. For each received data packet, the receiver performs a CRC check to verify the integrity of the data packet. The network detection module continuously monitors the network status, collects data on key performance indicators such as packet loss rate and average delay, and evaluates the quality of the network link. The video quality monitoring module analyzes video parameters including encoding bit rate, frame rate and resolution in real time. A prediction model based on deep learning is used to predict the network status change trend of packet loss rate and average delay in the future. The link selection index is defined to dynamically adjust the main transmission link by comprehensively evaluating the performance of the current link and the prediction results. The expression is:

;

其中,P为当前丢包率,反映网络传输中的数据包丢失情况,D为当前平均延时,表示数据包传输的时间长度,Ppred为预测的丢包率,预测模型对未来丢包情况的估计,Dpred为预测的平均延时,预测模型对未来延时情况的估计,τ为延时的影响因子,常数,影响延时在指数计算中的权重,B为编码码率,视频传输的数据量大小,F为帧率,每秒传输的视频帧数,R为分辨率,视频的清晰度;Among them, P is the current packet loss rate, reflecting the packet loss in network transmission, D is the current average delay, indicating the length of time for packet transmission, Ppred is the predicted packet loss rate, the prediction model's estimate of future packet loss, Dpred is the predicted average delay, the prediction model's estimate of future delay, τ is the delay influencing factor, constant, the weight of the delay in the index calculation, B is the encoding bit rate, the amount of data transmitted by the video, F is the frame rate, the number of video frames transmitted per second, and R is the resolution, the clarity of the video;

基于链路选择指数计算结果设定阈值,将链路选择指数与阈值进行比较,输出最优链路的选择结果。A threshold is set based on the link selection index calculation result, the link selection index is compared with the threshold, and the selection result of the optimal link is output.

更进一步地,如果I小于阈值T,则保持当前主链路;如果 I大于T,表明当前链路质量下降,则切换到另一条备份链路。Furthermore, if I is less than the threshold T, the current main link is maintained; if I is greater than T, indicating that the quality of the current link has deteriorated, then switch to another backup link.

应说明的是,链路备份接收器同时从主链路和备份链路接收数据包,并对每个接收到的数据包执行CRC校验,验证数据包的完整性,提高了视频传输的整体可靠性和鲁棒性,降低了因单点故障导致的视频中断风险;网络探测模块持续监控网络状态,收集关于丢包率和平均延时的关键性能指标的数据,评估网络链路的质量,增强了系统的自我调节能力,使系统能够根据网络条件的变化自动调整传输策略,从而保证视频流的流畅性和清晰度;视频质量监测模块实时分析包括编码码率、帧率和分辨率的视频参数,提高了用户满意度,减少了因视频质量问题引起的投诉和服务中断;利用基于深度学习的预测模型来预测未来一段时间内的丢包率和平均延时的网络状况变化趋势,提升了系统的前瞻性和响应效率,使系统能够在网络条件恶化之前就采取预防措施,减少视频传输中断的风险;定义链路选择指数,通过综合评估当前链路的性能和预测结果,动态调整主要传输链路,提高了视频传输的稳定性和可靠性,降低了视频延迟和卡顿的发生概率。It should be noted that the link backup receiver receives data packets from the main link and the backup link at the same time, and performs CRC check on each received data packet to verify the integrity of the data packet, thereby improving the overall reliability and robustness of video transmission and reducing the risk of video interruption caused by single point failures; the network detection module continuously monitors the network status, collects data on key performance indicators such as packet loss rate and average delay, evaluates the quality of the network link, and enhances the self-regulation ability of the system, enabling the system to automatically adjust the transmission strategy according to changes in network conditions, thereby ensuring the smoothness and clarity of the video stream; the video quality monitoring module analyzes video parameters including encoding bit rate, frame rate and resolution in real time, improves user satisfaction, and reduces complaints and service interruptions caused by video quality issues; a deep learning-based prediction model is used to predict the changing trend of network conditions such as packet loss rate and average delay in the future, which improves the system's foresight and response efficiency, enabling the system to take preventive measures before network conditions deteriorate and reduce the risk of video transmission interruption; a link selection index is defined, and the main transmission link is dynamically adjusted by comprehensively evaluating the performance of the current link and the prediction results, thereby improving the stability and reliability of video transmission and reducing the probability of video delay and freeze.

S4、提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包,上传有效数据包进行解码包括以下步骤:S4, extracting the data packet sequence number, comparing it with the sequence number of the received data packet, discarding duplicate data packets, and uploading valid data packets for decoding, including the following steps:

从接收到的数据包中提取顺序号和链路冗余标识,与已接收数据包的顺序号列表进行比较,检查是否存在顺序号列表中;如果数据包的顺序号已存在于已接收数据包的顺序号列表中,则丢弃该数据包;如果数据包的顺序号不存在于已接收数据包的顺序号列表中,则标记为有效数据包,并上传至解码队列;将已经解码的有效数据包顺序号添加至已接收数据包的顺序号列表中,更新已接收数据包的顺序号列表。Extract the sequence number and link redundancy identifier from the received data packet, compare them with the sequence number list of the received data packet, and check whether they are in the sequence number list; if the sequence number of the data packet already exists in the sequence number list of the received data packet, discard the data packet; if the sequence number of the data packet does not exist in the sequence number list of the received data packet, mark it as a valid data packet and upload it to the decoding queue; add the sequence number of the decoded valid data packet to the sequence number list of the received data packet, and update the sequence number list of the received data packet.

应说明的是,It should be noted that

S5、对解码后的数据包按照先进先出原则管理本地存储空间,使用链路冗余标识和顺序号进行排序包括以下步骤:S5, managing the local storage space of the decoded data packets according to the first-in-first-out principle, and sorting them using the link redundancy identifier and the sequence number, including the following steps:

初始化一个解码队列,用于存储待解码的数据包;检查解码队列中包括队列中的数据包数量的当前状态;如果解码队列未满,则将有效数据包插入到解码队列中;如果解码队列已满,则从解码队列中移除最早的数据包,将有效数据包插入解码队列中,更新解码队列的状态信息;初始化一个数据包排序队列,用于存储待排序的数据包;引入数据包排序指数,使用链路冗余标识和顺序号对数据包进行排序,表达式为:Initialize a decoding queue to store the data packets to be decoded; check the current status of the decoding queue including the number of data packets in the queue; if the decoding queue is not full, insert the valid data packet into the decoding queue; if the decoding queue is full, remove the earliest data packet from the decoding queue, insert the valid data packet into the decoding queue, and update the status information of the decoding queue; initialize a data packet sorting queue to store the data packets to be sorted; introduce the data packet sorting index, and use the link redundancy identifier and sequence number to sort the data packets, the expression is:

其中,SN为数据包的顺序号,用于确定数据包的相对位置,LID为数据包的链路冗余标识,用于区分数据包来自哪个链路,SNmax为已接收数据包的最大顺序号,用于确定数据包的相对位置,α为用于调整顺序号的影响程度的权重系数,β为用于调整链路冗余标识的影响程度的权重系数,γ为归一化系数;Wherein, SN is the sequence number of the data packet, which is used to determine the relative position of the data packet, LID is the link redundancy identifier of the data packet, which is used to distinguish which link the data packet comes from, SNmax is the maximum sequence number of the received data packet, which is used to determine the relative position of the data packet, α is the weight coefficient used to adjust the influence of the sequence number, β is the weight coefficient used to adjust the influence of the link redundancy identifier, and γ is the normalization coefficient;

根据链路冗余标识和顺序号的排序结果,更新数据包排序队列;检查数据包排序队列中的数据包是否按正确的顺序排列;如果数据包排序队列中的数据包已按正确顺序排列,则将数据包排序队列中的数据包上传至解码队列。According to the sorting results of the link redundancy identifier and the sequence number, the data packet sorting queue is updated; whether the data packets in the data packet sorting queue are arranged in the correct order is checked; if the data packets in the data packet sorting queue are arranged in the correct order, the data packets in the data packet sorting queue are uploaded to the decoding queue.

应说明的是,通过初始化解码队列并采用先进先出(FIFO)的原则管理本地存储空间,确保了解码队列中的数据包能够按照它们到达的顺序进行解码,避免了数据包的混乱和丢失;通过独立的数据包排序队列,简化了排序过程,使得排序更加高效有序,便于后续处理;通过引入数据包排序指数能够确保即使在网络条件不佳或数据包丢失的情况下,也能尽可能地恢复原始视频流的顺序,增强了系统的容错能力,提高了视频传输的可靠性和视频质量;通过对数据包排序队列的不断更新,确保了解码队列中的数据包按照正确的顺序进行解码,有效地处理数据包重传和顺序错乱的问题,提高了数据包排序的准确性和效率,从而确保了视频流的连续性和完整性。It should be noted that by initializing the decoding queue and managing the local storage space on the principle of first-in-first-out (FIFO), it is ensured that the data packets in the decoding queue can be decoded in the order in which they arrive, thus avoiding confusion and loss of data packets; through an independent data packet sorting queue, the sorting process is simplified, making the sorting more efficient and orderly, and facilitating subsequent processing; by introducing a data packet sorting index, it can be ensured that even in the case of poor network conditions or data packet loss, the order of the original video stream can be restored as much as possible, thereby enhancing the fault tolerance of the system and improving the reliability and quality of video transmission; by continuously updating the data packet sorting queue, it is ensured that the data packets in the decoding queue are decoded in the correct order, effectively handling the problems of data packet retransmission and disorder of order, improving the accuracy and efficiency of data packet sorting, thereby ensuring the continuity and integrity of the video stream.

S6、解码器对有效数据包进行解码处理,并在显示器上呈现视频流包括以下步骤:S6. The decoder decodes the valid data packet and presents the video stream on the display, including the following steps:

从解码队列中依次取出有效数据包,使用解码器对数据包进行解码处理;评估解码过程中解码速度和解码错误率指标的质量;将解码后的视频帧按照顺序重组为连续的视频流;将重组后的视频流在显示器上进行呈现。Take out valid data packets from the decoding queue in sequence, and use the decoder to decode the data packets; evaluate the quality of the decoding speed and decoding error rate indicators during the decoding process; reassemble the decoded video frames into a continuous video stream in sequence; and present the reassembled video stream on the display.

更进一步地,定义一个解码质量指数,量化解码过程中的整体质量,表达式为:Furthermore, a decoding quality index is defined to quantify the overall quality of the decoding process, expressed as:

其中,V为解码速度,单位为帧/秒,表示每秒解码的视频帧数,E为解码错误率,无量纲,表示解码过程中发生错误的比率,Vtarget为目标解码速度,单位为帧/秒,表示期望达到的解码速度;Wherein, V is the decoding speed, in frames per second, indicating the number of video frames decoded per second; E is the decoding error rate, dimensionless, indicating the ratio of errors occurring during the decoding process; Vtarget is the target decoding speed, in frames per second, indicating the expected decoding speed;

当IQ接近0时,表示解码质量较差;当IQ接近1时,表示解码质量较好。When IQ is close to 0, it means the decoding quality is poor; when IQ is close to 1, it means the decoding quality is good.

应说明的是,通过从解码队列中有序地取出有效数据包,并利用解码器对这些数据包进行解码处理,确保视频数据包按照接收顺序进行解码,提高了视频播放的流畅性和观看体验,减少了视频播放中的卡顿现象;通过监测解码器的工作状态,获取解码速度和解码错误率这两个关键性能指标,增强了系统的自我诊断能力,可以及时调整解码策略,减少错误发生,保证视频传输质量;根据视频帧的顺序号将解码后的视频帧重新组合成连续的视频流,保证了视频播放的连贯性和清晰度,提升了用户观看视频时的体验感;将经过解码和重组后的连续视频流发送给显示设备进行播放,实现了视频内容的高效传输和高质量播放,增强了视频通信系统的效果。It should be noted that by orderly taking out valid data packets from the decoding queue and using the decoder to decode these data packets, it is ensured that the video data packets are decoded in the order of reception, thereby improving the smoothness of video playback and viewing experience, and reducing the jamming phenomenon in video playback; by monitoring the working status of the decoder and obtaining the two key performance indicators of decoding speed and decoding error rate, the self-diagnosis capability of the system is enhanced, and the decoding strategy can be adjusted in time to reduce the occurrence of errors and ensure the quality of video transmission; the decoded video frames are recombined into a continuous video stream according to the sequence number of the video frames, thereby ensuring the continuity and clarity of video playback and improving the user's experience when watching videos; the decoded and reorganized continuous video stream is sent to the display device for playback, thereby achieving efficient transmission and high-quality playback of video content and enhancing the effect of the video communication system.

本实施例还提供一种双链路视频传输系统,包括,视频采集与编码模块:视频服务器采集视频数据,并进行编码处理,形成初始视频流;视频流分段与备份发送模块:链路备份发送器将初始视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号,通过主链路和备份链路发送数据包;链路质量监测与智能切换模块:链路备份接收器从两条链路接收数据包,并进行CRC校验,网络探测和链路选择模块实时监测网络状态,并根据实时网络状况和视频质量指标动态调整主要传输链路;数据包处理与排序模块:提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包,上传有效数据包进行解码,并按照先进先出原则管理本地存储空间,使用链路冗余标识和顺序号进行排序;视频解码与显示模块:解码器对有效数据包进行解码处理,并在显示器上呈现视频流。The present embodiment also provides a dual-link video transmission system, including a video acquisition and encoding module: a video server acquires video data and performs encoding processing to form an initial video stream; a video stream segmentation and backup sending module: a link backup transmitter divides the initial video stream into multiple small segments, adds a link redundancy identifier and a sequence number to each segment, and sends data packets through a main link and a backup link; a link quality monitoring and intelligent switching module: a link backup receiver receives data packets from two links and performs CRC verification, a network detection and link selection module monitors the network status in real time, and dynamically adjusts the main transmission link according to the real-time network status and video quality indicators; a data packet processing and sorting module: extracts the data packet sequence number, compares it with the sequence number of the received data packet, discards duplicate data packets, uploads valid data packets for decoding, manages local storage space according to the first-in-first-out principle, and uses the link redundancy identifier and sequence number for sorting; a video decoding and display module: the decoder decodes the valid data packet and presents the video stream on the display.

本实施例还提供一种计算机设备,适用于双链路视频传输方法的情况,包括:存储器和处理器;存储器用于存储计算机可执行指令,处理器用于执行计算机可执行指令,实现如上述实施例提出的双链路视频传输方法。This embodiment also provides a computer device, which is applicable to the dual-link video transmission method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the dual-link video transmission method proposed in the above embodiment.

该计算机设备可以是终端,该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

本实施例还提供一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述实施例提出的实现双链路视频传输方法;存储介质可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random AccessMemory, 简称SRAM),电可擦除可编程只读存储器(Electrically Erasable ProgrammableRead-Only Memory, 简称EEPROM),可擦除可编程只读存储器(Erasable ProgrammableRead Only Memory, 简称EPROM),可编程只读存储器(Programmable Red-Only Memory,简称PROM),只读存储器(Read-Only Memory, 简称ROM),磁存储器,快闪存储器,磁盘或光盘。This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the dual-link video transmission method proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, magnetic disk or optical disk.

综上,本发明通过视频服务器采集并自适应编码视频数据,实现针对不同复杂度和动作强度的视频内容高效传输。链路备份发送器对视频流分段并添加冗余标识和顺序号,确保即使在网络条件不佳时仍能准确传输。链路备份接收器进行CRC校验并实时监测网络状态,动态调整主要传输链路,增强了系统容错能力和视频传输的稳定性。数据包处理模块依据顺序号和链路冗余标识进行排序,优化了视频播放体验,提高了系统响应速度。最终,解码器高效解码有效数据包并呈现视频流,确保了视频播放的流畅性和清晰度。In summary, the present invention collects and adaptively encodes video data through a video server to achieve efficient transmission of video content with different complexities and action intensities. The link backup transmitter segments the video stream and adds redundant identifiers and sequence numbers to ensure accurate transmission even when network conditions are poor. The link backup receiver performs CRC verification and monitors the network status in real time, dynamically adjusts the main transmission link, and enhances the system's fault tolerance and the stability of video transmission. The data packet processing module sorts according to the sequence number and link redundancy identifier, optimizes the video playback experience, and improves the system response speed. Finally, the decoder efficiently decodes the valid data packets and presents the video stream, ensuring the smoothness and clarity of the video playback.

实施例二Embodiment 2

参照表1,为本发明第二个实施例,为进一步验证本发明的先进性,给出了双链路视频传输方法的实验仿真数据。Referring to Table 1, which is the second embodiment of the present invention, in order to further verify the advancement of the present invention, experimental simulation data of the dual-link video transmission method is provided.

首先,使用高清摄像头采集了四个不同类型的视频样本:低复杂度低动作强度(例如,静态风景)、低复杂度高动作强度(例如,快速移动的物体)、高复杂度低动作强度(例如,复杂的背景下的静止物体)、高复杂度高动作强度(例如,快速移动的物体在复杂的背景下)。First, four different types of video samples were collected using a high-definition camera: low complexity and low motion intensity (e.g., static scenery), low complexity and high motion intensity (e.g., fast-moving objects), high complexity and low motion intensity (e.g., static objects against a complex background), and high complexity and high motion intensity (e.g., fast-moving objects against a complex background).

对每个视频样本进行颜色空间转换和降噪处理,然后评估视频内容的复杂度和动作强度。根据评估结果,采用自适应编码技术为每个视频样本分配不同的编码参数,并使用编码器生成初始视频流。将每个视频流分成多个小片段,并为每个片段添加链路冗余标识和顺序号。第一FPGA单元接收到视频流片段,添加链路冗余标识和顺序号,并计算校验和。第二FPGA单元接收初步封装好的数据包,进行链路冗余备份处理,并计算最终校验和,通过主链路和备份链路发送数据包。接收器同时从主链路和备份链路接收数据包,并进行CRC校验;持续监控网络状态,收集丢包率和平均延时等关键性能指标。实时分析视频参数,包括编码码率、帧率和分辨率。利用基于深度学习的预测模型预测未来一段时间内的网络状况变化趋势。计算链路选择指数,并根据结果动态调整主要传输链路。提取数据包顺序号,与已接收数据包的顺序号比对,丢弃重复数据包。将有效数据包按照先进先出原则管理本地存储空间,并使用链路冗余标识和顺序号进行排序,解码有效数据包,并在显示器上呈现视频流,具体如表1所示:Each video sample is subjected to color space conversion and noise reduction, and then the complexity and action intensity of the video content are evaluated. Based on the evaluation results, adaptive coding technology is used to assign different coding parameters to each video sample, and an encoder is used to generate an initial video stream. Each video stream is divided into multiple small segments, and a link redundancy identifier and sequence number are added to each segment. The first FPGA unit receives the video stream segment, adds a link redundancy identifier and sequence number, and calculates the checksum. The second FPGA unit receives the preliminarily encapsulated data packet, performs link redundancy backup processing, calculates the final checksum, and sends the data packet through the main link and the backup link. The receiver receives data packets from the main link and the backup link at the same time and performs CRC check; continuously monitors the network status and collects key performance indicators such as packet loss rate and average delay. Real-time analysis of video parameters, including encoding bit rate, frame rate, and resolution. A prediction model based on deep learning is used to predict the trend of network status changes in the future. The link selection index is calculated, and the main transmission link is dynamically adjusted based on the results. The data packet sequence number is extracted, compared with the sequence number of the received data packet, and duplicate data packets are discarded. The valid data packets are managed in the local storage space according to the first-in-first-out principle, and are sorted using the link redundancy identifier and sequence number, the valid data packets are decoded, and the video stream is presented on the display, as shown in Table 1:

表1 实验记录表Table 1 Experimental record table

视频样本Video Sample复杂度Complexity动作强度Action intensity编码码率(kbps)Encoding bit rate (kbps)帧率(fps)Frame rate (fps)分辨率(px)Resolution (px)主链路丢包率(%)Main link packet loss rate (%)备份链路丢包率(%)Backup link packet loss rate (%)平均延时(ms)Average delay (ms)主链路视频质量得分Main link video quality score备份链路视频质量得分Backup link video quality score样本ASample ALowLow1024102424twenty four1920x10801920x1080220012012095959595样本BSample BLowhigh1536153630301920x10801920x1080551113013092929494样本CSample ChighLow2048204824twenty four1920x10801920x1080332212512590909292样本DSample Dhighhigh2560256030301920x10801920x1080663314014088889191

通过对表格数据进行分析,视频样本A的视频内容简单,且动作强度较低,因此主链路和备份链路的丢包率都很低,平均延时也较短,这表明在低复杂度和低动作强度的情况下,视频传输非常稳定,视频质量得分接近满分。By analyzing the data in the table, we can see that the video content of video sample A is simple and the action intensity is low. Therefore, the packet loss rate of the main link and the backup link are very low, and the average delay is also short. This shows that under low complexity and low action intensity, the video transmission is very stable and the video quality score is close to full marks.

视频样本B的视频动作强度较高,但由于编码码率的增加,主链路丢包率上升到5%,而备份链路仍然保持较低的丢包率。在这种情况下,链路选择算法能够有效切换到质量更好的备份链路,保证视频质量。The video motion intensity of video sample B is high, but due to the increase in encoding bit rate, the packet loss rate of the primary link rises to 5%, while the backup link still maintains a low packet loss rate. In this case, the link selection algorithm can effectively switch to the backup link with better quality to ensure video quality.

视频样本C的视频复杂度增加导致编码码率进一步提升,但动作强度较低,因此整体视频质量得分仍然相对较高,丢包率略有增加,但仍在可接受范围内。The increased video complexity of video sample C leads to a further increase in the encoding bitrate, but the motion intensity is low, so the overall video quality score is still relatively high, and the packet loss rate increases slightly, but is still within an acceptable range.

视频样本D在面对最高复杂度和动作强度的视频样本,编码码率最高,主链路丢包率和平均延时均有所增加,但通过链路切换策略,备份链路依然能够提供较好的视频质量得分。Video sample D has the highest encoding bit rate when facing video samples with the highest complexity and motion intensity. The packet loss rate and average delay of the main link have increased. However, through the link switching strategy, the backup link can still provide a good video quality score.

通过上述实验数据可以看出,本发明的双链路视频传输方法能够有效应对不同复杂度和动作强度的视频传输需求。特别是当视频内容复杂度和动作强度增加时,该方法通过自适应编码技术和链路冗余备份机制,能够显著提高视频传输的稳定性和视频质量,从而展现出优于传统单链路传输方案的优势。It can be seen from the above experimental data that the dual-link video transmission method of the present invention can effectively cope with the video transmission requirements of different complexity and action intensity. In particular, when the complexity of the video content and the action intensity increase, the method can significantly improve the stability and video quality of video transmission through adaptive coding technology and link redundancy backup mechanism, thereby showing advantages over traditional single-link transmission solutions.

应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围当中。It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims (10)

CN202411281460.6A2024-09-132024-09-13 A dual-link video transmission method, system, device and storage mediumPendingCN118803303A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202411281460.6ACN118803303A (en)2024-09-132024-09-13 A dual-link video transmission method, system, device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202411281460.6ACN118803303A (en)2024-09-132024-09-13 A dual-link video transmission method, system, device and storage medium

Publications (1)

Publication NumberPublication Date
CN118803303Atrue CN118803303A (en)2024-10-18

Family

ID=93020267

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202411281460.6APendingCN118803303A (en)2024-09-132024-09-13 A dual-link video transmission method, system, device and storage medium

Country Status (1)

CountryLink
CN (1)CN118803303A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119094789A (en)*2024-08-012024-12-06中国人民解放军63921部队 Multi-link composite video transmission system and transmission method
CN119172038A (en)*2024-11-212024-12-20常州数据科技有限公司 A cloud intelligence digital information network transmission system
CN119562138A (en)*2025-02-072025-03-04中央广播电视总台 A video transmission method and system based on streaming processing
CN119815461A (en)*2025-01-082025-04-11南京码讯光电技术有限公司 A wireless network high reliability transmission method based on dual link redundancy

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104040932A (en)*2012-01-172014-09-10网络洞察力知识产权公司A network communication redundancy method
CN109412756A (en)*2018-11-092019-03-01广州美凯信息技术股份有限公司A kind of double-link backup method, system and storage medium based on optical fiber 4KHDR ultra high-definition transmission of video
CN113783775A (en)*2021-03-092021-12-10北京京东尚科信息技术有限公司Data transmission method and device
CN118509042A (en)*2024-04-282024-08-16海南电力产业发展有限责任公司Dual-path redundancy backup method based on optical fiber transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104040932A (en)*2012-01-172014-09-10网络洞察力知识产权公司A network communication redundancy method
CN109412756A (en)*2018-11-092019-03-01广州美凯信息技术股份有限公司A kind of double-link backup method, system and storage medium based on optical fiber 4KHDR ultra high-definition transmission of video
CN113783775A (en)*2021-03-092021-12-10北京京东尚科信息技术有限公司Data transmission method and device
CN118509042A (en)*2024-04-282024-08-16海南电力产业发展有限责任公司Dual-path redundancy backup method based on optical fiber transmission

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119094789A (en)*2024-08-012024-12-06中国人民解放军63921部队 Multi-link composite video transmission system and transmission method
CN119094789B (en)*2024-08-012025-04-18中国人民解放军63921部队 Multi-link composite video transmission system and transmission method
CN119172038A (en)*2024-11-212024-12-20常州数据科技有限公司 A cloud intelligence digital information network transmission system
CN119815461A (en)*2025-01-082025-04-11南京码讯光电技术有限公司 A wireless network high reliability transmission method based on dual link redundancy
CN119815461B (en)*2025-01-082025-09-05南京码讯光电技术有限公司 A high-reliability transmission method for wireless networks based on dual-link redundancy
CN119562138A (en)*2025-02-072025-03-04中央广播电视总台 A video transmission method and system based on streaming processing

Similar Documents

PublicationPublication DateTitle
CN118803303A (en) A dual-link video transmission method, system, device and storage medium
US20220030244A1 (en)Content adaptation for streaming
US20210360233A1 (en)Artificial intelligence based optimal bit rate prediction for video coding
CN110446041B (en)Video encoding and decoding method, device, system and storage medium
US20170264902A1 (en)System and method for video processing based on quantization parameter
EP2482558B1 (en)Method, apparatus and system for evaluation of video transmission quality
US9609338B2 (en)Layered video encoding and decoding
US20150110168A1 (en)Video data transmission method and apparatus
CN119562138B (en) A video transmission method and system based on streaming processing
US20150296224A1 (en)Perceptually driven error correction for video transmission
US20240357138A1 (en)Human visual system adaptive video coding
WO2021092821A1 (en)Adaptively encoding video frames using content and network analysis
CN112584119B (en)Self-adaptive panoramic video transmission method and system based on reinforcement learning
CN113068001B (en) Data processing method, device, device and medium based on cascaded cameras
JP4802209B2 (en) Video quality estimation method, apparatus and program
US20180213235A1 (en)Rate control for video splicing applications
CN112866746A (en)Multi-path streaming cloud game control method, device, equipment and storage medium
CN111093083A (en)Data transmission method and device
US20120106632A1 (en)Method and apparatus for error resilient long term referencing block refresh
US20120281757A1 (en)Scene change detection for video transmission system
US20160360220A1 (en)Selective packet and data dropping to reduce delay in real-time video communication
CN116827921A (en)Audio and video processing method, device and equipment for streaming media
CN118677887A (en)Video stream transmission mode matching method, device, computer equipment and storage medium
CN111212288A (en)Video data encoding and decoding method and device, computer equipment and storage medium
CN110430427A (en)A kind of Fast video coding decision-making technique and system based on SKIP pattern-coding result

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp