










技术领域technical field
本申请涉及显示设备技术领域,尤其涉及一种显示设备及媒资播放方法。The present application relates to the technical field of display devices, in particular to a display device and a method for playing media assets.
背景技术Background technique
显示设备是指能够输出具体显示画面的终端设备,它可以基于互联网应用技术,具备开放式操作系统与控制器,拥有开放式应用平台,可实现双向人机交互功能,集影音、娱乐、数据等多种功能于一体的产品。A display device refers to a terminal device that can output specific display images. It can be based on Internet application technology, has an open operating system and controller, has an open application platform, and can realize two-way human-computer interaction functions, integrating audio-visual, entertainment, data, etc. Multiple functions in one product.
通过接入互联网,显示设备可以提供一种网络点播技术,网络点播技术可以将互联网音视频点播到显示设备上播放。在使用过程中,用户可以在显示设备上选择播放其喜爱的互联网音视频,以满足用户的多样化和个性化需求。在点播互联网音视频时,需要下载将该音视频对应的资源文件,以供显示设备播放。By connecting to the Internet, the display device can provide a network-on-demand technology, which can play Internet audio and video on-demand on the display device. During use, users can choose to play their favorite Internet audio and video on the display device to meet the diverse and personalized needs of users. When ordering Internet audio and video, it is necessary to download the resource file corresponding to the audio and video for the display device to play.
当音视频资源文件的类型为HLS(HTTP Live Streaming)时,需要依次下载HLS中的音视频片段,并按顺序将音视频片段合并,以在显示设备中播放该音视频。但在一些传统的显示设备中,HLS中的音视频片段如果重试下载超过一定次数,显示设备则不再下载该音视频片段,导致该段音视频片段在播放过程中被直接跳过。当存在被跳过的视频片段时,预计算的其他音视频片段的下载时间就会出现误差,从而导致显示设备播放网络音视频资源时出现卡顿。When the type of the audio and video resource file is HLS (HTTP Live Streaming), it is necessary to download the audio and video clips in the HLS in sequence, and combine the audio and video clips in order to play the audio and video on the display device. However, in some traditional display devices, if the audio and video clips in HLS are downloaded more than a certain number of times, the display device will no longer download the audio and video clips, resulting in the audio and video clips being directly skipped during playback. When there are skipped video clips, there will be errors in the pre-calculated download time of other audio and video clips, which will cause the display device to freeze when playing network audio and video resources.
发明内容Contents of the invention
本申请提供了一种显示设备及媒资播放方法,以解决传统显示设备播放网络媒资卡顿的问题。The present application provides a display device and a method for playing media assets, so as to solve the problem of stuck playing network media assets on traditional display devices.
第一方面,本申请一些实施例提供一种显示设备,包括:In a first aspect, some embodiments of the present application provide a display device, including:
显示器;monitor;
与所述显示器连接的控制器,被配置为:a controller connected to said display, configured to:
响应于媒资播放指令,获取待播放媒资的目录文件,所述目录文件中包括多个媒资片段序号,所述媒资片段序号用于表征组成所述待播放媒资的媒资片段;Responding to the media asset playback instruction, obtain a directory file of the media asset to be played, the directory file includes a plurality of media asset segment numbers, and the media asset segment numbers are used to represent the media asset segments that make up the media asset to be played;
按照所述媒资片段序号请求媒资片段;request the media asset segment according to the sequence number of the media asset segment;
对比当前请求的媒资片段序号和当前完成传输的媒资片段序号;Compare the sequence number of the currently requested media asset segment with the sequence number of the currently transmitted media asset segment;
如果所述当前请求的媒资片段序号不等于所述当前完成传输的媒资片段序号加1,重新计算缓存,以补充对当前媒资片段的缓存。If the sequence number of the currently requested media asset segment is not equal to the sequence number of the currently transmitted media asset segment plus 1, the cache is recalculated to supplement the cache of the current media asset segment.
第二方面,本申请一些实施例提供一种媒资播放方法,应用于显示设备,媒资播放方法包括:In the second aspect, some embodiments of the present application provide a method for playing media assets, which is applied to a display device. The method for playing media assets includes:
响应于媒资播放指令,获取待播放媒资的目录文件,所述目录文件中包括多个媒资片段序号,所述媒资片段序号用于表征组成所述待播放媒资的媒资片段;Responding to the media asset playback instruction, obtain a directory file of the media asset to be played, the directory file includes a plurality of media asset segment numbers, and the media asset segment numbers are used to represent the media asset segments that make up the media asset to be played;
按照所述媒资片段序号请求媒资片段;request the media asset segment according to the sequence number of the media asset segment;
对比当前请求的媒资片段序号和当前完成传输的媒资片段序号;Compare the sequence number of the currently requested media asset segment with the sequence number of the currently transmitted media asset segment;
如果所述当前请求的媒资片段序号不等于所述当前完成传输的媒资片段序号加1,重新计算缓存,以补充对当前媒资片段的缓存。If the sequence number of the currently requested media asset segment is not equal to the sequence number of the currently transmitted media asset segment plus 1, the cache is recalculated to supplement the cache of the current media asset segment.
由以上技术方案可知,本申请一些实施例提供的显示设备和媒资播放方法能够响应于媒资播放指令,自动获取待播放媒资的目录文件。其中,目录文件中包括多个媒资片段序号,媒资片段序号用于表征组成待播放媒资的媒资片段。在获取目录文件后,按照媒资片段序号请求媒资片段,并对比当前请求的媒资片段序号和当前完成传输的媒资片段序号。如果当前请求的媒资片段序号不等于当前完成传输的媒资片段序号加1,说明当前请求的待播放媒资的媒资片段与实际所需媒资片段不符,则重新计算缓存,以补充对当前媒资片段的缓存,解决了传统显示设备播放网络媒资卡顿的问题。It can be seen from the above technical solution that the display device and the media asset playing method provided by some embodiments of the present application can automatically acquire the directory file of the media asset to be played in response to the media asset playing instruction. Wherein, the catalog file includes a plurality of serial numbers of media asset fragments, and the serial numbers of media asset fragments are used to represent the media asset fragments constituting the media assets to be played. After obtaining the directory file, request the media asset segment according to the sequence number of the media asset segment, and compare the sequence number of the currently requested media asset segment with the sequence number of the currently transmitted media asset segment. If the serial number of the currently requested media asset segment is not equal to the serial number of the currently transmitted media asset segment plus 1, it means that the media asset segment of the currently requested media asset to be played does not match the actual required media asset segment, and the cache is recalculated to supplement the The caching of the current media clips solves the problem of the traditional display device playing network media clips.
附图说明Description of drawings
为了更清楚地说明本申请的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solution of the present application more clearly, the accompanying drawings that need to be used in the embodiments will be briefly introduced below. Obviously, for those of ordinary skill in the art, on the premise of not paying creative work, there are also Additional figures can be derived from these figures.
图1为本申请一些实施例提供的显示设备与控制装置之间操作场景的示意图;FIG. 1 is a schematic diagram of an operation scene between a display device and a control device provided by some embodiments of the present application;
图2为本申请一些实施例中显示设备的硬件配置框图;FIG. 2 is a block diagram of a hardware configuration of a display device in some embodiments of the present application;
图3为本申请一些实施例中控制装置的硬件配置框图;Fig. 3 is a block diagram of the hardware configuration of the control device in some embodiments of the present application;
图4为本申请一些实施例中显示设备中软件配置示意图;FIG. 4 is a schematic diagram of software configuration in a display device in some embodiments of the present application;
图5为本申请一些实施例提供的显示设备与服务器数据交互关系示意图;FIG. 5 is a schematic diagram of a data interaction relationship between a display device and a server provided by some embodiments of the present application;
图6为为本申请一些实施例提供的媒资播放方法流程示意图;FIG. 6 is a schematic flow diagram of a media asset playing method provided by some embodiments of the present application;
图7为本申请一些实施例提供的媒资详情界面示意图;Fig. 7 is a schematic diagram of a media resource details interface provided by some embodiments of the present application;
图8为为本申请一些实施例提供的播放界面示意图;Fig. 8 is a schematic diagram of a playback interface provided for some embodiments of the present application;
图9为本申请一些实施例提供的输出请求媒资片段的时序关系图;Fig. 9 is a timing relationship diagram of output request media asset fragments provided by some embodiments of the present application;
图10为本申请一些实施例提供的监测请求操作类型的流程图;FIG. 10 is a flow chart of monitoring request operation types provided by some embodiments of the present application;
图11为本申请一些实施例提供的下载请求示意图。Fig. 11 is a schematic diagram of a download request provided by some embodiments of the present application.
具体实施方式Detailed ways
为使本申请的目的和实施方式更加清楚,下面将结合本申请示例性实施例中的附图,对本申请示例性实施方式进行清楚、完整地描述,显然,描述的示例性实施例仅是本申请一部分实施例,而不是全部的实施例。In order to make the purpose and implementation of the application clearer, the following will clearly and completely describe the exemplary implementation of the application in conjunction with the accompanying drawings in the exemplary embodiment of the application. Obviously, the described exemplary embodiment is only the present application. Claim some of the examples, not all of them.
需要说明的是,本申请中对于术语的简要说明,仅是为了方便理解接下来描述的实施方式,而不是意图限定本申请的实施方式。除非另有说明,这些术语应当按照其普通和通常的含义理解。It should be noted that the brief description of the terms in this application is only for the convenience of understanding the implementations described below, and is not intended to limit the implementations of this application. These terms are to be understood according to their ordinary and usual meaning unless otherwise stated.
本申请中说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别类似或同类的对象或实体,而不必然意味着限定特定的顺序或先后次序,除非另外注明。应该理解这样使用的用语在适当情况下可以互换。The terms "first", "second", and "third" in the description and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean limiting specific sequential or sequential unless otherwise noted. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
术语“包括”和“具有”以及他们的任何变形,意图在于覆盖但不排他的包含,例如,包含了一系列组件的产品或设备不必限于清楚地列出的所有组件,而是可包括没有清楚地列出的或对于这些产品或设备固有的其它组件。The terms "comprising" and "having", as well as any variations thereof, are intended to be inclusive but not exclusive, for example, a product or device comprising a series of components is not necessarily limited to all components expressly listed, but may include not expressly listed other components listed or inherent to these products or equipment.
本申请实施方式提供的显示设备可以具有多种实施形式,例如,可以是电视、激光投影设备、显示器(monitor)、电子白板(electronic bulletin board)、电子桌面(electronic table)等。The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, and the like.
图1为根据实施例中显示设备与控制装置之间操作场景的示意图。如图1所示,用户可通过控制设备300或控制装置100操作显示设备200。Fig. 1 is a schematic diagram of an operation scene between a display device and a control device according to an embodiment. As shown in FIG. 1 , the user can operate the
在一些实施例中,控制装置100可以是遥控器,遥控器和显示设备的通信包括红外协议通信或蓝牙协议通信,及其他短距离通信方式,通过无线或有线方式来控制显示设备200。用户可以通过遥控器上按键、语音输入、控制面板输入等输入用户指令,来控制显示设备200。In some embodiments, the
在一些实施例中,也可以使用控制设备300(如移动电话、平板电脑、计算机、笔记本电脑等)以控制显示设备200。例如,使用在控制设备300上运行的应用程序控制显示设备200。In some embodiments, a control device 300 (such as a mobile phone, a tablet computer, a computer, a notebook computer, etc.) may also be used to control the
在一些实施例中,显示设备200可以不使用上述的控制设备300或控制装置100接收指令,而是通过触摸或者手势等接收用户的控制。In some embodiments, the
在一些实施例中,显示设备200还可以采用除了控制装置100和控制设备300之外的方式进行控制,例如,可以通过显示设备200设备内部配置的获取语音指令的模块直接接收用户的语音指令控制,也可以通过显示设备200设备外部设置的语音控制设备来接收用户的语音指令控制。In some embodiments, the
在一些实施例中,显示设备200还与服务器400进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。服务器400可以向显示设备200提供各种内容和互动。服务器400可以是一个集群,也可以是多个集群,可以包括一类或多类服务器。In some embodiments, the
如图2所示,显示设备200可以包括调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器260、音频输出接口270、存储器、供电电源、用户接口中的至少一种。As shown in FIG. 2 , the
在一些实施例中,控制器250可以包括处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。In some embodiments, the
显示器260可以包括以下组件,即:用于呈现画面的显示屏组件;驱动图像显示的驱动组件;用于接收源自控制器250输出的图像信号,进行显示视频内容、图像内容以及菜单操控界面的组件以及用户操控UI界面的组件等。The
显示器260可为液晶显示器、OLED显示器、以及投影显示器,还可以为一种投影装置和投影屏幕。The
通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一种。显示设备200可以通过通信器220与外部控制设备100或服务器400建立控制信号和数据信号的发送和接收。The
用户接口,可用于接收控制装置100(如:红外遥控器等)的控制信号。The user interface can be used to receive control signals from the control device 100 (such as: an infrared remote controller, etc.).
检测器230用于采集外部环境或与外部交互的信号。例如,检测器230包括光接收器,用于采集环境光线强度的传感器;或者,检测器230包括图像采集器,如摄像头,可以用于采集外部环境场景、用户的属性或用户交互手势,再或者,检测器230包括声音采集器,如麦克风等,用于接收外部声音。The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, the detector 230 includes a light receiver, which is a sensor for collecting ambient light intensity; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, for receiving external sound.
外部装置接口240可以包括但不限于如下:高清多媒体接口(HDMI)、模拟或数据高清分量输入接口(分量)、复合视频输入接口(CVBS)、USB输入接口(USB)、RGB端口等任一个或多个接口。也可以是上述多个接口形成的复合性的输入/输出接口。The
调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG数据信号。在一些实施例中,控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。The
控制器250,通过存储在存储器上中各种软件控制程序,来控制显示设备的工作和响应用户的操作。控制器250控制显示设备200的整体操作。例如:响应于接收到用于选择在显示器260上显示UI对象的用户命令,控制器250便可以执行与由用户命令选择的对象有关的操作。The
在一些实施例中,控制器250包括中央处理器(Central Processing Unit,CPU),视频处理器,音频处理器,图形处理器(Graphics Processing Unit,GPU),RAM RandomAccess Memory,RAM),ROM(Read-Only Memory,ROM),用于输入/输出的第一接口至第n接口,通信总线(Bus)等中的至少一种。In some embodiments, the
图3示出了根据一些实施例的控制装置100的硬件配置框图。如图3所示,控制装置100包括控制器110、通信接口130、用户输入/输出接口140、存储器、供电电源。控制装置100可接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,起到用户与显示设备200之间交互中介作用。Fig. 3 shows a block diagram of hardware configuration of the
如图4所示,本申请一些实施例中应用程序框架层包括管理器(Managers)、内容提供者(Content Provider)和视图系统(View System)等。As shown in FIG. 4 , the application framework layer in some embodiments of the present application includes managers (Managers), content providers (Content Provider), view system (View System), and so on.
在一些实施例中,活动管理器用于:管理各个应用程序的生命周期以及通常的导航回退功能。In some embodiments, the activity manager is used to: manage the lifecycle of individual applications and general navigation fallback functionality.
在一些实施例中,窗口管理器用于管理所有的窗口程序。In some embodiments, a window manager is used to manage all window programs.
在一些实施例中,系统运行库层为上层即框架层提供支撑,当框架层被访问时,安卓操作系统会运行系统运行库层中包含的C/C++库以实现框架层要实现的功能。In some embodiments, the system runtime layer provides support for the upper layer, that is, the framework layer. When the framework layer is accessed, the Android operating system will run the C/C++ library contained in the system runtime layer to realize the functions to be realized by the framework layer.
在一些实施例中,内核层是硬件和软件之间的层。如图4所示,内核层至少包含以下驱动中的至少一种:音频驱动、显示驱动、蓝牙驱动、摄像头驱动、WIFI驱动、USB驱动、HDMI驱动、传感器驱动(如指纹传感器,温度传感器,触摸传感器、压力传感器等)等。In some embodiments, the kernel layer is a layer between hardware and software. As shown in Figure 4, the kernel layer at least includes at least one of the following drivers: audio driver, display driver, bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, touch sensors, pressure sensors, etc.), etc.
在一些实施例中,内核层还包括用于进行电源管理的电源驱动模块。In some embodiments, the kernel layer further includes a power driver module for power management.
在一些实施例中,图4中的软件架构对应的软件程序和/或模块存储在图2或图3所示的第一存储器或第二存储器中。In some embodiments, the software programs and/or modules corresponding to the software architecture in FIG. 4 are stored in the first memory or the second memory shown in FIG. 2 or FIG. 3 .
如图5所示,显示设备200在使用中,可以与服务器400之间进行通信,实现数据交互。例如,用户可以通过交互指令触发显示设备200显示媒资推荐界面,媒资推荐界面中可以包括多个媒资项目,每个媒资项目对应一个网络地址,网络地址用于下载对应的媒资数据。显示设备200可以响应于用户输入的交互指令,向服务器400获取用于媒资数据的获取请求。用户可以在媒资推荐界面中通过对媒资项目的选择,向服务器400请求下载对应的媒资数据,以供显示设备200播放。As shown in FIG. 5 , when the
为了实现显示设备200与服务器400之间的数据交互,显示设备200需要与服务器400之间建立通信连接。例如,显示设备200和服务器400均可以连接互联网,并通过互联网传输协议,在显示设备200和服务器400之间传递交互数据。In order to realize data interaction between the
在一些实施例中,在显示设备200和服务器400上需要分别设有用于建立通信连接的部件。即如图5所示,在显示设备200中可以设有通信器220,同时在服务器400中可以设有通信模块410,通信器220和通信模块410可以同时支持至少一种相同的通信方式,以建立通信连接关系。例如,显示设备200上的通信器220包括光纤接口,使显示设备200可以通过光纤接口连接网络;同时,服务器400的通信模块410中也包括光纤接口,也可以通过光纤接口连接网络,以实现显示设备200和服务器400之间的通信连接。In some embodiments, components for establishing a communication connection need to be respectively provided on the
需要说明的是,显示设备200和服务器400还可以采用其他连接方式建立通信连接关系。例如,有线宽带、无线局域网、蜂窝网络、蓝牙、红外、射频通信等方式。It should be noted that, the
显示设备200和服务器400之间可以是“多对一”的连接关系,即多个显示设备200可以与同一个服务器400建立通信连接,使服务器400可以为多个显示设备200提供服务。显示设备200和服务器400之间也可以是“多对多”的连接关系,即多个显示设备200可以与多个服务器400建立通信连接,使多个服务器400能够分别为显示设备200提供不同的服务。显然,在个别应用场景中,显示设备200和服务器400之间还可以是“一对一”的连接关系,即一个服务器400专门为一个显示设备200提供服务。The connection relationship between the
为了能够为显示设备200提供服务,服务器400中还可以包括存储模块420,存储模块420可以存储各种资源数据、信息文件以及控制程序。随着用户的交互过程,显示设备200可以在服务器400的存储模块420中获取不同的数据,例如,显示设备200在点播某一媒资项目时,可以向服务器400发送播放数据获取请求,服务器400在接收到该请求后,可以在存储模块420中提取待播放的媒资数据,并将媒资数据传输给显示设备200,以使显示设备200可以对媒资数据进行解码和显示。存储模块420中存储的控制程序,可以被服务器400的控制模块430运行,以使控制模块430可以按照控制程序执行相应的功能。In order to provide services for the
在本申请一些实施例中,显示设备200可以请求下载服务器400中的网络媒资数据,并解析网络媒资的传输协议,根据传输协议下载所选的网络媒资并反馈至显示设备200,以供显示设备200播放。其中,媒资数据可以是视频文件,也可以是音频文件。In some embodiments of the present application, the
例如,网络媒资数据为HLS媒体文件。HLS全称是HTTP Live Streaming,是基于HTTP的媒体流传输协议。HLS主要包三个部分:HTTP、M3U8、TS,其中HTTP是传输协议,M3U8是目录文件,TS是音视频的媒资片段。HLS媒体文件是通过将整条媒资的数据流切割成多个小的可以通过HTTP协议下载的媒资片段,然后提供一个配套的目录文件,使显示设备200根据目录文件有序地拉取媒资片段播放,从而达到播放一条媒体流的效果。For example, the network media asset data is an HLS media file. The full name of HLS is HTTP Live Streaming, which is an HTTP-based media streaming protocol. HLS mainly includes three parts: HTTP, M3U8, and TS, where HTTP is the transmission protocol, M3U8 is the directory file, and TS is the audio and video media fragment. HLS media files cut the entire data stream of media assets into multiple small media asset fragments that can be downloaded through the HTTP protocol, and then provide a supporting directory file, so that the
需要说明的是,M3U8指的是目录文件的格式,它的编码格式是统一码转换格式UTF(Unicode Transformation Format)-8。M3U8文件是TS文件的列表文件,提供一个指向其他位置的TS文件的索引。显示设备200播放的是M3U8文件索引指向的TS文件,当打开M3U8文件时,显示设备200可以根据M3U8文件的索引找到对应TS文件的网络地址进行播放。It should be noted that M3U8 refers to the format of the directory file, and its encoding format is UTF (Unicode Transformation Format)-8. M3U8 files are list files of TS files, providing an index to TS files in other locations. The
例如:一个M3U8文件的格式如下:For example: the format of an M3U8 file is as follows:
#EXTM3U#EXTM3U
#EXT-X-TARGETDURATION:10#EXT-X-TARGETDURATION:10
#EXTINF:9.009,#EXTINF:9.009,
http://media.example.com/first.tshttp://media.example.com/first.ts
#EXTINF:9.009,#EXTINF:9.009,
http://media.example.com/second.tshttp://media.example.com/second.ts
#EXTINF:3.003,#EXTINF:3.003,
http://media.example.com/third.tshttp://media.example.com/third.ts
……...
在显示设备200进行点播播放时,只需按顺序(即first.ts、second.ts、third.ts等)下载上述媒资片段资源,依次进行播放即可。即根据HLS协议中的目录文件M3U8,依次请求下载音视频的媒资片段TS文件,将下载后的媒资片段TS文件合并,形成选定媒资的完整的媒体流,从而在显示设备200中播放媒资。其中,每个单独的媒资片段TS都可以独立播放,将各个媒资片段TS合并在一起,才可以形成一个完成的媒资。并且部分网站会对媒资片段TS文件进行加密。因此如果媒资片段TS文件被加密处理,还需要从目录文件M3U8文件拿到TS密钥,然后根据TS密钥将TS文件解密再进行下载。When the
然而在请求下载媒资片段TS文件的过程中,由于网络异常等原因,可能会导致某段媒资片段TS文件下载失败。因此,在下载HLS媒体文件时,可以自定义媒资片段TS文件的重试下载次数,降低媒资片段TS文件下载失败的可能性。但当重试次数耗尽或者部分TS片段解密失败时,显示设备200则不会再次重新下载失败的媒资片段TS文件,但是合并媒资片段TS的过程并不受影响,从而导致最终合并完成的视频播放不衔接,发生卡顿。并且一些老旧的显示设备200中包括下载软件以及播放器,由于下载软件的缺陷,如果某段媒资片段TS文件被请求下载超过一定的次数后,播放器也不再下载该媒资片段TS文件,直接下载下一段媒资片段TS文件。因此,如果选定媒资的某段媒资片段TS文件被请求下载超过一定次数,在播放过程中该媒资片段TS也会被直接跳过。媒资片段TS被跳过后,预计算的其他媒资片段TS文件的请求下载时间会出现误差,也会导致播放的媒资片段衔接出现问题,出现卡顿。However, during the process of requesting to download the TS file of a segment of media assets, the download of a TS file of a segment of media assets may fail due to reasons such as network anomalies. Therefore, when downloading the HLS media file, the number of retry downloads of the TS file of the media asset segment can be customized to reduce the possibility of failure to download the TS file of the media asset segment. However, when the number of retries is exhausted or some TS segments fail to be decrypted, the
基于此,为了提升用户的体验感,改善显示设备200在播放网络媒资出现卡顿的问题,本申请一些实施例提供了一种媒资播放方法。所述方法具体包括如下内容:Based on this, in order to improve user experience and improve the problem of the
获取用户输入的媒资播放指令。显示设备200可以获取用户输入的多种控制指令,其中,部分控制指令用于控制显示设备200进行媒资播放,被称为媒资播放指令。用户可以通过不同的交互方式或基于不同的用户界面输入媒资播放指令。在一些实施例中,显示设备200可以显示媒资推荐界面,以供用户在媒资推荐界面中选择要播放的推荐媒资项目。其中,媒资推荐界面是用户界面中的一种,可以包括至少一个媒资推荐选项。用户可以通过输入用于展示媒资推荐界面的控制指令,控制显示设备200显示媒资推荐界面。用于展示媒资推荐界面的控制指令可以通过多种方式完成输入。例如,用户可以通过显示设备200上的按键或显示设备200配套的控制装置100上的按键,调出媒资推荐界面。或者用户可以通过显示设备200配套的控制装置100输入开机指令,控制显示设备200开机,则显示设备200在接收到开机指令后可以运行操作系统的启动程序呈现首页界面。首页界面中可以包括多个推荐选项,即为一种媒资推荐界面。需要说明的是,显示设备200上所呈现的用户界面均需要与服务器400进行通信后,才能进行显示。Obtain the media asset playback instruction input by the user. The
在显示设备200显示媒资推荐界面的过程中,用户可以在媒资推荐界面输入媒资播放指令。例如,用户在媒资推荐界面中选中一个媒资进行播放时,显示设备200通常会跳转至媒资详情界面。如图7所示,在媒资详情界面中,可以包括与选中播放媒资相关的媒资说明信息,以及针对同一媒资内容的不同媒资选项,即图7中《媒资a》的剧集选项。用户可以通过显示设备200上的按键或显示设备200配套的控制装置100上的按键,通过方向键控制设置媒资详情界面的焦点光标进行移动。当用户将焦点光标移动至具体的剧集选项,比如图6中的第18集选项,按下“确认键”以后,控制显示设备200播放对应的媒资,此时显示设备200获取到用于播放该媒资的媒资播放指令。或者,当显示设备200支持触控交互操作时,用户可以通过触摸手势,点击界面中的第18集选项,也可以实现媒资播放指令的输入。又或者,当显示设备200内置智能语音系统时,用户可以通过输入语音进行交互。即用户可以通过输入“播放媒资a第18集”的语音指令,完成指定的媒资播放指令的输入。During the process of displaying the media asset recommendation interface on the
此外,在一些实施例中,还可以通过检测显示设备200当前的播放内容自动生成媒资播放指令。例如:可以监测显示设备200的播放内容,根据播放内容自动生成媒资播放指令。如图8所示,显示设备200正在播放某一连续剧媒资B的第3集,第3集的播放总时长为54分20秒。当检测到第3集播放完毕后,即进度条到达第54分20秒的位置后,显示设备200则自动生成播放该媒资B第4集的播放指令。In addition, in some embodiments, the media asset playing instruction may also be automatically generated by detecting the current playing content of the
显示设备200在接收到上述实施例中的媒资播放指令后,响应于所述媒资播放指令,获取待播放媒资的目录文件。在本申请一些实施例中,目录文件中含有多个媒资片段序号以及每个媒资片段序号对应的媒资片段的下载地址,即每个媒资片段序号与组成待播放媒资的媒资片段的信息相对应。After receiving the media asset playing instruction in the above embodiment, the
例如:某影片C的媒资片段对应有30个媒资片段序号,媒资片段序号为sequence+1、sequence+2、sequence+3依次递加至sequence+30。其中,媒资片段序号根据媒资片段的播放内容的顺序设置,即第一个播放的媒资片段序号为sequence+1,sequence+1对应的是影片C第一幕播放画面片段的下载地址;第二个播放的媒资片段序号为sequence+2,sequence+2对应的是影片C的sequence+1下一幕对应画面片段的下载地址;第三个播放的媒资片段序号为sequence+3,sequence+3对应的是影片C的sequence+2下一幕对应画面片段的下载地址;其余的媒资片段序号sequence+n也根据播放内容的顺序依次递加,直至sequence+30。For example: the media asset segment of a movie C corresponds to 30 media asset segment numbers, and the media asset segment numbers are sequence+1, sequence+2, and sequence+3, which are sequentially increased to sequence+30. Wherein, the sequence number of the media asset segment is set according to the order of the playback content of the media asset segment, that is, the sequence number of the first played media asset segment is sequence+1, and sequence+1 corresponds to the download address of the first scene of the movie C; The sequence number of the second played media clip is sequence+2, and sequence+2 corresponds to the download address of the next scene corresponding to sequence+1 of movie C; the sequence number of the third played media clip is sequence+3, sequence +3 corresponds to the download address of the next scene corresponding to the sequence+2 of movie C; the sequence+n of the remaining media clips is also incremented in sequence according to the order of the playing content, until sequence+30.
在获取待播放媒资的目录文件后,按照媒资片段序号请求媒资片段。由于待播放媒资由多个媒资片段组成,在播放媒资时,需要按照媒资播放内容的顺序下载媒资片段,以形成完整的媒资数据流。即根据目录文件中媒资片段序号对应的下载地址依次请求与下载对应的媒资片段。After obtaining the directory file of the media asset to be played, request the media asset segment according to the sequence number of the media asset segment. Since the media asset to be played is composed of a plurality of media asset fragments, when playing the media asset, the media asset fragments need to be downloaded in the order of the content of the media asset to form a complete media asset data stream. That is, according to the download addresses corresponding to the serial numbers of the media asset segments in the directory file, the media asset segments corresponding to the download are sequentially requested.
例如:某影片的媒资数据包括30段媒资片段,媒资片段序号根据媒资片段的播放内容的顺序设置。为了保证影片播放的的连贯性,根据媒资片段序号的数值从小到大排列请求下载对应的媒资片段。请求下载的媒资片段的起始序号为sequence+1,则下一个请求的媒资片段的序号为sequence+2,再下一个请求的媒资片段的序号为sequence+3,再下一个请求的媒资片段的序号为sequence+4,直到最后一个sequence+30。For example: the media asset data of a movie includes 30 media asset segments, and the sequence numbers of the media asset segments are set according to the order of the playing content of the media asset segments. In order to ensure the continuity of the video playback, requests to download the corresponding media asset segments are ordered according to the sequence numbers of the media asset segments from small to large. The initial sequence number of the media asset segment requested to be downloaded is sequence+1, then the sequence number of the next requested media asset segment is sequence+2, the sequence number of the next requested media asset segment is sequence+3, and the sequence number of the next requested media asset segment is sequence+3. The sequence number of the media asset segment is sequence+4, until the last sequence+30.
如图5所示,下载请求需要向服务器400发出。服务器400可以针对一个媒资在存储模块420中存储多个媒资数据,供显示设备200调用播放。例如,当显示设备200选中媒资中一个具体剧集,显示设备200可以向服务器400发送媒资获取请求,服务器400在接收到显示设备200的媒资缓存请求后,从存储模块420中提取对应的媒资数据,并将媒资数据反馈给显示设备200,以使显示设备200可以进行播放。As shown in FIG. 5 , the download request needs to be sent to the
由于在通常情况下,服务器400可以为多个显示设备200提供播放服务,导致连接服务器400的显示设备200数量众多。因此,当多个显示设备200对同一个媒资项目进行播放时,服务器400需要重复调用同一个媒资项目对应的媒资数据,使得服务器400执行了大量的重复工作。为此,在一些实施例中,服务器400中可以建立缓存机制,利用缓存机制在服务器400中对媒资片段数据进行缓存,以减少服务器400调用存储模块420的次数,从而提高媒资片段数据的获取速度。并且显示设备200每次向服务器400请求下载媒资片段都会消耗网络流量,通过缓存机制还可以节省流量的消耗。Usually, the
因此,在本申请一些实施例中,显示设备200可以创建本地代理服务,并按照网络媒资传输协议下载待播放媒资文件,然后将下载的所述待播放媒资文件缓存至所述本地代理服务。其中,本地代理服务用于供播放器获取待播放媒资的目录文件以及请求媒资片段;待播放媒资文件包括网络目录文件和网络媒资片段,网络媒资片段被设置有网络片段序号。通过将待播放媒资文件缓存至本地代理服务器中,可以节省流量的消耗,且提高待播放媒资文件的获取速度。Therefore, in some embodiments of the present application, the
在一些实施例中,按照网络媒资传输协议下载待播放媒资文件包括:解析所述待播放媒资文件,以获得所述网络目录文件和网络媒资片段。将所述网络目录文件中网络媒资片段对应的下载地址映射为本地代理服务中媒资片段的下载地址,为所述本地代理服务中的媒资片段标记媒资片段序号,以生成本地目录文件。其中,本地目录文件用于在控制器响应于媒资播放指令时,获取本地目录文件。例如:如图9所示,显示设备200中提供本地代理服务以及播放接口映射功能。当显示设备200向服务器400发出请求时,显示设备200首先根据选定的网络媒资数据的传输协议下载待播放媒资文件。其中,待播放媒资文件中的网络媒资片段也设置有网络片段序号,网络片段序号的设置原理等同于上述媒资片段序号。然后解析待播放媒资文件,获得网络目录文件和网络媒资片段。将网络目录文件中网络媒资片段对应的下载地址映射为本地代理服务中媒资片段的下载地址,并为本地代理服务中的媒资片段标记媒资片段序号,以生成本地目录文件。最后将本地目录文件与本地代理服务中的媒资片段存储到本地代理服务中的本地服务器。其中,本地媒资片段序号与对应的网络媒资片段序号可以为相同的序号,也可以为不同的序号。In some embodiments, downloading the media asset file to be played according to the network media asset transmission protocol includes: parsing the media asset file to be played to obtain the network directory file and the network media asset segment. Map the download address corresponding to the network media asset segment in the network directory file to the download address of the media asset segment in the local proxy service, mark the media asset segment sequence number for the media asset segment in the local proxy service, to generate a local directory file . Wherein, the local directory file is used to obtain the local directory file when the controller responds to the media asset playing instruction. For example: as shown in FIG. 9 , the
也就是说,在显示设备200进行点播播放时,显示设备200的下载请求对应请求的是本地代理服务器中的本地目录文件,并根据本地目录文件请求下载本地代理服务器中的媒资片段。即在一些实施例中,显示设备200首先向本地代理服务器发出下载请求,获取本地目录文件;然后根据本地目录文件解析媒资片段在本地代理服务中的本地下载地址,最后按照本地下载地址向本地代理服务请求媒资片段,并接收所述媒资片段。That is to say, when the
显示设备200发出下载请求的过程,可以通过设置媒资下载软件包,并由控制器250执行媒资下载软件包的方式实现。因此,在本申请一些实施例中,控制器250可以调用媒资下载软件开发包,并通过运行媒资下载软件开发包,代理网络媒资传输协议。然后根据媒资下载软件开发包提供的播放接口映射功能,按照所述网络媒资传输协议下载待播放媒资文件。其中,媒资下载软件包为软件开发工具包(Software Development Kit,SDK)一般是一些被软件工程师用于为特定的软件包、软件框架、硬件平台、操作系统等建立应用软件的开发工具的集合。在请求下载媒资片段时,媒资下载软件包向服务器400发出下载请求,服务器400响应下载请求,使媒资下载软件包代理媒资文件的全部HLS协议。媒资下载软件包根据网络媒资HLS协议中的传输协议以及目录文件,即可下载待播放媒资片段文件。The process of sending the download request by the
因此,当显示设备200中提供本地代理服务时,媒资下载软件开发包按照网络媒资传输协议下载待播放媒资文件的过程,请求的是本地目录文件。即在一些实施例中,控制器250首先控制播放器向媒资下载软件开发包的本地代理服务请求本地目录文件。然后接收所述本地目录文件,以及根据所述本地目录文件解析媒资片段在本地代理服务中的本地下载地址。最后按照所述本地下载地址向本地代理服务请求媒资片段,并接收所述媒资片段。即在一些实施例中,播放器会向媒资下载软件包SDK的本地代理服务器请求本地M3U8文件,并通过媒资下载软件包SDK返回本地M3U8文件。播放器根据本地M3U8文件,向媒资下载软件包SDK的本地代理服务器请求本地媒资片段。Therefore, when the local proxy service is provided in the
在一些实施例中,为了便于显示设备200请求媒资片段,显示设备200和服务器400可以搭建媒资下载请求的系统,如图11所示,图11为本申请一些实施例提供的下载请求示意图,显示设备200向服务器400发出下载请求的系统中包括源端、CDN中心服务器、CDN边缘服务器及终端四部分。在下载请求播放音视频的过程中,媒资数据通过是由源端发送给CDN中心服务器,CDN边缘服务器再从CDN中心服务器中获取到该媒资数据,并将媒资数据发送给终端的视频播放器,从而加快服务器400的响应速度。其中,CDN服务器是建立在网络上的内容分发网络,即上述实施例中所述的服务器400。依托布置在各地的边缘服务器,用户可以经过中央渠道的负载平衡、内容分发、调度等功用模块获取附近所需的内容,然后减少网络拥塞,加快用户拜访响应速度和提高命中率。为了解决不同的网络状况,经常会搭建到不同的服务器来访问网络,即CDN中心服务器与CDN边缘服务器。终端即为本申请实施例中的显示设备200,终端包括终端视频下载软件包和终端视频播放器。In some embodiments, in order to facilitate the
此外,在下载请求媒资片段的过程中,由于部分显示设备200在播放网络媒资会出现跳过某段媒资片段的情况,发生卡顿。因此,在一些实施例中,在缓存下载媒资片段的过程中,将当前请求的媒资片段序号与当前完成传输的媒资片段序号进行对比,相当于对媒资片段的下载顺序进行检查。如果当前请求的媒资片段序号不等于当前完成传输的媒资片段序号加1,说明本次下载过程存在被跳过的媒资片段,播放过程可能会产生卡顿,则重新计算缓存。In addition, during the process of downloading the requested media asset segments, because some
例如:在一次下载过程中,当前传输完成的媒资片段序号应为sequence+4,则当前请求的媒资片段序号应为sequence+(4+1),即sequence+5。但通过对比发现,当前请求媒资频段序号为sequence+6,则说明媒资片段序号为sequence+5的媒资片段在本次下载过程中被跳过了。如果响应当前sequence+6的下载请求,下载媒资片段序号为sequence+6的媒资片段,则会导致播放媒资的衔接出现问题。并且预计算的其他媒资片段,即还没请求下载的sequence+7、sequence+8等对应的媒资片段的缓存下载时间也会出现偏差,造成播放卡顿。For example: in a download process, the sequence number of the currently transmitted media asset segment should be sequence+4, and the sequence number of the currently requested media asset segment should be sequence+(4+1), that is, sequence+5. However, through comparison, it is found that the currently requested media asset segment number is sequence+6, which means that the media asset segment whose serial number is sequence+5 is skipped during this download process. If in response to the download request of the current sequence+6, the media asset segment whose sequence number is sequence+6 is downloaded, it will cause problems in the connection of playing media assets. In addition, the cache download time of other pre-calculated media asset segments, that is, sequence+7, sequence+8 and other media asset segments that have not yet been requested to download, will also deviate, causing playback freezes.
因此,在本申请一些实施例中,如果当前请求的媒资片段序号不等于当前完成传输的媒资片段序号加1,则重新计算缓存下载时间并向服务器400发出下载请求,使服务器400能够及时响应下载请求,从而补充对当前媒资片段的缓存。Therefore, in some embodiments of the present application, if the sequence number of the currently requested media asset segment is not equal to the sequence number of the currently transmitted media asset segment plus 1, the cache download time is recalculated and a download request is sent to the
例如:在一次下载过程中,当前传输完成的媒资片段序号为sequence+4,当前传请求的媒资片段序号为sequence+6,则说明媒资片段序号为sequence+5对应的媒资片段被跳过,则重新计算缓存,并向服务器400重新发出重新计算缓存请求。For example: in a download process, the sequence number of the currently transmitted media asset segment is sequence+4, and the sequence number of the currently requested media asset segment is sequence+6, which means that the media asset segment with the sequence number of the media asset segment sequence+5 is deleted. If it is skipped, the cache is recalculated, and a cache recalculation request is sent to the
同理,在缓存下载媒资片段的过程中,将当前请求的媒资片段序号与当前完成传输的媒资片段序号进行对比,如果当前请求的媒资片段序号等于当前完成传输的媒资片段序号加1,说明不存在被跳过的媒资片段。因此,在一些实施例中,如果当前请求的媒资片段序号等于当前完成传输的媒资片段序号加1,接收当前请求的媒资片段序号对应的媒资片段。并且在当前请求的媒资片段序号对应的媒资片段文件传输完毕后,更新当前完成传输的媒资片段序号,以便于在下一次请求时对比媒资片段序号。Similarly, in the process of caching and downloading media asset segments, compare the serial number of the currently requested media asset segment with the serial number of the currently transmitted media asset segment. If the serial number of the currently requested media asset segment is equal to the serial number of the currently completed media asset segment Add 1, indicating that there is no skipped media asset segment. Therefore, in some embodiments, if the serial number of the currently requested media asset segment is equal to the currently transmitted media asset segment serial number plus 1, the media asset segment corresponding to the currently requested media asset segment serial number is received. And after the media asset fragment file corresponding to the currently requested media asset fragment serial number is transmitted, update the currently transmitted media asset fragment serial number, so as to compare the media asset fragment serial number in the next request.
例如:当前请求的媒资片段序号为sequence+8,当前传输完成的媒资频段序号为sequence+7,则说明不存在被跳过的媒资片段,此时接收媒资片段序号为sequence+8的媒资片段。并且在sequence+8对应的媒资片段传输完毕后,将当前完成传输的媒资片段序号更新为sequence+8。For example: the sequence number of the currently requested media asset segment is sequence+8, and the sequence number of the currently transmitted media asset segment is sequence+7, indicating that there is no skipped media asset segment, and the sequence number of the received media asset segment is sequence+8 media fragments. And after the transmission of the media asset segment corresponding to sequence+8 is completed, the sequence number of the currently transmitted media asset segment is updated to sequence+8.
由以上技术方案可知,在上述实施例中,显示设备200可以通过对比当前请求的媒资片段序号和当前完成传输的媒资片段序号确定是否出现播放异常。如果当前请求的媒资片段序号不等于当前完成传输的媒资片段序号加1,说明当前请求的待播放媒资的媒资片段与实际所需媒资片段不符,则重新计算缓存,以补充对当前媒资片段的缓存,以解决显示设备播放网络媒资卡顿的问题。It can be known from the above technical solution that, in the above embodiment, the
在一些实施例中,显示设备200还可以对每次媒资片段请求操作的类型进行标记,并通过读取请求操作类型,确定是否需要重新计算缓存。其中,请求媒资片段的请求操作类型包括用户请求操作或非用户请求操作。用户请求操作为即为播放过程中用户做出的跳转、快进操作。例如:用户点播观看了某影片A,在影片A中含有用户不喜欢的篮球剧情,该用户则通过显示设备200配套的控制装置100上的按键拖动进度条,或者点击通过播放界面中的快进选项对影片A进行快进。显然,显示设备200应立刻响应用户的操作指令,将影片A快进。此时,如果继续对比当前请求的媒资片段序号与当前完成传输的媒资片段序号,会使响应速度过慢。因此,当用户请求操作时,显示设备200需要及时响应用户请求操作,进行快进。In some embodiments, the
基于此,如图10所示,显示设备200可以监测在请求媒资片段时的请求操作类型。如果请求操作类型为用户请求操作,设置请求动作标识为用户请求标识;如果请求操作类型为非用户请求操作,设置请求动作标识为非用户请求标识。当请求操作类型为用户请求操作时,需要及时响应用户操作,重新计算缓存,即请求动作标识为用户请求标识时重新计算缓存。当请求操作类型为非用户请求操作时,则继续对比当前请求的媒资片段序号和当前完成传输的媒资片段序号,以检测是否存在显示设备200自动跳过的媒资片段。其中,可以通过在显示设备200中设置用户操作接口,感知用户的操作动作,以区分并标识操作类型。Based on this, as shown in FIG. 10 , the
例如:将用户请求操作标识为userseek=1,或请求命中的userseek项被标识。同理,将非用户请求操作标识为userseek=0,或请求命中的userseek项未被标识。在显示设备200播放时,用户做出快进的操作,则将显示设备200发出的请求标识为userseek=1。当检测到userseek=1的标识时,则重新计算缓存,重新向服务器400发出下载请求,以使显示设备200可以快速响应用户的操作请求,快进或跳转到指定位置。For example: the user request operation is identified as usersseek=1, or the userseek item hit by the request is identified. Similarly, the non-user request operation is identified as usersseek=0, or the userseek item hit by the request is not identified. When the
此外,考虑到非用户请求操作中包括显示设备200的播放器由于某段媒资片段的下载次数达到一定次数后跳过该段媒资片段的情况。因此,可以根据媒资片段的请求次数判断是否存在播放器跳过媒资片段的情况,从而快速的区分出非用户请求操作中播放器跳过媒资片段的情况。In addition, it is considered that the player of the
由于当出现播放器自动跳过的情况时,也需要重新计算缓存。因此,在一些实施例中,监测非用户请求操作的标识,如果请求动作标识为非用户请求标识,则获取当前媒资片段序号的重复请求次数。并且根据显示设备200的播放器自身特性设置阈值,如果播放器在媒资片段重复请求N次时,在下载请求时就会跳过该段媒资片段,则设置阈值为N。为了便于判断,可以设置请求次数阈值为小于或等于每个媒资片段的最大请求次数。例如:某显示设备200在下载同一段媒资片段超过10次后,会跳过该段媒资片段、直接下载下一段媒资片段,则将阈值设置为8。在获取所述重复请求次数后,如果重复请求次数大于或等于预设阈值,则设置请求动作标识为播放器请求标识。在检测到请求动作标识为播放器请求标识时,说明本次下载过程中存在被跳过的媒资片段,直接重新计算缓存,加快响应速度。Because when the player automatically skips the situation, the cache also needs to be recalculated. Therefore, in some embodiments, the identification of the non-user request operation is monitored, and if the request action identification is a non-user request identification, the number of repeated requests of the current media asset segment number is obtained. And set the threshold according to the player's own characteristics of the
例如:将非用户请求操作标识为userseek=0,将播放器请求标识为playerseek=1,预设的请求次数阈值为8。在显示设备200请求下载媒资片段sequence+1时,检测到请求下载媒资片段sequence+1的请求标识为userseek=0,说明当前请求的请求操作类型为非用户操作,则获取请求媒资片段sequence+1的重复请求次数。获取的sequence+1重复请求次数为9,说明显示设备200会直接跳过媒资片sequence+1段,可能会直接下载媒资片段sequence+2,则将请求动作标识为播放器请求标识,即playerseek=1。因此,在检测到播放器请求标识playerseek=1时,则重新计算缓存,避免卡顿。For example: the non-user request operation is identified as usersseek=0, the player request is identified as playerseek=1, and the preset request times threshold is 8. When the
在重新缓存时,会向服务器400重新发出请求,但重新发出的请求中的请求动作标识可能会再次触发重新计算缓存。例如:将用户请求操作标识为userseek=1。在显示设备200播放时,用户做出快进的操作,则将显示设备200发出的请求标识为userseek=1。当检测到请求中包括userseek=1的标识时,重新计算缓存,并重新向服务器400发出下载请求。但由于重新发出的请求中还包括userseek=1的标识,当检测到重新发出的请求中包括userseek=1的标识时,会再次触发重新计算缓存。When re-caching, a request will be re-issued to the
为了避免请求动作标识再次触发重新计算缓存的情况,在一些实施例中,在重新计算缓存时,将所述请求动作标识清除。In order to avoid the situation that the request action identifier triggers recalculation of the cache again, in some embodiments, the request action identifier is cleared when the cache is recalculated.
例如:将用户请求操作标识为userseek=1,将非用户请求操作标识为userseek=0,将播放器请求标识为playerseek=1。当前请求媒资片段为sequence+9,当检测到当前请求的操作标识为userseek=1时,则说明当前请求为用户操作,则重新计算缓存,并清除操作标识userseek=1,并向服务器400再次发出缓存请求;当检测到当前请求的操作标识为playerseek=1时,则说明当前请求为播放器操作,则重新计算缓存,并清除操作表示playerseek=1,并向服务器400再次发出缓存请求;当检测到当前请求的操作标识为userseek=0时,说明当前请求为非用户操作,将当前请求的媒资片段序号sequence+9与当前完成传输的媒资片段序号进行对比,如果当前完成传输的媒资片段序号不是sequence+8,则重新计算缓存,并清除操作表示userseek=0,并向服务器400再次发出缓存请求。For example: the user request operation is identified as usersseek=1, the non-user request operation is identified as usersseek=0, and the player request is identified as playerseek=1. The currently requested media asset segment is sequence+9, when it is detected that the operation identifier of the current request is usersseek=1, it means that the current request is a user operation, then recalculate the cache, clear the operation identifier usersseek=1, and send the request to the
此外,在重新缓存时后,由于已经重新计算缓存,需要将当前完成传输的媒资片段序号重置为初始值。例如:在一次下载过程中,媒资片段序号的初始值为sequence-1,当前传输完成的媒资片段序号为sequence+4,当前传请求的媒资片段序号为sequence+6不等于当前传输完成的媒资片段序号为sequence+(4+1),则重新计算缓存,并且将当前完成传输的媒资片段序号sequence+4重置为sequence-1。In addition, after re-caching, since the cache has been recalculated, it is necessary to reset the serial number of the currently transmitted media asset segment to the initial value. For example: in a download process, the initial value of the sequence number of the media asset segment is sequence-1, the sequence number of the currently transmitted media asset segment is sequence+4, and the sequence number of the currently requested media asset segment is sequence+6, which does not mean that the current transmission is completed If the sequence number of the media asset fragment is sequence+(4+1), the cache is recalculated, and the sequence+4 of the currently transmitted media asset fragment is reset to sequence-1.
基于上述实施例中提供的媒资播放方法,在本申请的部分实施例中还提供一种显示设备200。如图8所示,所述显示设备200包括:显示器260以及与显示器260连接的控制器250。其中,控制器被配置为执行以下程序步骤:Based on the media asset playing method provided in the foregoing embodiments, a
与所述显示器连接的控制器,被配置为:a controller connected to said display, configured to:
响应于媒资播放指令,获取待播放媒资的目录文件,所述目录文件中包括多个媒资片段序号,所述媒资片段序号用于表征组成所述待播放媒资的媒资片段;Responding to the media asset playback instruction, obtain a directory file of the media asset to be played, the directory file includes a plurality of media asset segment numbers, and the media asset segment numbers are used to represent the media asset segments that make up the media asset to be played;
按照所述媒资片段序号请求媒资片段;request the media asset segment according to the sequence number of the media asset segment;
对比当前请求的媒资片段序号和当前完成传输的媒资片段序号;Compare the sequence number of the currently requested media asset segment with the sequence number of the currently transmitted media asset segment;
如果所述当前请求的媒资片段序号不等于所述当前完成传输的媒资片段序号加1,重新计算缓存,以补充对当前媒资片段的缓存。If the sequence number of the currently requested media asset segment is not equal to the sequence number of the currently transmitted media asset segment plus 1, the cache is recalculated to supplement the cache of the current media asset segment.
由以上技术方案可知,本申请一些实施例提供的显示设备200可以响应于媒资播放指令,自动向服务器400获取待播放媒资的目录文件以及在获取目录文件后,按照目录文件中的媒资片段序号请求媒资片段。并且在请求媒资片段的过程中,对比当前请求的媒资片段序号和当前完成传输的媒资片段序号。如果当前请求的媒资片段序号不等于当前完成传输的媒资片段序号加1,说明当前请求的待播放媒资的媒资片段与实际所需媒资片段不符,则重新计算缓存,以补充对当前媒资片段的缓存,解决了传统显示设备200播放网络媒资卡顿的问题。It can be known from the above technical solutions that the
本申请提供的实施例之间的相似部分相互参见即可,以上提供的具体实施方式只是本申请总的构思下的几个示例,并不构成本申请保护范围的限定。对于本领域的技术人员而言,在不付出创造性劳动的前提下依据本申请方案所扩展出的任何其他实施方式都属于本申请的保护范围。The similar parts between the embodiments provided in the present application can be referred to each other, and the specific implementations provided above are only a few examples under the general concept of the present application, and do not constitute a limitation of the protection scope of the present application. For those skilled in the art, any other implementations expanded based on the proposal of the present application without creative work shall fall within the scope of protection of the present application.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210922172.9ACN115270030A (en) | 2022-08-02 | 2022-08-02 | Display device and media asset playing method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210922172.9ACN115270030A (en) | 2022-08-02 | 2022-08-02 | Display device and media asset playing method |
| Publication Number | Publication Date |
|---|---|
| CN115270030Atrue CN115270030A (en) | 2022-11-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210922172.9APendingCN115270030A (en) | 2022-08-02 | 2022-08-02 | Display device and media asset playing method |
| Country | Link |
|---|---|
| CN (1) | CN115270030A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119420978A (en)* | 2024-01-03 | 2025-02-11 | 聚好看科技股份有限公司 | Display device and media resource playing method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106201178A (en)* | 2016-06-29 | 2016-12-07 | 深圳市金立通信设备有限公司 | A kind of adjustment screen display direction control method and terminal |
| CN107864382A (en)* | 2017-10-24 | 2018-03-30 | 广东省南方数字电视无线传播有限公司 | Video broadcasting method, device and system |
| CN107864406A (en)* | 2017-10-24 | 2018-03-30 | 广东省南方数字电视无线传播有限公司 | Time shift video broadcasting method, device and system |
| CN113168298A (en)* | 2018-12-27 | 2021-07-23 | 深圳市柔宇科技股份有限公司 | Control method and display terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106201178A (en)* | 2016-06-29 | 2016-12-07 | 深圳市金立通信设备有限公司 | A kind of adjustment screen display direction control method and terminal |
| CN107864382A (en)* | 2017-10-24 | 2018-03-30 | 广东省南方数字电视无线传播有限公司 | Video broadcasting method, device and system |
| CN107864406A (en)* | 2017-10-24 | 2018-03-30 | 广东省南方数字电视无线传播有限公司 | Time shift video broadcasting method, device and system |
| CN113168298A (en)* | 2018-12-27 | 2021-07-23 | 深圳市柔宇科技股份有限公司 | Control method and display terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119420978A (en)* | 2024-01-03 | 2025-02-11 | 聚好看科技股份有限公司 | Display device and media resource playing method |
| Publication | Publication Date | Title |
|---|---|---|
| US20240267581A1 (en) | Systems, methods, and media for presenting media content | |
| US20210200537A1 (en) | Distributed cross-platform application projection management and delivery | |
| US20120254929A1 (en) | Content Extraction for Television Display | |
| US11711589B2 (en) | Method and apparatus for peripheral context management | |
| EP3474559B1 (en) | Smart-television playback method and apparatus | |
| US20110302603A1 (en) | Content output system, content output method, program, terminal device, and output device | |
| KR20120067341A (en) | Method and device for providing complementary information | |
| CN115270030A (en) | Display device and media asset playing method | |
| CN112269668A (en) | Application resource sharing and display equipment | |
| WO2021139045A1 (en) | Method for playing back media project and display device | |
| CN114915810B (en) | Media resource pushing method and intelligent terminal | |
| EP2947843B1 (en) | Server apparatus, display apparatus, system, and controlling methods thereof | |
| CN114915818B (en) | A method for pushing media assets and an intelligent terminal | |
| CN113992963A (en) | Display device and screen projection method | |
| KR20150090027A (en) | Intelligent remote control for digital television | |
| CN117812341A (en) | Display equipment and media asset playing method | |
| WO2022033153A1 (en) | Display method and display device | |
| CN118042215A (en) | Playback apparatus and channel switching method | |
| CN116033195A (en) | How to obtain the server and details page | |
| CN115834944A (en) | Multimedia content sharing method, device and electronic device | |
| CN115604496A (en) | Display device, live broadcast channel switching method and storage medium | |
| CN117812387A (en) | Display equipment and streaming media playing method | |
| CN119420978A (en) | Display device and media resource playing method | |
| CN117812345A (en) | Display equipment and playing method of interactive media assets | |
| CN117812414A (en) | Display equipment and video recording method of multipath media assets |
| 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 |