CN105307010B - A video upload system and method for a cloud video live broadcast platform - Google Patents
A video upload system and method for a cloud video live broadcast platform Download PDFInfo
- Publication number
- CN105307010B CN105307010B CN201510781196.7A CN201510781196A CN105307010B CN 105307010 B CN105307010 B CN 105307010B CN 201510781196 A CN201510781196 A CN 201510781196A CN 105307010 B CN105307010 B CN 105307010B
- Authority
- CN
- China
- Prior art keywords
- camera
- video
- video data
- value
- msub
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/437—Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/44029—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display for generating different versions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本发明属于云视频直播平台在线直播技术领域,更具体地,涉及一种云视频直播平台的视频上传系统与方法。The invention belongs to the technical field of online live broadcasting on a cloud video live broadcast platform, and more specifically relates to a video upload system and method for a cloud video live broadcast platform.
背景技术Background technique
当需要将局域网下的多个摄像头实时视频数据上传至服务器时,往往因为从局域网到广域网上传带宽有限,导致出现向用户提供直播服务时播放不流畅的现象。When it is necessary to upload the real-time video data of multiple cameras under the LAN to the server, the upload bandwidth from the LAN to the WAN is often limited, resulting in unsmooth playback when providing live broadcast services to users.
为了进一步解决上传带宽受限的问题,目前一般仅通过降低视频质量来减少上传数据量,从而缓解上传带宽受限的压力。在本领域中,减少上传数据量的方法主要包括降低分辨率和帧率。通常情况下,图像的分辨率越高,所包含的像素就越多,图像就越清晰,但数据量也越大,所以降低分辨率将严重影响视频的清晰度;帧率也就是视频中每秒出现多少张视频图像,是决定视频流畅度的主要因素,帧率越高每秒播放的画面就越多,视频也就越流畅,但占用的数据量也越大,所以降低帧率将直接导致视频播放流畅度下降。In order to further solve the problem of limited upload bandwidth, at present, the amount of uploaded data is generally reduced only by reducing the video quality, thereby alleviating the pressure of limited upload bandwidth. In this field, methods for reducing the amount of uploaded data mainly include reducing resolution and frame rate. Generally, the higher the resolution of the image, the more pixels it contains, the clearer the image, but the larger the amount of data, so reducing the resolution will seriously affect the clarity of the video; How many video images appear per second is the main factor determining the smoothness of the video. The higher the frame rate, the more images played per second, and the smoother the video, but the larger the amount of data occupied, so reducing the frame rate will directly The fluency of video playback is reduced.
因此,现有的减少上传数据量的方法存在以下缺陷:(1)没有充分重视高品质用户体验和视频本身的价值,导致高品质用户的直播体验下降,同时也在很大程度上削弱了高价值视频的作用和影响;(2)由于没有考虑各等级用户的视频请求和视频价值,往往导致无价值或低价值视频平等享用上传带宽,使有限的当前带宽没有得到更加充分合理的利用。Therefore, the existing methods for reducing the amount of uploaded data have the following defects: (1) Not paying enough attention to the high-quality user experience and the value of the video itself, resulting in a decline in the live broadcast experience of high-quality users, and at the same time weakening the quality of high-quality videos to a large extent. The role and impact of valuable video; (2) Due to the failure to consider the video requests and video value of users at all levels, it often leads to equal sharing of upload bandwidth for worthless or low-value videos, so that the limited current bandwidth is not fully and rationally utilized.
发明内容Contents of the invention
针对现有技术的以上缺陷或改进需求,本发明提供了一种云视频直播平台视频上传系统及方法,通过设定摄像头的综合视频价值来决定摄像头视频数据上传的优先级和质量,从而能够保证当前带宽实时上传最优价值的视频。同时,尤其是针对上传的视频数据,本发明分别具体设计了综合视频价值估计方法、当前带宽分配方法、帧率及分辨率估计方法,相应能够有效解决当前带宽受限时,在保证高价值视频质量的情况下如何进行流畅的视频直播的问题,因而尤其适用于云服务平台视频在线直播的应用场合。Aiming at the above defects or improvement needs of the prior art, the present invention provides a video upload system and method for a cloud video live broadcast platform, which determines the priority and quality of camera video data upload by setting the comprehensive video value of the camera, thereby ensuring The current bandwidth uploads the video with the best value in real time. At the same time, especially for the uploaded video data, the present invention specifically designs a comprehensive video value estimation method, a current bandwidth allocation method, a frame rate and resolution estimation method, which can effectively solve the problem of high-value video when the current bandwidth is limited. The problem of how to perform smooth video live broadcast under the condition of low quality, so it is especially suitable for the application of cloud service platform video online live broadcast.
为实现上述目的,本发明提出了一种云视频直播平台的视频上传系统,所述系统包括网络硬盘刻录机、本地代理、远程服务器、客户端及至少一个摄像头,其特征在于,在该系统中:In order to achieve the above object, the present invention proposes a video upload system of a cloud video live broadcast platform, the system includes a network hard disk recorder, a local agent, a remote server, a client and at least one camera, and it is characterized in that in the system :
所述摄像头,与所述网络硬盘刻录机通过局域网相连或直接与本地代理相连,用于采集视频数据并发送至网络硬盘刻录机或本地代理;The camera is connected with the network hard disk recorder through a local area network or directly with a local agent for collecting video data and sending it to the network hard disk recorder or the local agent;
所述网络硬盘刻录机,用于管理与其连接的摄像头,并保存各摄像头采集的视频数据并发送至本地代理;The network hard disk recorder is used to manage the camera connected to it, and save the video data collected by each camera and send it to the local agent;
所述本地代理,用于通过互联网从远程服务器处获取各摄像头的综合视频价值并在本地存储,按照存储的综合视频价值依次对各摄像头Id从高到低进行排序,同时所述本地代理还用于接收所述视频数据,并为所述视频数据分配对应的摄像头Id,按摄像头Id的优先顺序及当前带宽依次对对应选取的视频数据进行上传:当视频数据数量满足当前带宽的优先上传视频数据数量时,将所述视频数据作为待上传视频数据,若视频数据数量多于当前带宽的优先上传视频数据数量时,则将多出的视频数据及对应的摄像头Id保存在本地,待带宽有剩余时再上传至远程服务器;The local agent is used to obtain the comprehensive video value of each camera from the remote server through the Internet and store it locally, and sort the camera Ids from high to low according to the stored comprehensive video value, and simultaneously the local agent also uses After receiving the video data, and assigning the corresponding camera Id to the video data, uploading the corresponding selected video data in sequence according to the priority order of the camera Id and the current bandwidth: when the amount of video data satisfies the priority of uploading the video data of the current bandwidth When the quantity, the video data is used as the video data to be uploaded, if the video data quantity is more than the priority upload video data quantity of the current bandwidth, then the extra video data and the corresponding camera Id are stored locally, until the bandwidth is left Then upload to the remote server;
所述远程服务器,与本地代理通过互联网进行连接,用于接收并保存本地代理上传的视频数据及对应的摄像头Id;还用于接收客户端发送的用户请求,根据用户请求估计的用户价值及摄像头固有价值,得到更新后的综合视频价值并将其返回至本地代理;同时用于响应客户端的用户请求,向客户端发送视频数据;The remote server is connected with the local agent through the Internet, and is used to receive and save the video data uploaded by the local agent and the corresponding camera Id; it is also used to receive the user request sent by the client, and the estimated user value and camera ID according to the user request. Intrinsic value, get the updated comprehensive video value and return it to the local agent; at the same time, it is used to respond to the user request of the client and send video data to the client;
所述客户端,与所述远程服务器通过互联网连接,用于向远程服务器发送用户请求,同时接收远程服务器发送的视频数据,供用户进行视频直播。The client is connected to the remote server through the Internet, and is used to send a user request to the remote server, and at the same time receive video data sent by the remote server for live video broadcasting by the user.
作为进一步优选的,所述本地代理从所述网络硬盘刻录机中获取视频数据及为各摄像头的视频数据分配对应的摄像头Id后,可以视频文件的形式保存,同时也可以视频文件的形式上传至远程服务器,其中,视频文件以对应的摄像头Id及时间戳命名。As further preferably, after the local agent obtains the video data from the network hard disk recorder and distributes the corresponding camera Id for the video data of each camera, it can be saved in the form of a video file, and can also be uploaded in the form of a video file to The remote server, where the video file is named after the corresponding camera Id and timestamp.
作为进一步优选的,所述远程服务器接收所述视频文件,从该视频文件的文件名中解析出摄像头Id和时间戳并将其保存到本地数据库中。As a further preference, the remote server receives the video file, parses the camera Id and time stamp from the file name of the video file and saves it in the local database.
作为进一步优选的,所述本地代理可对待上传视频数据进行转码,调整分辨率与帧率后,再上传到远程服务器。As a further preference, the local agent can transcode the video data to be uploaded, adjust the resolution and frame rate, and then upload it to the remote server.
另外,本发明还提出一种云视频直播平台的视频上传方法,其特征在于,所述方法具体包括:In addition, the present invention also proposes a method for uploading video on a cloud video live broadcast platform, wherein the method specifically includes:
(1)本地代理接收摄像头采集到的视频数据,并且为所述视频数据分配对应的摄像头Id,同时保存所述视频数据及对应的摄像头Id;(1) The local agent receives the video data collected by the camera, and distributes the corresponding camera Id for the video data, and saves the video data and the corresponding camera Id simultaneously;
(2)本地代理按照本地保存的摄像头的综合视频价值依次对摄像头Id从高到低进行排序,并按摄像头Id的优先顺序及当前带宽依次对对应选取的视频数据进行上传:当视频数据数量满足当前带宽的优先上传视频数据数量时,将所述视频数据作为待上传视频数据,若视频数据数量多于当前带宽的优先上传视频数据数量时,则将多出的视频数据及对应的摄像头Id保存在本地,待带宽有剩余时再上传至远程服务器;(2) The local agent sorts the camera IDs from high to low according to the comprehensive video value of the cameras stored locally, and uploads the corresponding selected video data in sequence according to the priority of the camera IDs and the current bandwidth: when the number of video data satisfies When the priority upload video data quantity of the current bandwidth, the video data is used as the video data to be uploaded, if the video data quantity is more than the priority upload video data quantity of the current bandwidth, then the extra video data and the corresponding camera Id are saved Locally, upload to the remote server when there is enough bandwidth;
(3)远程服务器接收本地代理上传的视频数据后,将其及对应的摄像头Id存储到本地数据库中;(3) After the remote server receives the video data uploaded by the local agent, it and the corresponding camera Id are stored in the local database;
(4)远程服务器接收客户端发送的用户请求,传输对应的视频数据;同时,根据用户请求估计的用户价值和摄像头固有价值,得到更新后的综合视频价值并将其返回至本地代理;(4) The remote server receives the user request sent by the client and transmits the corresponding video data; at the same time, according to the user value estimated by the user request and the inherent value of the camera, the updated comprehensive video value is obtained and returned to the local agent;
(5)本地代理获取到所述视频价值后,将其保存到本地供下次视频文件排序使用。(5) After the local agent obtains the value of the video, it is saved locally for the next video file sorting.
作为进一步优选的,在步骤(4)中,所述用户价值可根据摄像头是否正在为用户进行直播服务进行设定,或根据用户的会员等级进行设定。As a further preference, in step (4), the user value can be set according to whether the camera is performing live broadcast service for the user, or according to the membership level of the user.
作为进一步优选的,在步骤(4)中,所述摄像头固有价值为根据摄像头本身的重要程度为摄像头分配的初始价值,或为根据摄像头历史价值进行分配的摄像头初始价值,或为通过人机交互方式设定的摄像头固有价值。As further preferably, in step (4), the intrinsic value of the camera is the initial value assigned to the camera according to the importance of the camera itself, or the initial value of the camera assigned according to the historical value of the camera, or the initial value of the camera through human-computer interaction The intrinsic value of the camera set by the method.
作为进一步优选的,所述综合视频价值具体为:As further preferred, the comprehensive video value is specifically:
其中,Vi为摄像头i的综合视频价值,Vi 0为摄像头i固有价值,Ni为正在观看摄像头i的视频用户数,Vim为正在观看摄像头i的第m个用户的用户价值,w0和w1分别表示摄像头固有价值权重和用户价值权重,且w0+w1=1。Among them, V i is the comprehensive video value of camera i, V i 0 is the inherent value of camera i, N i is the number of video users watching camera i, V im is the user value of the mth user watching camera i, w 0 and w 1 respectively denote the intrinsic value weight of the camera and the user value weight, and w 0 +w 1 =1.
作为进一步优选的,所述按摄像头Id的优先顺序及系统带宽依次对对应选取的视频数据进行上传,具体包括:As further preferred, the video data correspondingly selected is uploaded sequentially according to the priority order of the camera Id and the system bandwidth, specifically including:
局域网内所有摄像头Id的数量为N,将N个摄像头Id按照综合视频价值从高到低排序后,根据当前带宽选取前M个摄像头Id对应的视频数据作为待上传视频数据,M≤N,则为其中第k个摄像头Id分配的带宽Bk:The number of all camera IDs in the local area network is N. After sorting the N camera IDs according to the comprehensive video value from high to low, select the video data corresponding to the first M camera IDs according to the current bandwidth as the video data to be uploaded. M≤N, then The bandwidth B k allocated for the kth camera Id:
其中Bmax为当前带宽,Vk为第k个摄像头对应的综合视频价值;若Bk<Bmin,则调整待上传视频数据对应的摄像头Id个数M=M-C;若则调整上传视频文件个数M=M+C,其中,C为经验参数,默认值为1,Bmin为系统预设的单个视频上传所需的最小带宽;Where B max is the current bandwidth, V k is the comprehensive video value corresponding to the kth camera; if B k < B min , then adjust the number of camera IDs corresponding to the video data to be uploaded M = MC; if Then adjust the number of uploaded video files M=M+C, where C is an empirical parameter with a default value of 1, and B min is the minimum bandwidth required for system preset single video uploads;
根据分配的带宽Bk对前M个摄像头Id对应的视频数据进行上传;另外,本地保存第M+1到第N个摄像头Id对应的视频数据,待带宽有剩余时再上传。Upload the video data corresponding to the first M camera Ids according to the allocated bandwidth B k ; in addition, save the video data corresponding to the M+1th to Nth camera Ids locally, and upload them when there is surplus bandwidth.
作为进一步优选的,所述本地代理可对待上传视频数据进行转码,调整分辨率与帧率后,再上传到远程服务器,具体包括:As a further preference, the local agent can transcode the video data to be uploaded, and then upload it to the remote server after adjusting the resolution and frame rate, specifically including:
首先,根据客户端用户请求的分辨率,估计对应摄像头k需要提供的视频分辨率Dz;First, according to the resolution requested by the client user, estimate the video resolution D z that needs to be provided by the corresponding camera k;
然后,通过视频压缩算法压缩后,得到单帧图像的平均数据量为Z,则视频数据的帧率其中,Bk是为第k个摄像头Id分配的带宽。Then, after being compressed by a video compression algorithm, the average data volume of a single frame image is Z, and the frame rate of the video data is Wherein, B k is the bandwidth allocated for the kth camera Id.
总体而言,通过本发明所构思的以上技术方案与现有技术相比,主要具备以下的技术优点:Generally speaking, compared with the prior art, the above technical solution conceived by the present invention mainly has the following technical advantages:
1.本发明提供的云视频直播平台的视频上传系统及对应的方法,能够实时根据用户请求估计用户价值,同时结合摄像头固有价值,得到对应的综合视频价值,在当前带宽受限的条件下,大大提高了高价值视频数据的传输效率,从而有效保证了用户视频播放的流畅度。1. The video upload system and the corresponding method of the cloud video live broadcast platform provided by the present invention can estimate the user value in real time according to the user request, and at the same time combine the inherent value of the camera to obtain the corresponding comprehensive video value. Under the current condition of limited bandwidth, It greatly improves the transmission efficiency of high-value video data, thereby effectively ensuring the smoothness of user video playback.
2.本发明尤其针对待上传视频文件对应的摄像头Id,对当前带宽进行分配,进一步使当前带宽的使用更加合理和高效。2. The present invention allocates the current bandwidth especially for the camera Id corresponding to the video file to be uploaded, so as to further make the use of the current bandwidth more reasonable and efficient.
3.同时,本发明在当前带宽合理分配的基础上,根据用户请求和当前带宽,对待上传视频数据对应的摄像头的清晰度进行估计,从而满足不同用户的视频直播需求,提升了用户体验。3. At the same time, the present invention estimates the definition of the camera corresponding to the video data to be uploaded according to the user request and the current bandwidth on the basis of the reasonable allocation of the current bandwidth, so as to meet the live video needs of different users and improve the user experience.
附图说明Description of drawings
图1是一种云视频直播平台的视频上传系统结构框架图;FIG. 1 is a structural framework diagram of a video upload system of a cloud video live broadcast platform;
图2是一种云视频直播平台的视频上传方法流程图;Fig. 2 is a flow chart of a video upload method of a cloud video live broadcast platform;
图3是一种云视频直播平台的视频上传系统用户播放流程图。Fig. 3 is a flow chart of user playback in the video upload system of the cloud video live broadcast platform.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。下面结合附图对本发明进一步说明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other. The present invention will be further described below in conjunction with the accompanying drawings.
图1为一种云视频直播平台的视频上传系统结构框架图,如图所示:Figure 1 is a structural framework diagram of a video upload system of a cloud video live broadcast platform, as shown in the figure:
摄像头1、摄像头2:局域网内的多个摄像头,与网络硬盘刻录机NVR进行连接,由NVR统一管理摄像头采集的视频数据。Camera 1 and Camera 2: Multiple cameras in the LAN are connected to the network hard disk recorder NVR, and the NVR uniformly manages the video data collected by the cameras.
摄像头3:直接与本地代理链接的摄像头。这种摄像头一般采用网络摄像机(IpCamera);Camera 3: The camera linked directly with the local proxy. This camera generally uses a network camera (IpCamera);
所述网络硬盘刻录机NVR:用于管理与其连接的摄像头,并保存各摄像头采集的视频数据并发送至本地代理;The network hard disk recorder NVR: used to manage the camera connected to it, and save the video data collected by each camera and send it to the local agent;
所述本地代理:一般由可以连接外网的主机承担。用于通过互联网从远程服务器处获取各摄像头的综合视频价值并在本地存储,按照存储的综合视频价值依次对各摄像头Id从高到低进行排序,同时所述本地代理还用于接收所述视频数据,并为所述视频数据分配对应的摄像头Id,按摄像头Id的优先顺序及当前带宽依次对对应选取的视频数据进行上传:当视频数据数量满足当前带宽的优先上传视频数据数量时,将所述视频数据作为待上传视频数据,若视频数据数量多于当前带宽的优先上传视频数据数量时,则将多出的视频数据及对应的摄像头Id保存在本地,待带宽有剩余时再上传至远程服务器;Said local proxy: usually undertaken by a host that can connect to the external network. It is used to obtain the comprehensive video value of each camera from the remote server through the Internet and store it locally, and sort the IDs of each camera from high to low according to the stored comprehensive video value, and the local agent is also used to receive the video. data, and allocate the corresponding camera Id for the video data, and upload the corresponding selected video data according to the priority order of the camera Id and the current bandwidth: when the number of video data satisfies the number of priority uploaded video data of the current bandwidth, all The above video data is used as the video data to be uploaded. If the number of video data is more than the number of priority uploaded video data in the current bandwidth, the excess video data and the corresponding camera Id will be saved locally, and uploaded to the remote when there is surplus bandwidth. server;
所述远程服务器:与本地代理通过互联网进行连接,用于接收并保存本地代理上传的视频数据及对应的摄像头Id;还用于接收客户端发送的用户请求,根据用户请求估计的用户价值及摄像头固有价值,得到更新后的综合视频价值并将其返回至本地代理;同时用于响应客户端的用户请求,向客户端发送视频数据;Described remote server: connect with local agent through Internet, be used to receive and preserve the video data that local agent uploads and corresponding camera Id; Also be used for receiving the user request that client sends, the user value and camera Id estimated according to user request Intrinsic value, get the updated comprehensive video value and return it to the local agent; at the same time, it is used to respond to the user request of the client and send video data to the client;
所述客户端:与所述远程服务器通过互联网连接,用于向远程服务器发送用户请求,同时接收远程服务器发送的视频数据,供用户进行视频直播。可以为手机移动客户端和pc客户端。The client is connected to the remote server through the Internet, and is used to send a user request to the remote server and receive video data sent by the remote server at the same time for the user to perform live video. It can be mobile client and pc client for mobile phones.
在上述系统中,所述本地代理从所述网络硬盘刻录机中获取视频数据及为各摄像头的视频数据分配对应的摄像头Id后,可以视频文件的形式保存,同时也可以视频文件的形式上传至远程服务器,其中,视频文件以对应的摄像头Id及时间戳命名。同样地,所述远程服务器接收所述视频文件,从该视频文件的文件名中解析出摄像头Id和时间戳并将其保存到本地数据库中。In the above system, after the local agent obtains the video data from the network hard disk recorder and distributes the corresponding camera Id for the video data of each camera, it can be saved in the form of a video file, and can also be uploaded in the form of a video file to The remote server, where the video file is named after the corresponding camera Id and timestamp. Similarly, the remote server receives the video file, parses the camera Id and time stamp from the file name of the video file and saves it in the local database.
所述本地代理还可对待上传视频数据进行转码,调整分辨率与帧率后,再上传到远程服务器。The local agent can also transcode the video data to be uploaded, and upload it to the remote server after adjusting the resolution and frame rate.
在该系统中,所述客户端可通过用户请求直接指定摄像头Id获取对应的视频数据进行视频播放,或间接从服务器拉取摄像头Id对应的视频数据进行视频直播,。In this system, the client can directly specify the camera Id to obtain the corresponding video data through the user request for video playback, or indirectly pull the video data corresponding to the camera Id from the server for live video broadcasting.
图2为一种云视频直播平台的视频上传方法流程图。具体步骤如下:Fig. 2 is a flowchart of a video uploading method of a cloud video live broadcast platform. Specific steps are as follows:
(1)本地代理接收摄像头采集到的视频数据,并且为所述视频数据分配对应的摄像头Id,同时保存所述视频数据及对应的摄像头Id;(1) The local agent receives the video data collected by the camera, and distributes the corresponding camera Id for the video data, and saves the video data and the corresponding camera Id simultaneously;
(2)本地代理按照本地保存的摄像头的综合视频价值依次对摄像头Id从高到低进行排序,并按摄像头Id的优先顺序及当前带宽依次对对应选取的视频数据进行上传:当视频数据数量满足当前带宽的优先上传视频数据数量时,将所述视频数据作为待上传视频数据,若视频数据数量多于当前带宽的优先上传视频数据数量时,则将多出的视频数据及对应的摄像头Id保存在本地,待带宽有剩余时再上传至远程服务器;(2) The local agent sorts the camera IDs from high to low according to the comprehensive video value of the cameras stored locally, and uploads the corresponding selected video data in sequence according to the priority of the camera IDs and the current bandwidth: when the number of video data satisfies When the priority upload video data quantity of the current bandwidth, the video data is used as the video data to be uploaded, if the video data quantity is more than the priority upload video data quantity of the current bandwidth, then the extra video data and the corresponding camera Id are saved Locally, upload to the remote server when there is enough bandwidth;
进一步优选的,所述按摄像头Id的优先顺序及系统带宽依次对对应选取的视频数据进行上传,具体包括:Further preferably, the corresponding selected video data is uploaded sequentially according to the priority order of the camera Id and the system bandwidth, specifically including:
局域网内所有摄像头Id的数量为N,将N个摄像头Id按照综合视频价值从高到低排序后,根据当前带宽选取前M个摄像头Id对应的视频数据作为待上传视频数据,M≤N,则为其中第k个摄像头Id分配的带宽Bk:The number of all camera IDs in the local area network is N. After sorting the N camera IDs according to the comprehensive video value from high to low, select the video data corresponding to the first M camera IDs according to the current bandwidth as the video data to be uploaded. M≤N, then The bandwidth B k allocated for the kth camera Id:
其中Bmax为当前带宽,Vk为第k个摄像头对应的综合视频价值;若Bk<Bmin,则调整待上传视频数据对应的摄像头Id个数M=M-C;若则调整上传视频文件个数M=M+C,其中,C为经验参数,默认值为1,Bmin为系统预设的单个视频上传所需的最小带宽;Where B max is the current bandwidth, V k is the comprehensive video value corresponding to the kth camera; if B k < B min , then adjust the number of camera IDs corresponding to the video data to be uploaded M = MC; if Then adjust the number of uploaded video files M=M+C, where C is an empirical parameter with a default value of 1, and B min is the minimum bandwidth required for system preset single video uploads;
根据分配的带宽Bk对前M个摄像头Id对应的视频数据进行上传;另外,本地保存第M+1到第N个摄像头Id对应的视频数据,待带宽有剩余时再上传。Upload the video data corresponding to the first M camera Ids according to the allocated bandwidth B k ; in addition, save the video data corresponding to the M+1th to Nth camera Ids locally, and upload them when there is surplus bandwidth.
另外,所述本地代理可对待上传视频数据进行转码,调整分辨率与帧率后,再上传到远程服务器,具体包括:In addition, the local agent can transcode the video data to be uploaded, and then upload to the remote server after adjusting the resolution and frame rate, specifically including:
首先,根据客户端用户请求的分辨率,估计对应摄像头k需要提供的视频分辨率Dz,该分辨率的估计可以采用多种策略,比如可以是所有用户中使用的最大分辨率,可以是直播用户最多的分辨率、或多个用户的平均分辨率。实际应用中,可将用户请求的分辨率化成有限种,例如,高清,标清,流畅三种。First, according to the resolution requested by the client user, estimate the video resolution D z that the corresponding camera k needs to provide. The estimation of the resolution can adopt various strategies, for example, it can be the maximum resolution used by all users, and it can be a live broadcast The resolution of the most users, or the average resolution of multiple users. In practical applications, the resolution requested by the user can be divided into limited types, for example, three types: high definition, standard definition, and smooth.
然后,通过视频压缩算法(如H264、H265)压缩后,得到单帧图像的平均数据量为Z,则视频数据的帧率其中,Bk是为第k个摄像头Id分配的带宽。Then, after being compressed by a video compression algorithm (such as H264, H265), the average data volume of a single frame image obtained is Z, and the frame rate of the video data Wherein, B k is the bandwidth allocated for the kth camera Id.
(3)远程服务器接收本地代理上传的视频数据后,将其及对应的摄像头Id存储到本地数据库中;(3) After the remote server receives the video data uploaded by the local agent, it and the corresponding camera Id are stored in the local database;
(4)远程服务器接收客户端发送的用户请求,传输对应的视频数据;同时,根据用户请求估计的用户价值和摄像头固有价值,得到更新后的综合视频价值并将其返回至本地代理;(4) The remote server receives the user request sent by the client and transmits the corresponding video data; at the same time, according to the user value estimated by the user request and the inherent value of the camera, the updated comprehensive video value is obtained and returned to the local agent;
其中,针对所述综合视频价值的更新具体包括:Among them, the update for the comprehensive video value specifically includes:
(一)摄像头固有价值的评估(1) Evaluation of the inherent value of the camera
首先,可根据摄像头本身的重要程度为摄像头分配摄像头固有价值,比如重要位置的摄像头价值高,偏僻位置的摄像头价值低;其次,当系统重启后会根据摄像头以历史价值进行判断,如果历史价值高,则该摄像头固有价值就高;另外,也可以用通过人机交互方式设定摄像头固有价值。First of all, the camera can be assigned the inherent value of the camera according to the importance of the camera itself. For example, the value of the camera in the important position is high, and the value of the camera in the remote position is low; secondly, when the system is restarted, it will be judged according to the historical value of the camera. , then the inherent value of the camera is high; in addition, the inherent value of the camera can also be set through human-computer interaction.
(二)用户价值的评估(2) Evaluation of user value
本发明是将带宽分给最有需求或最有价值的用户,因此用户价值可根据两方面进行设定:The present invention allocates the bandwidth to the most demanding or valuable users, so the user value can be set according to two aspects:
一方面,正在被直播的摄像头便是用户最需要的,因此,为正在向用户提供直播服务的摄像头分配较高的价值;On the one hand, the camera that is being broadcast live is what users need most, so assign a higher value to the camera that is providing live broadcast services to users;
另一方面,使用系统直播的用户一般具有不同的系统价值,比如会员等级制度,因此,用户价值也可以根据用户会员等级、用户信息商业价值或社会价值等设定。On the other hand, users who use the system to live broadcast generally have different system values, such as the membership level system. Therefore, user value can also be set according to user membership level, user information commercial value or social value.
(三)综合视频价值的设定(3) Setting of comprehensive video value
综合视频价值根据摄像头固有价值与用户价值进行综合判定。综合视频价值决定各摄像头进行视频上传时使用带宽的优先级和视频质量,那么,所述综合视频价值具体为:The comprehensive video value is judged comprehensively based on the inherent value of the camera and the value of the user. The comprehensive video value determines the priority and video quality of the bandwidth used by each camera when uploading video. Then, the comprehensive video value is specifically:
其中,Vi为摄像头i的综合视频价值,Vi 0为摄像头i固有价值,Ni为正在观看摄像头i的视频用户数,Vim为正在观看摄像头i的第m个用户的用户价值,w0和w1分别表示摄像头固有价值权重和用户价值权重,且w0+w1=1。Among them, V i is the comprehensive video value of camera i, V i 0 is the intrinsic value of camera i, N i is the number of video users watching camera i, V im is the user value of the mth user watching camera i, w 0 and w 1 respectively denote the intrinsic value weight of the camera and the user value weight, and w 0 +w 1 =1.
(5)本地代理获取到所述视频价值后,将其保存到本地供下次视频文件排序使用。(5) After the local agent obtains the value of the video, it is saved locally for the next video file sorting.
图3为客户端播放流程图,表示结合用户价值和摄像头固有价值,远程服务器更新综合视频价值的过程。步骤如下:Fig. 3 is a flow chart of client playback, showing the process of combining user value and camera intrinsic value, and the remote server updates the integrated video value. Proceed as follows:
(4-1)用户启动客户端;(4-1) The user starts the client;
(4-2)用户通过客户端发送的用户请求直接指定摄像头Id或间接从远程服务器拉取摄像头Id;(4-2) The user directly specifies the camera Id through the user request sent by the client or indirectly pulls the camera Id from the remote server;
(4-3)服务器接收到所述请求,并根据用户价值和摄像头固有价值重新计算综合视频价值。(4-3) The server receives the request, and recalculates the comprehensive video value according to the user value and the intrinsic value of the camera.
本发明所涉及的系统包括本地代理服务器、云服务器和客户端三部分。本地代理通过局域网与多个摄像头或者NVR相连,并负责执行视频质量调整、上传、本地数据缓存任务。云服务器负责视频存储、转发,及用户价值、摄像头视频价值、综合价值更新计算,并通过网络将视频价值返回给本地代理服务器。The system involved in the present invention includes three parts: a local proxy server, a cloud server and a client. The local agent is connected to multiple cameras or NVRs through a LAN, and is responsible for performing video quality adjustment, uploading, and local data caching tasks. The cloud server is responsible for video storage, forwarding, user value, camera video value, and comprehensive value update calculation, and returns the video value to the local proxy server through the network.
与现有技术相比,本发明通过判断综合视频价值来判断摄像头上传时使用带宽的优先级和视频质量。本发明的有益效果是不仅能够最高效的利用有限上传带宽,而且保证最有价值的摄像头得到上传带宽。Compared with the prior art, the present invention judges the priority of the bandwidth used and the video quality when the camera uploads by judging the comprehensive video value. The beneficial effect of the present invention is that not only the limited upload bandwidth can be utilized most efficiently, but also the most valuable camera can be guaranteed to obtain the upload bandwidth.
本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, All should be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510781196.7A CN105307010B (en) | 2015-11-14 | 2015-11-14 | A video upload system and method for a cloud video live broadcast platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510781196.7A CN105307010B (en) | 2015-11-14 | 2015-11-14 | A video upload system and method for a cloud video live broadcast platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105307010A CN105307010A (en) | 2016-02-03 |
CN105307010B true CN105307010B (en) | 2018-01-26 |
Family
ID=55203680
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510781196.7A Active CN105307010B (en) | 2015-11-14 | 2015-11-14 | A video upload system and method for a cloud video live broadcast platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105307010B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105898401A (en) * | 2016-04-21 | 2016-08-24 | 广州酷狗计算机科技有限公司 | Live broadcasting method and apparatus |
US11206223B2 (en) * | 2016-06-30 | 2021-12-21 | Microsoft Technology Licensing, Llc | Signal upload optimization |
GB201611454D0 (en) * | 2016-06-30 | 2016-08-17 | Pinnacle Response Ltd | A wearable device, associated system and method of use |
CN107612847B (en) * | 2016-07-12 | 2020-10-30 | 杭州萤石网络有限公司 | Bandwidth allocation method and device and video monitoring system |
CN106303553A (en) * | 2016-08-25 | 2017-01-04 | 安徽协创物联网技术有限公司 | A kind of network direct broadcasting plateform system |
CN106412645B (en) * | 2016-09-09 | 2019-09-20 | 广州酷狗计算机科技有限公司 | To the method and apparatus of multimedia server uploaded videos file |
CN107124635B (en) * | 2017-06-06 | 2021-01-22 | 北京奇艺世纪科技有限公司 | Video online method, video management system and live broadcast system |
US10389772B1 (en) * | 2018-01-31 | 2019-08-20 | Facebook, Inc. | Systems and methods for optimizing simulcast streams in group video calls |
CN108650232A (en) * | 2018-04-12 | 2018-10-12 | 上海扩博智能技术有限公司 | Unmanned plane media data real-time transmission system and method |
CN108881967A (en) * | 2018-08-01 | 2018-11-23 | 广发证券股份有限公司 | A kind of video method for uploading, device and equipment based on machine learning |
CN109151407B (en) * | 2018-11-05 | 2020-11-06 | 郑州市景安网络科技股份有限公司 | Video data acquisition system |
CN111385599B (en) * | 2018-12-28 | 2022-02-11 | 北京字节跳动网络技术有限公司 | Video processing method and device |
CN111835697B (en) * | 2019-04-23 | 2021-10-01 | 华为技术有限公司 | A kind of media stream sending method, apparatus, equipment and system |
CN110113627A (en) * | 2019-05-14 | 2019-08-09 | 广州视源电子科技股份有限公司 | Video information storage method and device, storage medium, user terminal and live broadcast mirror |
CN111417001B (en) * | 2020-04-26 | 2022-02-08 | 北京达佳互联信息技术有限公司 | Video transmission method, device, server and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001086945A2 (en) * | 2000-04-12 | 2001-11-15 | Seachange International, Inc. | Content propagation in interactive television |
CN102138344A (en) * | 2008-09-02 | 2011-07-27 | 高通股份有限公司 | Access point for improved content delivery system |
CN102238644A (en) * | 2010-04-30 | 2011-11-09 | 中兴通讯股份有限公司 | Transmission method and terminal of terminal uplink channel |
CN102378382A (en) * | 2010-08-10 | 2012-03-14 | 华为技术有限公司 | Method, equipment and system for scheduling data streams |
CN104010160A (en) * | 2013-02-25 | 2014-08-27 | 杭州海康威视系统技术有限公司 | Mainline management method of video monitoring system and device thereof |
CN104853226A (en) * | 2014-02-17 | 2015-08-19 | 华为技术有限公司 | Method, device, equipment and system for processing multimedia data |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8792432B2 (en) * | 2011-02-14 | 2014-07-29 | Broadcom Corporation | Prioritizing RACH message contents |
-
2015
- 2015-11-14 CN CN201510781196.7A patent/CN105307010B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001086945A2 (en) * | 2000-04-12 | 2001-11-15 | Seachange International, Inc. | Content propagation in interactive television |
CN102138344A (en) * | 2008-09-02 | 2011-07-27 | 高通股份有限公司 | Access point for improved content delivery system |
CN102238644A (en) * | 2010-04-30 | 2011-11-09 | 中兴通讯股份有限公司 | Transmission method and terminal of terminal uplink channel |
CN102378382A (en) * | 2010-08-10 | 2012-03-14 | 华为技术有限公司 | Method, equipment and system for scheduling data streams |
CN104010160A (en) * | 2013-02-25 | 2014-08-27 | 杭州海康威视系统技术有限公司 | Mainline management method of video monitoring system and device thereof |
CN104853226A (en) * | 2014-02-17 | 2015-08-19 | 华为技术有限公司 | Method, device, equipment and system for processing multimedia data |
Also Published As
Publication number | Publication date |
---|---|
CN105307010A (en) | 2016-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105307010B (en) | A video upload system and method for a cloud video live broadcast platform | |
US11356712B2 (en) | Minimizing stall duration tail probability in over-the-top streaming systems | |
CN104394486B (en) | A kind of video stream processing method and device based on cloud desktop | |
US20140181266A1 (en) | System, streaming media optimizer and methods for use therewith | |
US20130304934A1 (en) | Methods and systems for controlling quality of a media session | |
US20140165119A1 (en) | Offline download method, multimedia file download method and system thereof | |
US9351024B2 (en) | Managing the bandwidth of a communication session | |
CN103597844A (en) | Method and system for load balancing between video server and client | |
CN107040795A (en) | The monitoring method and device of a kind of live video | |
KR20180031547A (en) | Method and apparatus for adaptively providing multiple bit rate stream media in server | |
US10148990B2 (en) | Video streaming resource optimization | |
CN113055692A (en) | Data processing method and device | |
CN102547478A (en) | Triggered slice on-demand system and method of streaming media based on CDN (Content Distribution Network) | |
CN114466194A (en) | Video coding adjustment method and device, storage medium and electronic device | |
CN102170552A (en) | Video conference system and processing method used therein | |
CN106303553A (en) | A kind of network direct broadcasting plateform system | |
CN105763896A (en) | Multi-user dynamic self-adapting video code rate allocation system | |
CN115209189B (en) | Video stream transmission method, system, server and storage medium | |
WO2020230740A1 (en) | Control device, control method, and program | |
WO2022057362A1 (en) | Image processing method and apparatus, cloud real machine system, storage medium, and electronic device | |
US11671604B1 (en) | Content aware uniform quality for quality-defined variable bitrate encoding of videos | |
CN115633143A (en) | Self-adaptive video stream transmission system with edge-side collaborative super-resolution | |
US20240406242A1 (en) | Adaptive video quality for large-scale video conferencing | |
WO2014066975A1 (en) | Methods and systems for controlling quality of a media session | |
CN104581215A (en) | Content scheduling method and system for internet protocol television (IPTV) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |