CN118803310A - Data processing method, device, electronic device and storage medium - Google Patents
Data processing method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN118803310A CN118803310A CN202311090370.4A CN202311090370A CN118803310A CN 118803310 A CN118803310 A CN 118803310A CN 202311090370 A CN202311090370 A CN 202311090370A CN 118803310 A CN118803310 A CN 118803310A
- Authority
- CN
- China
- Prior art keywords
- cdn server
- data
- top box
- player
- download
- 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
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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
- H04N21/2387—Stream processing in response to a playback request from an end-user, e.g. for trick-play
-
- 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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2402—Monitoring of the downstream path of the transmission network, e.g. bandwidth available
-
- 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/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及数据处理技术领域,具体涉及一种数据处理方法、装置、电子设备及存储介质。The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and storage medium.
背景技术Background Art
随着各种技术的蓬勃发展,用户对视频服务的清晰度和流畅度要求也不断提升,目前高清视频已经成为主流,各大体育赛事和运营方也纷纷推出4K、8K清晰度的直播频道。随着分辨率和清晰度的提高,用户观看体验得到提升,与此同时传输视频内容的带宽使用量也急剧增加。为了用户能够快速流畅观看视频,各内容运营商采用了内容分发网络(Content Delivery Network,CDN)技术来对视频内容进行快速分发。CDN绝大多数时间都可以给用户提供足够支持播放的下载速度,但是处于网络高峰期或一些偶发时段,部分CDN服务器负载过高,或者所在链路上的网络设备负载过高,此时从这些CDN服务器进行下载的速度并不理想,有时并不能满足正常的视频播放需求,当没有新视频内容可以播放时就会造成卡顿。With the vigorous development of various technologies, users' requirements for the clarity and fluency of video services are constantly increasing. At present, high-definition video has become the mainstream, and major sports events and operators have also launched 4K and 8K live broadcast channels. With the improvement of resolution and clarity, the user's viewing experience is improved, and at the same time, the bandwidth usage for transmitting video content has also increased dramatically. In order for users to watch videos quickly and smoothly, various content operators have adopted content delivery network (CDN) technology to quickly distribute video content. Most of the time, CDN can provide users with sufficient download speed to support playback, but during network peak hours or some occasional periods, some CDN servers are overloaded, or the network equipment on the link is overloaded. At this time, the download speed from these CDN servers is not ideal, and sometimes it cannot meet the normal video playback requirements. When there is no new video content to play, it will cause jamming.
目前机顶盒中普遍是利用安卓系统内置原生播放器进行播放,客户端把播放地址传递给原生播放器进行下载播放。原生播放器仅仅实现从指定播放地址进行下载播放,有些下载数据和具有业务无关,所以当下载文件时被调度到的CDN服务器容易因为负载过高,出现拥塞或者其他原因下载速度变慢。Currently, set-top boxes generally use the native player built into the Android system for playback. The client passes the playback address to the native player for downloading and playback. The native player only downloads and plays from the specified playback address. Some downloaded data is irrelevant to the business, so when downloading files, the CDN server dispatched to the server is prone to slow download speeds due to overload, congestion or other reasons.
综上可知,现有技术方案的播放数据下载效率低。From the above, it can be seen that the downloading efficiency of playback data in the existing technical solution is low.
发明内容Summary of the invention
本申请实施例提供一种数据处理方法、装置、电子设备及存储介质,用以解决现有方案的播放数据下载效率低的技术问题。The embodiments of the present application provide a data processing method, device, electronic device and storage medium to solve the technical problem of low efficiency of downloading playback data in the existing solution.
第一方面,本申请实施例提供一种数据处理方法,应用于下载代理端,包括:In a first aspect, an embodiment of the present application provides a data processing method, which is applied to a download agent, comprising:
向内容分发网络CDN调度中心发送机顶盒ID;其中,所述CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于所述机顶盒ID,将所述播放请求以及所述目标CDN服务器的标识信息发送至所述下载代理端;Sending a set-top box ID to a content delivery network CDN dispatch center; wherein the CDN dispatch center determines a target CDN server based on a play request sent by the player, and based on the set-top box ID, sends the play request and identification information of the target CDN server to the download agent;
响应所述CDN调度中心发送的所述播放请求,基于所述标识信息从所述目标CDN服务器中下载播放数据,并将所述播放数据发送至所述播放器。In response to the play request sent by the CDN scheduling center, the play data is downloaded from the target CDN server based on the identification information, and the play data is sent to the player.
在一个实施例中,所述基于所述标识信息从所述目标CDN服务器中下载播放数据之后,还包括:In one embodiment, after downloading the playback data from the target CDN server based on the identification information, the method further includes:
基于所述播放数据的播放时长和传输流文件大小,确定所述播放数据的视频码率;Determining a video bit rate of the playback data based on a playback duration of the playback data and a transport stream file size;
基于所述播放数据的下载数据量和下载时间,确定所述播放数据的平均下载速度;Determining an average download speed of the playback data based on a download data volume and a download time of the playback data;
当所述平均下载速度小于所述视频码率时,确定所述播放数据的下载卡顿。When the average download speed is less than the video bit rate, it is determined that the download of the playback data is stalled.
在一个实施例中,所述确定所述播放数据的下载卡顿之后,还包括:In one embodiment, after determining that the download of the playback data is stuck, the method further includes:
停止从所述目标CDN服务器中下载所述播放数据,并向所述CDN调度中心发送变更请求;其中,所述CDN调度中心基于所述变更请求确定备用CDN服务器,并将所述备用CDN服务器的标识信息发送至所述下载代理端;Stop downloading the playback data from the target CDN server, and send a change request to the CDN scheduling center; wherein the CDN scheduling center determines a backup CDN server based on the change request, and sends identification information of the backup CDN server to the download agent;
基于所述CDN调度中心发送的所述备用CDN服务器的标识信息,从所述备用CDN服务器中下载剩余的播放数据,并将所述剩余的播放数据发送至所述播放器。Based on the identification information of the standby CDN server sent by the CDN scheduling center, the remaining playback data is downloaded from the standby CDN server, and the remaining playback data is sent to the player.
第二方面,本申请实施例提供一种数据处理方法,应用于CDN调度中心,包括:In a second aspect, an embodiment of the present application provides a data processing method, which is applied to a CDN scheduling center, including:
接收下载代理端发送的机顶盒ID;Receive the set-top box ID sent by the download agent;
基于播放器发送的播放请求确定目标CDN服务器;Determine a target CDN server based on a playback request sent by the player;
基于所述机顶盒ID,确定所述机顶盒ID对应的所述下载代理端处于在线状态;Based on the set-top box ID, determining that the download agent corresponding to the set-top box ID is in an online state;
将所述播放请求以及所述目标CDN服务器的标识信息发送至所述下载代理端;其中,所述下载代理端响应所述CDN调度中心发送的所述播放请求,基于所述标识信息从所述目标CDN服务器中下载播放数据,并将所述播放数据发送至所述播放器。The playback request and the identification information of the target CDN server are sent to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
在一个实施例中,所述接收下载代理端发送的机顶盒ID之后,还包括:In one embodiment, after receiving the set-top box ID sent by the download agent, the method further includes:
基于所述机顶盒ID,确定所述机顶盒ID对应的所述下载代理端处于离线状态;Based on the set-top box ID, determining that the download agent corresponding to the set-top box ID is in an offline state;
将所述目标CDN服务器的标识信息发送至所述播放器;所述播放器基于所述目标CDN服务器的标识信息从所述目标CDN服务器中下载所述播放数据。The identification information of the target CDN server is sent to the player; and the player downloads the playback data from the target CDN server based on the identification information of the target CDN server.
在一个实施例中,所述基于播放器发送的播放请求确定目标CDN服务器,包括:In one embodiment, determining the target CDN server based on the playback request sent by the player includes:
基于所述播放请求,确定播放器ID;Based on the play request, determine a player ID;
基于所述播放器ID,获取所述播放器与各CDN服务器的距离;Based on the player ID, obtaining the distance between the player and each CDN server;
将所述距离小于设定值的CDN服务器作为所述目标CDN服务器。The CDN server whose distance is less than the set value is used as the target CDN server.
在一个实施例中,所述基于所述机顶盒ID,确定所述机顶盒ID对应的所述下载代理端处于离线状态,包括:In one embodiment, determining, based on the set-top box ID, that the download agent corresponding to the set-top box ID is in an offline state includes:
接收所述机顶盒ID对应的下载代理端发送的心跳消息;Receive a heartbeat message sent by the download agent corresponding to the set-top box ID;
若所述心跳消息出现异常,则确定所述机顶盒ID对应的所述下载代理端处于离线状态。If the heartbeat message is abnormal, it is determined that the download agent corresponding to the set-top box ID is in an offline state.
第三方面,本申请实施例提供一种数据处理装置,所述数据处理装置包括发送模块和第一下载模块,其中:In a third aspect, an embodiment of the present application provides a data processing device, the data processing device comprising a sending module and a first downloading module, wherein:
所述发送模块,用于向内容分发网络CDN调度中心发送机顶盒ID;其中,所述CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于所述机顶盒ID,将所述播放请求以及所述目标CDN服务器的标识信息发送至所述下载代理端;The sending module is used to send the set-top box ID to the content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the play request sent by the player, and based on the set-top box ID, sends the play request and the identification information of the target CDN server to the download agent;
所述第一下载模块,用于响应所述CDN调度中心发送的所述播放请求,基于所述标识信息从所述目标CDN服务器中下载播放数据,并将所述播放数据发送至所述播放器;The first downloading module is used to respond to the playback request sent by the CDN scheduling center, download the playback data from the target CDN server based on the identification information, and send the playback data to the player;
或者,所述数据处理装置包括接收模块、第一确定模块、第二确定模块和第二下载模块,其中:Alternatively, the data processing device includes a receiving module, a first determining module, a second determining module, and a second downloading module, wherein:
所述接收模块,用于接收下载代理端发送的机顶盒ID;The receiving module is used to receive the set-top box ID sent by the download agent;
所述第一确定模块,用于基于播放器发送的播放请求确定目标CDN服务器;The first determination module is used to determine the target CDN server based on the playback request sent by the player;
所述第二确定模块,用于基于所述机顶盒ID,确定所述机顶盒ID对应的所述下载代理端处于在线状态;The second determining module is used to determine, based on the set-top box ID, that the download agent corresponding to the set-top box ID is in an online state;
所述第二下载模块,用于将所述播放请求以及所述目标CDN服务器的标识信息发送至所述下载代理端;其中,所述下载代理端响应所述CDN调度中心发送的所述播放请求,基于所述标识信息从所述目标CDN服务器中下载播放数据,并将所述播放数据发送至所述播放器。The second download module is used to send the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
第四方面,本申请实施例提供一种电子设备,包括处理器和存储有计算机程序的存储器,所述处理器执行所述程序时实现第一方面或第二方面所述的数据处理方法的步骤。In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the data processing method described in the first aspect or the second aspect when executing the program.
第五方面,本申请实施例提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现第一方面或第二方面所述的数据处理方法的步骤。In a fifth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data processing method described in the first aspect or the second aspect.
本申请实施例提供的数据处理方法、装置、电子设备及存储介质,通过向内容分发网络CDN调度中心发送机顶盒ID;其中,所述CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于所述机顶盒ID,将所述播放请求以及所述目标CDN服务器的标识信息发送至所述下载代理端;响应所述CDN调度中心发送的所述播放请求,基于所述标识信息从所述目标CDN服务器中下载播放数据,并将所述播放数据发送至所述播放器。本申请实施例通过确定目标CDN服务器,通过下载代理端从目标CDN服务器下载播放数据,提高了播放数据的下载效率。The data processing method, device, electronic device and storage medium provided in the embodiment of the present application send a set-top box ID to a content distribution network CDN dispatch center; wherein the CDN dispatch center determines a target CDN server based on a playback request sent by a player, and sends the playback request and identification information of the target CDN server to the download agent based on the set-top box ID; in response to the playback request sent by the CDN dispatch center, downloads playback data from the target CDN server based on the identification information, and sends the playback data to the player. The embodiment of the present application improves the download efficiency of playback data by determining a target CDN server and downloading playback data from the target CDN server through a download agent.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请实施例提供的数据处理方法的流程示意图之一;FIG1 is a schematic diagram of a data processing method according to an embodiment of the present invention;
图2是本申请实施例提供的数据处理方法的流程示意图之二;FIG2 is a second flow chart of a data processing method provided in an embodiment of the present application;
图3是本申请实施例提供的数据处理方法的流程示意图之三;FIG3 is a third flow chart of the data processing method provided in the embodiment of the present application;
图4是本申请实施例提供的数据处理装置的结构示意图之一;FIG4 is a schematic diagram of a data processing device according to an embodiment of the present application;
图5是本申请实施例提供的数据处理装置的结构示意图之二;FIG5 is a second structural diagram of a data processing device provided in an embodiment of the present application;
图6是本申请实施例提供的电子设备的结构示意图。FIG. 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
图1是本申请实施例提供的数据处理方法的流程示意图之一。参照图1,本申请实施例提供一种数据处理方法,应用于下载代理端,包括:FIG1 is a flow chart of a data processing method provided in an embodiment of the present application. Referring to FIG1 , an embodiment of the present application provides a data processing method, which is applied to a download agent, and includes:
S100,向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;S100, sending a set-top box ID to a content delivery network CDN scheduling center; wherein the CDN scheduling center determines a target CDN server based on a play request sent by a player, and sends the play request and identification information of the target CDN server to a download agent based on the set-top box ID;
本申请实施例的执行主体是下载代理端(AGENT),下载代理端是运行在机顶盒的独立服务软件,由机顶盒运营商进行部署下发,作为HTTP下载代理接受播放器的播放请求,从CDN服务器下载网络文件并推送给播放器。The executor of the embodiment of the present application is a download agent (AGENT), which is an independent service software running on a set-top box. It is deployed and distributed by the set-top box operator and acts as an HTTP download agent to accept playback requests from the player, download network files from the CDN server and push them to the player.
CDN调度中心是一个用于管理和调度CDN节点的集中控制系统。CDN调度中心的主要功能是根据各种因素,如用户地理位置、网络拓扑、服务器负载等,决定从哪个CDN节点下载播放数据,并实时监控和优化网络性能。The CDN dispatch center is a centralized control system for managing and dispatching CDN nodes. The main function of the CDN dispatch center is to decide which CDN node to download the playback data from based on various factors, such as user geographic location, network topology, server load, etc., and to monitor and optimize network performance in real time.
机顶盒标识(Identification,ID)是指用于唯一标识一个机顶盒设备的标识符。每个机顶盒在生产过程中会被赋予一个独特的ID,用于区分不同的设备。机顶盒ID通常是一个数字或字符串。Set-top box identification (ID) refers to an identifier used to uniquely identify a set-top box device. Each set-top box is given a unique ID during the production process to distinguish different devices. The set-top box ID is usually a number or a string.
播放器是用于播放多媒体内容的设备或软件。它可以读取并解码音频、视频、图像等多种格式的文件,并将其转换为可供人们观看、听取或浏览的形式。A player is a device or software used to play multimedia content. It can read and decode files in various formats such as audio, video, and images, and convert them into a form that people can watch, listen to, or browse.
CDN服务器是用于提供高效的内容传输和分发的服务器。CDN服务器通过将内容缓存到离用户更近的边缘节点上,从而加速内容的传输和访问。目标CDN服务器是确定的将要下载播放数据的CDN服务器。CDN servers are servers used to provide efficient content transmission and distribution. CDN servers accelerate content transmission and access by caching content on edge nodes closer to users. The target CDN server is the CDN server that is determined to download and play data.
播放请求是播放器向CDN调度中心请求下载播放数据的请求指令。A playback request is a request instruction from a player to a CDN dispatch center to download playback data.
在机顶盒中安装AGENT,当AGENT开机启动时,AGENT监听本地机顶盒ID,并将机顶盒ID上报给CDN调度中心。CDN调度中心收到机顶盒ID后,查找与该机顶盒ID对应的AGENT是否在线。An agent is installed in the set-top box. When the agent is turned on, it monitors the local set-top box ID and reports the set-top box ID to the CDN dispatch center. After receiving the set-top box ID, the CDN dispatch center checks whether the agent corresponding to the set-top box ID is online.
播放器根据用户选择的播放地址(或节目地址)生成播放请求,并向CDN调度中心发送播放请求,请求下载相应的播放数据。播放请求中还携带有播放器ID。CDN调度中心收到播放请求后,获取播放器ID,进而得到下载用户的网络位置,根据下载用户的网络位置,确定与下载用户的网络位置邻近的CDN服务器作为目标CDN服务器来进行播放数据的下载。The player generates a play request based on the play address (or program address) selected by the user, and sends the play request to the CDN dispatch center, requesting to download the corresponding play data. The play request also carries the player ID. After receiving the play request, the CDN dispatch center obtains the player ID and then obtains the network location of the downloading user. Based on the network location of the downloading user, the CDN server adjacent to the network location of the downloading user is determined as the target CDN server to download the play data.
CDN调度中心确定与该机顶盒对应的AGENT在线后,将目标CDN服务器的标识信息发送至AGENT,并通过HTTP协议302指令,将播放请求调度到机顶盒上的AGENT。After the CDN dispatch center determines that the AGENT corresponding to the set-top box is online, it sends the identification information of the target CDN server to the AGENT, and dispatches the play request to the AGENT on the set-top box through the HTTP protocol 302 instruction.
S200,响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。S200, responding to the play request sent by the CDN scheduling center, downloading the play data from the target CDN server based on the identification information, and sending the play data to the player.
AGENT收到播放请求以及目标CDN服务器的标识信息后,根据标识信息确定目标CDN服务器;根据播放请求中的播放地址,从目标CDN服务器下载播放数据,其中播放数据包括音频、视频等数据。AGENT将下载的播放数据发送给播放器,播放器基于播放数据进行流畅播放。After receiving the playback request and the identification information of the target CDN server, the AGENT determines the target CDN server according to the identification information; according to the playback address in the playback request, the AGENT downloads the playback data from the target CDN server, where the playback data includes audio, video and other data. The AGENT sends the downloaded playback data to the player, and the player plays smoothly based on the playback data.
本申请实施例提供的数据处理方法,通过向CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。本申请实施例通过确定目标CDN服务器,通过下载代理端从目标CDN服务器下载播放数据,提高了播放数据的下载效率。The data processing method provided in the embodiment of the present application sends a set-top box ID to a CDN dispatch center; wherein the CDN dispatch center determines a target CDN server based on a playback request sent by a player, and sends the playback request and identification information of the target CDN server to a download agent based on the set-top box ID; in response to the playback request sent by the CDN dispatch center, the playback data is downloaded from the target CDN server based on the identification information, and the playback data is sent to the player. The embodiment of the present application improves the download efficiency of playback data by determining a target CDN server and downloading playback data from the target CDN server through a download agent.
基于上述实施例,基于标识信息从目标CDN服务器中下载播放数据之后,还包括:Based on the above embodiment, after downloading the playback data from the target CDN server based on the identification information, the method further includes:
S210,基于播放数据的播放时长和传输流文件大小,确定播放数据的视频码率;S210, determining a video bit rate of the playback data based on the playback duration of the playback data and the transport stream file size;
S220,基于播放数据的下载数据量和下载时间,确定播放数据的平均下载速度;S220, determining an average download speed of the playback data based on the download data volume and download time of the playback data;
S230,当平均下载速度小于视频码率时,确定播放数据的下载卡顿。S230: When the average download speed is lower than the video bit rate, it is determined that the download of the playback data is stalled.
本申请实施例的播放数据为视频,包括直播视频、录播视频等。The playback data in the embodiment of the present application is video, including live video, recorded video, etc.
下载代理端根据下载到的直播索引文件(M3U8文件),获取直播索引文件中记载的视频的播放时长和传输流(Transport Stream,TS)文件的大小。根据播放时长和传输流文件大小计算出视频的视频码率。The download agent obtains the video playback time and the size of the transport stream (TS) file recorded in the live broadcast index file (M3U8 file) according to the downloaded live broadcast index file, and calculates the video bit rate of the video according to the playback time and the transport stream file size.
下载代理端根据该视频下载了一段时间后的下载数据量和下载时间计算出视频的平均下载速度。The download agent calculates the average download speed of the video based on the download data volume and download time after the video has been downloaded for a period of time.
下载代理端把平均下载速度和视频码率进行对比,当平均下载速度大于或等于视频码率时,认为当前的视频下载正常,可以满足需求。当平均下载速度小于视频码率时,确定视频下载卡顿。The download agent compares the average download speed with the video bit rate. When the average download speed is greater than or equal to the video bit rate, it is considered that the current video download is normal and can meet the demand. When the average download speed is less than the video bit rate, it is determined that the video download is stuck.
本申请实施例通过确定播放数据的平均下载速度和视频码率,进而通过比较平均下载速度和视频码率来确定播放数据的下载是否卡顿,提高了确定播放数据下载状态的准确性。The embodiment of the present application improves the accuracy of determining the download status of the playback data by determining the average download speed and video bit rate of the playback data, and then determining whether the download of the playback data is stalled by comparing the average download speed and the video bit rate.
基于上述实施例,确定播放数据的下载卡顿之后,还包括:Based on the above embodiment, after determining that the download of the playback data is stuck, the method further includes:
S231,停止从目标CDN服务器中下载播放数据,并向CDN调度中心发送变更请求;其中,CDN调度中心基于变更请求确定备用CDN服务器,并将备用CDN服务器的标识信息发送至下载代理端;S231, stop downloading playback data from the target CDN server, and send a change request to the CDN scheduling center; wherein the CDN scheduling center determines a backup CDN server based on the change request, and sends identification information of the backup CDN server to the download agent;
S232,基于CDN调度中心发送的备用CDN服务器的标识信息,从备用CDN服务器中下载剩余的播放数据,并将剩余的播放数据发送至播放器。S232: based on the identification information of the standby CDN server sent by the CDN scheduling center, download the remaining playback data from the standby CDN server, and send the remaining playback data to the player.
剩余的播放数据为未下载完的播放数据。当下载代理端确定播放数据的下载卡顿时,认为当前目标CDN服务器质量不好。下载代理端断开和目标CDN服务器的下载连接,并向CDN调度中心发送变更请求,请求向其他CDN服务器下载剩余的播放数据。The remaining playback data is the playback data that has not been downloaded. When the download agent determines that the download of the playback data is stuck, it considers that the quality of the current target CDN server is not good. The download agent disconnects the download connection with the target CDN server and sends a change request to the CDN scheduling center, requesting to download the remaining playback data from other CDN servers.
CDN调度中心接收下载代理端发送的变更请求后,基于播放请求中下载用户的网络位置,确定与下载用户的网络位置邻近的备用CDN服务器,并将备用CDN服务器的标识信息发送给下载代理端。After receiving the change request sent by the download agent, the CDN dispatch center determines a backup CDN server close to the network location of the download user based on the network location of the download user in the playback request, and sends the identification information of the backup CDN server to the download agent.
如图2所示,下载代理端接收CDN调度中心发送的备用CDN服务器的标识信息,并根据标识信息确定备用CDN服务器。下载代理端根据播放请求中的播放地址,向备用CDN服务器下载剩余的播放数据,并将剩余的播放数据发送给播放器。播放器基于剩余的播放数据进行流畅播放。As shown in Figure 2, the download agent receives the identification information of the backup CDN server sent by the CDN scheduling center, and determines the backup CDN server based on the identification information. The download agent downloads the remaining playback data from the backup CDN server according to the playback address in the playback request, and sends the remaining playback data to the player. The player plays smoothly based on the remaining playback data.
本申请实施例在播放数据的下载卡顿时,通过向备用CDN服务器下载剩余的播放数据,提高了播放数据的下载速率。卡顿和视频内容的跳跃,会降低用户的观看体验,且跳跃播放会造成部分视频内容用户无法观看到,降低了用户观看体验。本申请实施通过加入代理下载服务来感知目标CDN服务器的下载质量,当发现当前网络环境中,目标CDN服务器质量不佳时,重新请求备用CDN服务器来保障整体下载速度满足播放需求,避免卡顿和视频跳跃的现象。In the embodiment of the present application, when the download of playback data is stuck, the remaining playback data is downloaded to the backup CDN server, thereby increasing the download rate of the playback data. Stuttering and jumping of video content will reduce the user's viewing experience, and jumping playback will cause users to be unable to watch some video content, reducing the user's viewing experience. The implementation of the present application senses the download quality of the target CDN server by adding a proxy download service. When it is found that the quality of the target CDN server is poor in the current network environment, the backup CDN server is re-requested to ensure that the overall download speed meets the playback requirements and avoids stuttering and video jumping.
本申请实施例通过在机顶盒上部署下载代理端,实时探测当前网络环境下,下载代理端向目标CDN服务器下载播放数据的下载速度。下载代理端在上线时向CDN调度中心注册,之后机顶盒的播放器在向CDN调度中心发送播放请求时,都会将播放请求调度至下载代理端,后续由下载代理端取代机顶盒上的播放器的下载。下载代理端在下载过程中不断探测目标CDN服务器的播放数据下载质量,当目标CDN服务器的播放数据下载质量不好时,下载代理端会从CDN调度中心获取备用CDN服务器,并后续一段时间内从备用CDN服务器下载数据并推送给播放器,避免因网络问题导致单一CDN服务器的播放数据下载质量不好时引起播放卡顿。本申请实施例最大的优势是不改变机顶盒的播放器,即可实现对CDN服务器的质量感知和切换下载。The embodiment of the present application deploys a download agent on the set-top box to detect in real time the download speed of the download agent downloading playback data from the target CDN server under the current network environment. The download agent registers with the CDN scheduling center when it goes online. After that, when the player of the set-top box sends a playback request to the CDN scheduling center, the playback request will be dispatched to the download agent, and the download agent will subsequently replace the download of the player on the set-top box. The download agent continuously detects the download quality of the playback data of the target CDN server during the download process. When the download quality of the playback data of the target CDN server is not good, the download agent will obtain a backup CDN server from the CDN scheduling center, and download data from the backup CDN server and push it to the player within a period of time, so as to avoid playback jams caused by poor download quality of playback data from a single CDN server due to network problems. The biggest advantage of the embodiment of the present application is that the quality perception and switching download of the CDN server can be achieved without changing the player of the set-top box.
图3是本申请实施例提供的数据处理方法的流程示意图之三。参照图3,本申请实施例提供一种数据处理方法,应用于CDN调度中心,包括:FIG3 is a third flow chart of a data processing method provided in an embodiment of the present application. Referring to FIG3 , an embodiment of the present application provides a data processing method, which is applied to a CDN scheduling center, including:
S300,接收下载代理端发送的机顶盒ID;S300, receiving the set-top box ID sent by the download agent;
本申请实施例的执行主体为CDN调度中心。下载代理端启动后把机顶盒ID上报给CDN调度中心,CDN调度中心接收下载代理端发送的机顶盒ID。The execution subject of the embodiment of the present application is the CDN scheduling center. After the download agent is started, it reports the set-top box ID to the CDN scheduling center, and the CDN scheduling center receives the set-top box ID sent by the download agent.
S400,基于播放器发送的播放请求确定目标CDN服务器;S400, determining a target CDN server based on a playback request sent by a player;
CDN调度中心接收播放器发送的播放请求,并根据播放请求确定下载用户的网络位置;根据下载用户的网络位置确定邻近的CDN服务器作为目标CDN服务器,来完成播放请求中播放数据的下载。The CDN dispatch center receives the playback request sent by the player and determines the network location of the downloading user based on the playback request; based on the network location of the downloading user, the adjacent CDN server is determined as the target CDN server to complete the download of the playback data in the playback request.
S500,基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;S500, based on the set-top box ID, determining that the download agent corresponding to the set-top box ID is in an online state;
CDN调度中心根据接收到的机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态,以便将播放请求发送给在线的下载代理端来下载播放数据。The CDN dispatch center determines that the download agent corresponding to the set-top box ID is online according to the received set-top box ID, so as to send the play request to the online download agent to download the play data.
S600,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。S600, sending the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
当确定机顶盒ID对应的下载代理端在线后,CDN调度中心将目标CDN服务器的标识信息发送至下载代理端,并把播放请求通过HTTP协议302指令调度到机顶盒上的下载代理端进行播放数据的下载。When it is determined that the download agent corresponding to the set-top box ID is online, the CDN scheduling center sends the identification information of the target CDN server to the download agent, and dispatches the playback request to the download agent on the set-top box through the HTTP protocol 302 instruction to download the playback data.
下载代理端根据标识信息确定目标CDN服务器,并根据播放请求中的播放地址,向目标CDN服务器下载播放数据,并将下载到的播放数据发送给播放器。播放器根据播放数据进行流畅播放。The download agent determines the target CDN server according to the identification information, and downloads the playback data from the target CDN server according to the playback address in the playback request, and sends the downloaded playback data to the player. The player plays smoothly according to the playback data.
本申请实施例提供的数据处理方法,通过接收下载代理端发送的机顶盒ID;基于播放器发送的播放请求确定目标CDN服务器;基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。本申请实施例通过确定目标CDN服务器,通过下载代理端从目标CDN服务器下载播放数据,提高了播放数据的下载效率。The data processing method provided in the embodiment of the present application receives the set-top box ID sent by the download agent; determines the target CDN server based on the playback request sent by the player; determines that the download agent corresponding to the set-top box ID is online based on the set-top box ID; sends the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player. The embodiment of the present application improves the download efficiency of the playback data by determining the target CDN server and downloading the playback data from the target CDN server through the download agent.
基于上述实施例,接收下载代理端发送的机顶盒ID之后,还包括:Based on the above embodiment, after receiving the set-top box ID sent by the download agent, the method further includes:
S310,基于机顶盒ID,确定机顶盒ID对应的下载代理端处于离线状态;S310, based on the set-top box ID, determining that the download agent corresponding to the set-top box ID is in an offline state;
S320,将目标CDN服务器的标识信息发送至播放器;播放器基于目标CDN服务器的标识信息从目标CDN服务器中下载播放数据。S320, sending the identification information of the target CDN server to the player; the player downloads the playback data from the target CDN server based on the identification information of the target CDN server.
当CDN调度中心通过机顶盒ID,确定机顶盒ID对应的下载代理端处于离线状态时。When the CDN dispatch center determines through the set-top box ID that the download agent corresponding to the set-top box ID is in an offline state.
CDN调度中心根据播放请求,确定下载用户的网络位置,并根据下载用户的网络位置,将与下载用户的网络位置邻近的CDN服务器作为目标CDN服务器,并将目标CDN服务器的标识信息发送至播放器。播放器根据标识信息确定目标CDN服务器,并根据用户选择的播放地址向目标CDN服务器下载播放数据,并基于下载的播放数据进行播放。The CDN dispatch center determines the network location of the downloading user based on the playback request, and uses the CDN server adjacent to the downloading user's network location as the target CDN server based on the downloading user's network location, and sends the identification information of the target CDN server to the player. The player determines the target CDN server based on the identification information, downloads the playback data from the target CDN server based on the playback address selected by the user, and plays the downloaded playback data.
本申请实施例中,当机顶盒ID对应的下载代理端处于离线状态时,直接通过播放器向目标CDN服务器下载播放数据,有利于确保播放数据及时下载,提高了播放数据的下载效率。In the embodiment of the present application, when the download agent corresponding to the set-top box ID is in an offline state, the playback data is directly downloaded to the target CDN server through the player, which is conducive to ensuring that the playback data is downloaded in a timely manner and improving the download efficiency of the playback data.
基于上述实施例,基于播放器发送的播放请求确定目标CDN服务器,包括:Based on the above embodiment, determining a target CDN server based on a playback request sent by a player includes:
S410,基于播放请求,确定播放器ID;S410, determining a player ID based on the play request;
S420,基于播放器ID,确定播放器与各CDN服务器的距离;S420, determining the distance between the player and each CDN server based on the player ID;
S430,将距离小于设定值的CDN服务器作为目标CDN服务器。S430: Use a CDN server whose distance is less than a set value as a target CDN server.
播放器ID为用于表示播放器位置的标识信息,播放器位置进一步代表下载用户的网络位置。The player ID is identification information used to indicate the player location, and the player location further represents the network location of the downloading user.
播放器在发送播放请求时,将播放器ID记载在播放请求中。CDN调度中心根据播放请求,获取播放器ID。When the player sends a play request, it records the player ID in the play request. The CDN dispatch center obtains the player ID based on the play request.
CDN调度中心根据播放器ID,确定播放器的位置,进而确定播放器与各CDN服务器的距离。为选择与播放器邻近的CDN服务器,根据下载需求,确定设定值。当播放器与CDN服务器的距离小于设定值时,选择最短距离对应的CDN服务器为目标CDN服务器。The CDN dispatch center determines the location of the player based on the player ID, and then determines the distance between the player and each CDN server. To select a CDN server close to the player, a set value is determined based on the download demand. When the distance between the player and the CDN server is less than the set value, the CDN server corresponding to the shortest distance is selected as the target CDN server.
本申请实施例通过选择与播放器邻近的CDN服务器作为目标CDN服务器,提高了对播放数据下载的效率。The embodiment of the present application improves the efficiency of downloading playback data by selecting a CDN server adjacent to the player as the target CDN server.
基于上述实施例,基于机顶盒ID,确定机顶盒ID对应的下载代理端处于离线状态,包括:Based on the above embodiment, based on the set-top box ID, determining that the download agent corresponding to the set-top box ID is in an offline state includes:
S311,接收机顶盒ID对应的下载代理端发送的心跳消息;S311, receiving a heartbeat message sent by the download agent corresponding to the set-top box ID;
S312,若心跳消息出现异常,则确定机顶盒ID对应的下载代理端处于离线状态。S312: If the heartbeat message is abnormal, it is determined that the download agent corresponding to the set-top box ID is in an offline state.
下载代理端受CDN调度中心的管理,启动运行时向CDN调度中心发送登录消息进行登录,登录成功后会定期向CDN调度中心发送心跳消息,维持与CDN调度中心的连接,让CDN调度中心实时知道下载代理端的在线状态。The download agent is managed by the CDN dispatch center. When it starts running, it sends a login message to the CDN dispatch center to log in. After a successful login, it will periodically send heartbeat messages to the CDN dispatch center to maintain the connection with the CDN dispatch center, so that the CDN dispatch center can know the online status of the download agent in real time.
CDN调度中心定期接收下载代理端发送的心跳消息,并根据心跳消息确定下载代理端是否在线。当心跳消息正常时,例如,心跳消息的频率正常,确定下载代理端处于在线状态。当心跳消息异常时,例如,心跳消息的频率不正常,或者接收不到心跳消息,确定下载代理端处于离线状态。The CDN dispatch center periodically receives the heartbeat message sent by the download agent, and determines whether the download agent is online based on the heartbeat message. When the heartbeat message is normal, for example, the frequency of the heartbeat message is normal, the download agent is determined to be online. When the heartbeat message is abnormal, for example, the frequency of the heartbeat message is abnormal, or the heartbeat message cannot be received, the download agent is determined to be offline.
本申请实施例通过下载代理端发送的心跳消息,确定下载代理端的离线状态,提高了确定下载代理端离线状态的准确性。The embodiment of the present application determines the offline state of the download agent through the heartbeat message sent by the download agent, thereby improving the accuracy of determining the offline state of the download agent.
下面对本申请实施例提供的数据处理装置进行描述,下文描述的数据处理装置与上文描述的数据处理方法可相互对应参照。参照图4,图4是本申请实施例提供的数据处理装置的结构示意图之一。一种数据处理装置,包括:The data processing device provided in the embodiment of the present application is described below. The data processing device described below and the data processing method described above can be referred to each other. Referring to FIG. 4 , FIG. 4 is one of the structural schematic diagrams of the data processing device provided in the embodiment of the present application. A data processing device includes:
发送模块401,用于向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;The sending module 401 is used to send the set-top box ID to the content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the play request sent by the player, and sends the play request and the identification information of the target CDN server to the download agent based on the set-top box ID;
第一下载模块402,用于响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器;A first downloading module 402 is used to respond to a playback request sent by the CDN scheduling center, download playback data from a target CDN server based on identification information, and send the playback data to a player;
本申请实施例提供的数据处理装置,通过向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。本申请实施例通过确定目标CDN服务器,通过下载代理端从目标CDN服务器下载播放数据,提高了播放数据的下载效率。The data processing device provided in the embodiment of the present application sends a set-top box ID to a content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the playback request sent by the player, and sends the playback request and identification information of the target CDN server to the download agent based on the set-top box ID; in response to the playback request sent by the CDN scheduling center, the playback data is downloaded from the target CDN server based on the identification information, and the playback data is sent to the player. The embodiment of the present application improves the download efficiency of the playback data by determining the target CDN server and downloading the playback data from the target CDN server through the download agent.
在一个实施例中,第一下载模块402还用于基于播放数据的播放时长和传输流文件大小,确定播放数据的视频码率;基于播放数据的下载数据量和下载时间,确定播放数据的平均下载速度;当平均下载速度小于视频码率时,确定播放数据的下载卡顿。In one embodiment, the first download module 402 is also used to determine the video bit rate of the playback data based on the playback duration of the playback data and the transmission stream file size; determine the average download speed of the playback data based on the download data volume and download time of the playback data; when the average download speed is less than the video bit rate, determine that the download of the playback data is stuck.
在一个实施例中,第一下载模块402还用于停止从目标CDN服务器中下载播放数据,并向CDN调度中心发送变更请求;其中,CDN调度中心基于变更请求确定备用CDN服务器,并将备用CDN服务器的标识信息发送至下载代理端;基于CDN调度中心发送的备用CDN服务器的标识信息,从备用CDN服务器中下载剩余的播放数据,并将剩余的播放数据发送至播放器。In one embodiment, the first download module 402 is also used to stop downloading playback data from the target CDN server and send a change request to the CDN scheduling center; wherein the CDN scheduling center determines a backup CDN server based on the change request and sends the identification information of the backup CDN server to the download agent; based on the identification information of the backup CDN server sent by the CDN scheduling center, the remaining playback data is downloaded from the backup CDN server, and the remaining playback data is sent to the player.
参照图5,图5是本申请实施例提供的数据处理装置的结构示意图之二。一种数据处理装置,包括:Referring to FIG. 5 , FIG. 5 is a second structural diagram of a data processing device provided in an embodiment of the present application. A data processing device includes:
接收模块501,用于接收下载代理端发送的机顶盒ID;The receiving module 501 is used to receive the set-top box ID sent by the download agent;
第一确定模块502,用于基于播放器发送的播放请求确定目标CDN服务器;A first determination module 502, configured to determine a target CDN server based on a playback request sent by a player;
第二确定模块503,用于基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;The second determination module 503 is used to determine, based on the set-top box ID, whether the download agent corresponding to the set-top box ID is online;
第二下载模块504,用于将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。The second download module 504 is used to send the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
本申请实施例提供的数据处理装置,通过接收下载代理端发送的机顶盒ID;基于播放器发送的播放请求确定目标CDN服务器;基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。本申请实施例通过确定目标CDN服务器,通过下载代理端从目标CDN服务器下载播放数据,提高了播放数据的下载效率。The data processing device provided in the embodiment of the present application receives the set-top box ID sent by the download agent; determines the target CDN server based on the playback request sent by the player; determines that the download agent corresponding to the set-top box ID is online based on the set-top box ID; sends the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player. The embodiment of the present application improves the download efficiency of the playback data by determining the target CDN server and downloading the playback data from the target CDN server through the download agent.
在一个实施例中,接收模块501还用于基于机顶盒ID,确定机顶盒ID对应的下载代理端处于离线状态;将目标CDN服务器的标识信息发送至播放器;播放器基于目标CDN服务器的标识信息从目标CDN服务器中下载播放数据。In one embodiment, the receiving module 501 is also used to determine that the download agent corresponding to the set-top box ID is in an offline state based on the set-top box ID; send the identification information of the target CDN server to the player; and the player downloads the playback data from the target CDN server based on the identification information of the target CDN server.
在一个实施例中,第一确定模块502用于基于播放请求,确定播放器ID;基于播放器ID,获取播放器与各CDN服务器的距离;将距离小于设定值的CDN服务器作为目标CDN服务器。In one embodiment, the first determination module 502 is used to determine the player ID based on the play request; obtain the distance between the player and each CDN server based on the player ID; and use the CDN server whose distance is less than a set value as the target CDN server.
在一个实施例中,接收模块501还用于接收机顶盒ID对应的下载代理端发送的心跳消息;若心跳消息出现异常,则确定机顶盒ID对应的下载代理端处于离线状态。In one embodiment, the receiving module 501 is further used to receive a heartbeat message sent by the download agent corresponding to the set-top box ID; if the heartbeat message is abnormal, it is determined that the download agent corresponding to the set-top box ID is in an offline state.
图6示例了一种电子设备的实体结构示意图,如图6所示,该电子设备可以包括:处理器(processor)610、通信接口(Communication Interface)620、存储器(memory)630和通信总线640,其中,处理器610,通信接口620,存储器630通过通信总线640完成相互间的通信。处理器610可以调用存储器630中的计算机程序,以执行数据处理方法的步骤,例如包括:FIG6 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG6 , the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call a computer program in the memory 630 to execute the steps of the data processing method, for example, including:
向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。The set-top box ID is sent to the content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the playback request sent by the player, and based on the set-top box ID, sends the playback request and the identification information of the target CDN server to the download agent; in response to the playback request sent by the CDN scheduling center, the playback data is downloaded from the target CDN server based on the identification information, and the playback data is sent to the player.
或者执行数据处理方法的步骤,例如包括:Or perform the steps of a data processing method, for example including:
接收下载代理端发送的机顶盒ID;基于播放器发送的播放请求确定目标CDN服务器;基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。Receive the set-top box ID sent by the download agent; determine the target CDN server based on the playback request sent by the player; determine that the download agent corresponding to the set-top box ID is online based on the set-top box ID; send the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
此外,上述的存储器630中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
另一方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序,所述计算机程序可存储在非暂态计算机可读存储介质上,所述计算机程序被处理器执行时,计算机能够执行上述各实施例所提供的数据处理方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, the computer program may be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer can perform the steps of the data processing method provided in the above embodiments, for example, including:
向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。The set-top box ID is sent to the content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the playback request sent by the player, and based on the set-top box ID, sends the playback request and the identification information of the target CDN server to the download agent; in response to the playback request sent by the CDN scheduling center, the playback data is downloaded from the target CDN server based on the identification information, and the playback data is sent to the player.
或者执行数据处理方法的步骤,例如包括:Or perform the steps of a data processing method, for example including:
接收下载代理端发送的机顶盒ID;基于播放器发送的播放请求确定目标CDN服务器;基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。Receive the set-top box ID sent by the download agent; determine the target CDN server based on the playback request sent by the player; determine that the download agent corresponding to the set-top box ID is online based on the set-top box ID; send the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
另一方面,本申请实施例还提供一种处理器可读存储介质,所述处理器可读存储介质存储有计算机程序,所述计算机程序用于使处理器执行上述各实施例提供的数据处理方法的步骤,例如包括:On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, wherein the computer program is used to enable the processor to execute the steps of the data processing method provided in the above embodiments, for example, including:
向内容分发网络CDN调度中心发送机顶盒ID;其中,CDN调度中心基于播放器发送的播放请求确定目标CDN服务器,并基于机顶盒ID,将播放请求以及目标CDN服务器的标识信息发送至下载代理端;响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。The set-top box ID is sent to the content distribution network CDN scheduling center; wherein the CDN scheduling center determines the target CDN server based on the playback request sent by the player, and based on the set-top box ID, sends the playback request and the identification information of the target CDN server to the download agent; in response to the playback request sent by the CDN scheduling center, the playback data is downloaded from the target CDN server based on the identification information, and the playback data is sent to the player.
或者执行数据处理方法的步骤,例如包括:Or perform the steps of a data processing method, for example including:
接收下载代理端发送的机顶盒ID;基于播放器发送的播放请求确定目标CDN服务器;基于机顶盒ID,确定机顶盒ID对应的下载代理端处于在线状态;将播放请求以及目标CDN服务器的标识信息发送至下载代理端;其中,下载代理端响应CDN调度中心发送的播放请求,基于标识信息从目标CDN服务器中下载播放数据,并将播放数据发送至播放器。Receive the set-top box ID sent by the download agent; determine the target CDN server based on the playback request sent by the player; determine that the download agent corresponding to the set-top box ID is online based on the set-top box ID; send the playback request and the identification information of the target CDN server to the download agent; wherein the download agent responds to the playback request sent by the CDN scheduling center, downloads the playback data from the target CDN server based on the identification information, and sends the playback data to the player.
所述处理器可读存储介质可以是处理器能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311090370.4A CN118803310A (en) | 2023-08-28 | 2023-08-28 | Data processing method, device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311090370.4A CN118803310A (en) | 2023-08-28 | 2023-08-28 | Data processing method, device, electronic device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118803310A true CN118803310A (en) | 2024-10-18 |
Family
ID=93020723
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311090370.4A Pending CN118803310A (en) | 2023-08-28 | 2023-08-28 | Data processing method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118803310A (en) |
-
2023
- 2023-08-28 CN CN202311090370.4A patent/CN118803310A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9866624B2 (en) | Managing access to digital content sources | |
| US10237580B2 (en) | Method and system for broadcasting multimedia data | |
| US9621928B2 (en) | Streaming playback and dynamic ad insertion | |
| EP1427170B1 (en) | Peer-to-Peer content broadcast method | |
| EP2566134A1 (en) | Method, apparatus and system for intercutting advertisement | |
| JP2011502412A (en) | Resilient service quality within a managed multimedia distribution network | |
| CN101595731A (en) | Prefix cache-assisted quality of service-aware peer-to-peer video-on-demand | |
| US20220353314A1 (en) | Network data scheduling method and edge node thereof | |
| EP2404431B1 (en) | Methods and arrangements for prioritization in a peer-to-peer network | |
| RU2454806C2 (en) | Method, device and system to notify about events of real-time streaming protocol | |
| WO2023005701A1 (en) | Data communication method and apparatus, electronic device, and storage medium | |
| CN114666609A (en) | Video data download method, device, electronic device and storage medium | |
| EP1627500B1 (en) | Service management using multiple service location managers | |
| US8255457B2 (en) | Adaptive content load balancing | |
| US11985189B2 (en) | Assisted delivery service for networks | |
| CN114222086B (en) | Method, system, medium and electronic device for scheduling audio and video code stream | |
| JP2010519668A (en) | Multimedia stream distributed recording method, apparatus and computer program product | |
| US20250016389A1 (en) | Systems and methods for streaming media content during unavailability of content server | |
| CN118803310A (en) | Data processing method, device, electronic device and storage medium | |
| JP7188718B1 (en) | Notification method and backend server | |
| US20060088299A1 (en) | Peer-to-peer-type content distribution system and content reproduction terminal device for use therein | |
| CN112243135B (en) | Multimedia playing method and device | |
| TWI856829B (en) | Load distribution device and method | |
| US20160173551A1 (en) | System and method for session mobility for adaptive bitrate streaming | |
| JP2011203573A (en) | Karaoke network system and centralized control device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |