Display device and media playing method
By generating a private protocol and playback proxy, the compatibility issue of cross-platform media asset playback on display devices is resolved, enabling efficient transmission of streaming media data and data sharing between players, thereby improving the compatibility and efficiency of the playback system.
Patent Information
- Application Number
- CN202311509273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-11-14
AI Technical Summary
When display devices play media assets across platforms, the incompatibility between the playback proxy and the operating system can prevent them from acquiring streaming media data, thus reducing the compatibility of the playback system.
By generating a private protocol and playback proxy based on the language supported by the display device's operating system, streaming media data is downloaded and stored in the playback proxy's internal cache. The data is then transmitted to the player's internal cache via the private protocol for playback, avoiding direct transmission using the HTTP protocol.
It achieves cross-platform media asset playback compatibility, improves streaming media data transmission efficiency, and ensures data sharing between the player and the playback agent.
Smart Images

Figure CN118828047B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of display devices, and in particular to a display device and a media asset playing method. BACKGROUND
[0002] A display device is an intelligent device capable of presenting a user interface and supporting user interaction. Taking a smart television as an example, the smart television is based on Internet application technology, has an open operating system and a chip, has an open application platform, and has a bidirectional man-machine interaction function, and integrates audio, entertainment, data and other functions into one, so as to meet the diversified and personalized needs of users. The display device is built-in with a playing system, and the display device can play media asset data through the playing system to display media asset pictures in response to a media asset playing operation of a user.
[0003] The playing system can include a playing agent. When the display device needs to access media assets on an external network or needs to communicate and interact with different devices or platforms, the playing agent is used. The playing agent can solve network access, data transmission and format compatibility and other problems, so that the display device can smoothly play various media asset contents. For example, after the playing agent obtains streaming media data, a uniform resource locator (URL) of a local agent is returned, and then the URL is set to the player in the form of a data source to start playing the media asset.
[0004] However, when the display device or the platform does not support the programming language of the playing agent, the playing agent cannot be used, which causes the display device to be unable to obtain streaming media data through the playing agent, and the playing system cannot be used across platforms. For example, the playing agent is programmed in JAVA language, and JAVA language cannot be used on IOS and other platforms, so that the display device cannot realize media asset playing across IOS platforms, and the compatibility of the playing process is reduced. SUMMARY
[0005] Some embodiments of the present application provide a display device and a media asset playing method to solve the problem that the playing system cannot be used across platforms.
[0006] In one aspect, some embodiments of the present application provide a display device, comprising a display and a controller. The display is configured to display a user interface, and the controller is configured to perform the following program steps:
[0007] In response to a media asset playing instruction, a media asset identifier of a media asset to be played is obtained;
[0008] The streaming media data of the to-be-played media asset is downloaded by a playing agent according to the media asset identifier, and the media asset identifier is set as a data source to a player based on a private protocol, and the private protocol and the playing agent are generated based on a language supported by an operating system of the display device;
[0009] The streaming media data is stored into a first cache, and the first cache is an internal cache of the playing agent;
[0010] The streaming media data in the first cache is transmitted into a second cache based on the private protocol to form playing data, and the second cache is an internal cache of the player;
[0011] The player is controlled to play the playing data based on the second cache.
[0012] In another aspect, some embodiments of the present application also provide a media asset playing method applied to the display device, and the media asset playing method comprises:
[0013] A media asset identifier of a to-be-played media asset is acquired in response to a media asset playing instruction;
[0014] The streaming media data of the to-be-played media asset is downloaded by a playing agent according to the media asset identifier, and the media asset identifier is set as a data source to a player based on a private protocol, and the private protocol and the playing agent are generated based on a language supported by an operating system of the display device;
[0015] The streaming media data is stored into a first cache, and the first cache is an internal cache of the playing agent;
[0016] The streaming media data in the first cache is transmitted into a second cache based on the private protocol to form playing data, and the second cache is an internal cache of the player;
[0017] The player is controlled to play the playing data based on the second cache.
[0018] According to the technical solution, the display device and the media asset playing method can acquire the media asset identifier of the media asset to be played in response to a media asset playing instruction, download streaming media data of the media asset to be played according to the media asset identifier by using a playing agent, and set the media asset identifier as a data source to a player based on a private protocol, wherein the private protocol and the playing agent are generated based on a language supported by a display device operating system. The streaming media data is stored in a first cache of the playing agent. The streaming media data in the first cache is transmitted to a second cache of the player based on the private protocol to form playing data, so that the player plays the playing data based on the second cache. The method can directly read the cache of the playing agent by using the private protocol, so that the cache data is directly shared to the player. The player and the playing agent do not need to transmit the streaming media data by using an http protocol. Moreover, the private protocol and the playing agent are generated based on the language supported by the display device operating system, so that cross-platform use can be implemented, and platform compatibility problems can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0020] Figure 1 The schematic diagram of the operation scene between the display device and the control device provided by some embodiments of the present application is shown.
[0021] Figure 2 The schematic diagram of the hardware configuration of the display device provided by some embodiments of the present application is shown.
[0022] Figure 3 The schematic diagram of the hardware configuration of the control device provided by some embodiments of the present application is shown.
[0023] Figure 4 The schematic diagram of the software configuration of the display device provided by some embodiments of the present application is shown.
[0024] Figure 5 The schematic diagram of the media asset playing process provided by some embodiments of the present application is shown.
[0025] Figure 6 The schematic diagram of the media asset cache process provided by some embodiments of the present application is shown.
[0026] Figure 7 The schematic diagram of the P2P network structure provided by some embodiments of the present application is shown.
[0027] Figure 8A playing flowchart based on a playing agent provided for some embodiments of the present application;
[0028] Figure 9 A media asset playing method flowchart provided for some embodiments of the present application;
[0029] Figure 10 A media asset list interface provided for some embodiments of the present application;
[0030] Figure 11 A flowchart of downloading a streaming media data according to a platform type provided for some embodiments of the present application;
[0031] Figure 12 A flowchart of caching a streaming media data provided for some embodiments of the present application;
[0032] Figure 13 A playing system structure provided for some embodiments of the present application;
[0033] Figure 14 A timing relationship diagram of a media asset playing method provided for some embodiments of the present application. DETAILED DESCRIPTION
[0034] The embodiments will be described in detail with reference to the drawings, wherein the same reference numerals refer to the same or similar elements throughout. The following description is made with reference to the accompanying drawings in which the same or similar components are referred to with the same reference numerals. The following description of the embodiments is not representative of all possible embodiments consistent with the present application. Rather, it is merely an example of a system and method consistent with some aspects of the present application as detailed in the claims.
[0035] It should be noted that the brief description of terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0036] The terms "first", "second", "third", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar or like objects or entities, and do not necessarily mean a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchanged under appropriate circumstances.
[0037] The terms "include" and "have" and any variations thereof are intended to cover but not exclusive inclusion, for example, a product or device including a series of components does not necessarily limit to all components clearly listed, but can include other components not clearly listed or inherent to these products or devices.
[0038] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software codes that can perform the function related to the element.
[0039] Figure 1 The schematic diagram of the operation scenario between the display device and the control device is provided for some embodiments of the present application. As shown in Figure 1 The user can operate the display device 200 through the touch operation, the mobile terminal 300 and the control device 100. The control device 100 can be a remote controller, a touch pen, etc.
[0040] In some embodiments, the mobile terminal 300 can install a software application on the display device 200, implement the connection communication through the network communication protocol, and achieve the one-to-one control operation and the data communication purpose. The audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 to achieve the synchronous display function.
[0041] As shown in Figure 1 It is also shown in that the display device 200 also communicates data with the server 400 through various communication modes. The display device 200 can be allowed to communicate and connect through the local area network (LAN), the wireless local area network (WLAN) and other networks.
[0042] In addition to providing the broadcast receiving television function, the display device 200 can also provide the intelligent network television function of computer support function, including but not limited to, the network television, the smart television, the Internet protocol television (IPTV), etc.
[0043] Figure 2 The hardware configuration block diagram of the display device 200 is provided in Figure 1 The hardware configuration block diagram of the display device 200 is provided in
[0044] In some embodiments, the display device 200 includes at least one of a tuning demodulator 210, a communicator 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, a user interface.
[0045] In some embodiments, the detector 230 is used to collect the signal of the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the ambient light intensity; or the detector 230 includes an image collector such as a camera, which can be used to collect the external environment scene, the attribute of the user or the user interaction gesture, or the detector 230 includes a sound collector such as a microphone, etc., which is used to receive the external sound.
[0046] In some embodiments, the display 260 includes a display screen component for presenting a picture, and a driving component for driving the image display, for receiving an image signal from the controller output, for displaying video content, image content, and menu control interface component, and user control UI interface, etc.
[0047] In some embodiments, the communicator 220 is a component for communicating with the external device or the server 400 according to various communication protocol types. The display device 200 can be provided with multiple communicators 220 according to different supported communication manners. For example, when the display device 200 supports wireless network communication, the display device 200 can be provided with a communicator 220 containing WiFi function. When the display device 200 supports Bluetooth connection communication, the display device 200 needs to be provided with a communicator 220 containing Bluetooth function.
[0048] The communicator 220 can make the display device 200 and the external device or the server 400 in communication connection through wireless or wired connection. The wired connection can connect the display device 200 and the external device through data line, interface, etc. The wireless connection can connect the display device 200 and the external device through wireless signal or wireless network. The display device 200 can directly establish connection relationship with the external device, or indirectly establish connection relationship through gateway, route, connection device, etc.
[0049] In some embodiments, the controller 250 includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, a first interface to an n-th interface for input / output, and the controller 250 controls the operation of the display device and responds to the user's operation through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200.
[0050] In some embodiments, the controller 250 and the tuner demodulator 210 can be located in different split devices, i.e. the tuner demodulator 210 can also be in an external device of the main device where the controller 250 is located, such as an external set-top box, etc.
[0051] In some embodiments, the user can input user commands in the graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input commands through the graphical user interface (GUI).
[0052] In some embodiments, the user interface 280 is an interface that can be used to receive control input.
[0053] Figure 3 The hardware configuration block diagram of the control device in some embodiments of the present application is provided. Figure 1 In some embodiments of the present applicationFigure 3 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface, a memory, a power supply.
[0054] The control device 100 is configured to control the display device 200, and can receive the user's input operation instructions, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, and play a role of an intermediary in the interaction between the user and the display device 200.
[0055] In some embodiments, the control device 100 can be a smart device. For example, the control device 100 can install various applications for controlling the display device 200 according to the user's needs.
[0056] In some embodiments, as shown Figure 1 As shown, the mobile terminal 300 or other smart electronic device can play a similar function of the control device 100 after installing the application for controlling the display device 200.
[0057] The controller 110 includes a processor 112 and a RAM 113 and a ROM 114, a communication interface 130, and a communication bus. The controller 110 is used to control the operation and operation of the control device 100, and the communication and cooperation between the internal components, and the data processing function of the external and internal.
[0058] The communication interface 130 realizes the communication of control signals and data signals between the display device 200 under the control of the controller 110. The communication interface 130 can include at least one of a WiFi chip 131, a Bluetooth module 132, an NFC module 133, and other near field communication modules.
[0059] The user input / output interface 140, wherein the input interface includes at least one of a microphone 141, a touchpad 142, a sensor 143, a key 144, and other input interfaces.
[0060] In some embodiments, the control device 100 includes at least one of the communication interface 130 and the input / output interface 140. The control device 100 is configured with a communication interface 130, such as a WiFi, Bluetooth, NFC module, which can encode the user input instructions through a WiFi protocol, or a Bluetooth protocol, or an NFC protocol, and send them to the display device 200.
[0061] The memory 190 is used to store various running programs, data and applications for driving and controlling the control device 100 under the control of the controller. The memory 190 can store various control signal instructions input by the user.
[0062] The power supply 180 is used to provide operating power support for each element of the control device 100 under the control of the controller.
[0063] As Figure 4 In some embodiments, the system is divided into four layers, from top to bottom, the Applications layer (referred to as "application layer" for short), the Application Framework layer (referred to as "framework layer" for short), the Android runtime and system library layer (referred to as "system runtime library layer" for short), and the kernel layer.
[0064] In some embodiments, at least one application program is running in the application layer, which can be a window program, a system setting program or a clock program provided by the operating system, or an application program developed by a third-party developer. In specific implementation, the application package in the application layer is not limited to the above examples.
[0065] The framework layer provides application programming interface (API) and programming framework for the application program. The application framework layer includes some pre-defined functions. The application framework layer is equivalent to a processing center, which decides the action of the application program in the application layer. The application program can access the resources in the system and obtain the services of the system through the API interface in the execution.
[0066] As Figure 4 As shown in the figure, the application framework layer in the embodiment of the application includes a view system, managers, a content provider, etc., wherein the view system can design and implement the interface and interaction of the application program, and the view system includes lists, grids, text boxes, buttons, etc. The managers include at least one of the following modules: an activity manager for interacting with all activities running in the system; a location manager for providing access to system location services for system services or application programs; a package manager for retrieving various information related to the application package currently installed on the device; a notification manager for controlling the display and clearing of notification messages; a window manager for managing icons, windows, toolbars, wallpapers and desktop components on the user interface.
[0067] In some embodiments, the activity manager is used to manage the life cycle of individual applications and general navigation back function, such as controlling the exit, open, back, etc. of the application. The window manager is used to manage all window programs, such as obtaining the size of the display screen, determining whether there is a status bar, locking the screen, intercepting the screen, controlling the display window change (for example, reducing the display window, shaking the display, twisting the display).
[0068] In some embodiments, the system library layer provides support for the upper layer, i.e. the framework layer. When the framework layer is used, the Android operating system runs the C / C++ library contained in the system library layer to realize the function of the framework layer.
[0069] In some embodiments, the kernel layer is the layer between hardware and software. As shown in Figure 4 The kernel layer at least contains 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, pressure sensor, etc.), and power supply driver, etc.
[0070] Based on the above display device 200, the user can control the display device 200 to play multimedia resources (referred to as media resources). The display device 200 can include media file identification and reading, decoding, rendering, output, and other processing procedures during the playing of media resources. For example, as shown in Figure 5 When the user selects to play a video file, the system of the display device 200 will first identify the file and read its metadata and encoding information. Next, the system will use a suitable decoder to decode the media file. The role of the decoder is to restore compressed audio, video, and image data into original image and sound data. The decoded image and sound data will be sent to the rendering engine for rendering. The rendering engine will convert the image data into a format that the display 260 of the display device 200 can display, and convert the sound data into a format that can be played through the loudspeaker or sound equipment. The rendered image and sound data will be sent to the display 260 and the sound system for output, so that the display device 200 plays the media content.
[0071] In some embodiments, the display device 200 will also perform some optimization and adjustment to ensure the smoothness and clarity of video playback. For example, the display device 200 will adjust the decoding and rendering parameters according to the screen resolution and the performance of the controller 250 to obtain the best playback effect. In addition, the display device 200 will also perform cache processing on the video file to reduce the reading and decoding time and improve the smoothness of the playback.
[0072] In the process of playing the media asset, the display device 200 can implement media asset file recognition and reading, decoding, rendering, outputting, and other processing procedures through the configured functional modules. For example, the kernel layer of the display device 200 can be configured with a player (Media player) that supports multimedia playing components and can play multiple audio and video formats. Meanwhile, the player provides some control interfaces, such as pause, play, fast forward, and other function interfaces. These interfaces can be connected to the application layer through the framework layer and the application to control the media playing process.
[0073] The player of the display device 200 can support playing of multiple audio and video formats, such as MP3, MP4, AVI, WMA, and the like. The player can provide a rich set of interfaces to allow developers to control the playing, such as starting, pausing, stopping, fast forwarding, and fast rewinding. The display device 200 can use the application of the Media Player to call the control interface, so that the user can freely control the media playing progress. The player also supports adjustment of the volume and the playing speed, so that the user can adjust the media playing effect according to the needs through the playing application. In addition, the player can also support callback functions and event processing, for example, the player can support callback after playing, which enables the developer to perform some subsequent processing operations after the media playing is completed, including media asset caching, media asset continuous playing, automatic stopping, and the like.
[0074] In some embodiments, the player is also configured with a cache space, which is a part of the memory space and is a storage space specially configured for the player by the display device 200. The cache space is configured in the player in the form of a frame buffer, and can be used to alleviate the problem of inconsistent arrival speed and departure speed of data. For example, as shown in FIG. 8, for media asset data from the network, the network speed is not always uniform, and sometimes there is a phenomenon of lag. Therefore, in order to alleviate the influence of network lag on the media playing process, the player establishes a buffer when playing the video. The display device 200 can store the network downloaded media asset data in the buffer first, and then start playing after the buffer contains a certain amount of data. In this way, the buffer can uniformly release stable media asset data, so that the media asset can be played smoothly. Figure 6
[0075] The media data played by the display device 200 can include a variety of data sources. For example, the media data played by the display device 200 can be locally stored data or data provided by a signal source connected to the display device 200. In some embodiments, the display device 200 can connect to a media server through the communicator 220, and the media server can store media data. The display device 200 can send a media acquisition request to the media server to acquire media data. After receiving the media acquisition request, the media server can feed back the media data to the display device 200. Since the media data has a certain amount of data, the media server needs to send streaming media data to the display device 200 to continuously send the media data to the display device 200.
[0076] In some embodiments, the display device 200 can also establish a communication connection with other terminal devices through the communicator 220, and acquire media data from the terminal devices based on peer-to-peer (P2P) network technology. As shown in FIG. 2B, in a P2P network, each node (i.e., each user) can act as a server and a client, and nodes can directly exchange data and services without the need for a central server. In P2P video playback, when the display device 200 requests to play a video, the request is sent to the P2P network. Other user nodes (terminal devices) in the network respond to the request and send video segments they own to the display device 200. The display device 200 can simultaneously receive media segments from multiple terminal device nodes and assemble and play them locally. Figure 7
[0077] The above-mentioned methods of acquiring media data through servers and terminal devices can realize network-based media playback. In the process of network-based media playback, in order to adapt to different servers or terminal devices and enable the display device 200 to acquire media data, the display device 200 can also be configured with a playback proxy service in some embodiments. As shown in FIG. 2C, a playback proxy is an intermediate service between a player and a media server, which is responsible for receiving requests from the player, connecting to a video server to acquire media data, and then forwarding the media data to the player. For example, the playback proxy can be a CDN proxy tool. The CDN proxy tool can proxy play through the servers of a content delivery network (CDN), which can accelerate video loading speed and improve playback smoothness. Figure 8
[0078] When the playback agent is used, the display device 200 can solve the problems of network access, data transmission and format compatibility through the playback agent, so that the display device 200 can smoothly play various media content. For example, after the playback agent obtains the streaming media data, a uniform resource locator (URL) of a local agent is returned, and then the URL is set to the player in the form of a data source to start playing the media.
[0079] The playback agent can be an independent service or customized by an application calling the player. Since the playback agent is not made by the developer of the control system of the display device 200, there may be a problem of incompatibility between the playback agent and the operating system. For example, the playback agent is written in JAVA language, and the operating system of the display device 200 is an IOS platform. Since JAVA language cannot be used on IOS and other platforms, the display device 200 does not support the programming language of the playback agent. At this time, the playback agent cannot be used, which causes the display device to be unable to obtain streaming media data through the playback agent, so that the playback system cannot be used across platforms, reducing the compatibility of the playback process.
[0080] In addition, in order to transmit media data, a specific data transmission protocol is needed between the playback agent and the player to complete data transmission. For example, the playback agent can download streaming media data through the http protocol and transmit the streaming media data to the player through the http protocol, so that the player can obtain the streaming media data for media playback. However, since the http protocol is an application layer protocol for distributed, collaborative and hypermedia information systems, it is applied to the Internet and needs to be based on the TCP / IP protocol stack to transmit data, so the efficiency of streaming media data transmission is low.
[0081] In order to improve the compatibility of the media playback system to the platform, a media playback method is provided in some embodiments of the present application, which can be applied to the display device 200 to change the service architecture of the built-in playback system of the display device 200 and realize cross-platform playback. In order to implement the media playback method, the display device 200 should at least include a display 260 and a controller 250. The display 260 is configured to display a user interface; as shown in the figure, the controller 250 is configured to execute the program steps corresponding to the media playback method, including the following contents: Figure 9
[0082] S100: In response to a media playback instruction, obtaining a media identifier of media to be played.
[0083] During the running of the display device 200, the display device 200 can receive a plurality of control instructions input by a user, wherein a control instruction for playing media content data is referred to as a media content playing instruction. The user can input the media content playing instruction based on a specific interactive action. In some embodiments, the user can input the media content playing instruction through a control apparatus 100, such as a remote controller, which is matched with the display device 200. For example, as shown in FIG. 2, the display device 200 can display a media content list interface, and the media content list interface can include at least one media content item. The user can control the focus cursor to move through the direction keys on the remote controller. When the focus cursor is located on any media content item, and the user presses the "confirm" key on the remote controller, the user can input the media content playing instruction, that is, control the display device 200 to play the media content corresponding to the media content item on which the focus cursor is located. Figure 10
[0084] According to different interactive modes supported by the display device 200, the user can also input the media content playing instruction based on other interactive modes. For example, for the display device 200 supporting touch interactive operation, the user can input the media content playing instruction by touching and clicking the media content item. For the display device 200 supporting voice interactive operation, the user can input the media content playing instruction by inputting the voice "play × ×".
[0085] The media content playing instruction can also not be input by the user, but the display device 200 automatically completes the input by judging the running state. For example, for the display device 200 setting a boot signal source, when the user inputs a boot instruction, the display device 200 can automatically play the media content data corresponding to the boot signal source based on the boot process, that is, the media content playing instruction can be automatically generated and input through the boot process.
[0086] The media content playing instruction can also be input by an application on the display device 200. In some embodiments, for the applications installed on the display device 200, some applications have the permission to call the player of the display device 200, and then when the display device 200 runs the application, the application can control the display device 200 to play the media content according to the actual running needs, that is, input the media content playing instruction. For example, the application Y, which is a third-party media content playing application, is installed on the display device 200, and the application Y can automatically play the recommended video in the main interface. When the user starts the application Y, the application Y generates the media content playing instruction to control the display device 200 to play the recommended media content in the application interface.
[0087] After obtaining the media playing instruction, the display device 200 can determine the to-be-played media according to the media playing instruction. The information related to the to-be-played media can be built in the media playing instruction. For example, when the user inputs "play media A" through voice, the voice interaction system of the display device 200 can directly generate a media playing instruction including the information of media A. After obtaining the media playing instruction, the display device 200 can directly parse the to-be-played media information in the media playing instruction, that is, determine that the to-be-played media is media A.
[0088] The information related to the to-be-played media can also be obtained by the display device 200 judging the current running state after obtaining the media playing instruction. For example, when the user inputs the media playing instruction through the combination of the direction keys and the confirmation key of the remote controller of the display device 200, the media playing instruction obtained by the display device 200 can only include the key event when the user presses the confirmation key. At this time, the display device 200 can obtain the position of the current focus cursor according to the media playing instruction, and determine that the media item selected by the current focus cursor is media B in combination with the layout information of the media list interface, so as to obtain the to-be-played media information according to the media item, that is, determine that the to-be-played media is media B.
[0089] After determining the to-be-played media, the display device 200 can obtain the media identifier. The media identifier is an identifier used to represent the identity of the media, which can be any information that can distinguish the media. For example, the media identifier can be the media name, the media playing address, the media code, or the combination of these information.
[0090] Since the media that can be played by the display device 200 can have different sources, and the media with different sources can have different naming rules, storage methods and coding strategies, the media with different sources have different media information, which is not convenient for subsequent docking of the player. In order to be able to dock the player of the display device 200, in some embodiments, the display device 200 can generate the media identifier based on a unified standard, that is, the display device 200 can parse the media information of the to-be-played media from the media playing instruction when obtaining the media identifier of the to-be-played media, and extract the information field used to represent the identity of the to-be-played media from the media information. The information field includes the playing address of the to-be-played media on the media platform. Then, the information field is converted into the media identifier according to a preset coding rule.
[0091] For example, after obtaining the media play instruction, the display device 200 can obtain the to-be-played media information according to the media play instruction, wherein the media information can be obtained through a media item display interface, a server or description information of a media file. The media information includes media name (such as movie A), media format (such as MPEG-4), media details (such as movie staff information, movie creation time, etc.), media type (such as video), media play address (such as https: / / www.xxx.com / xxx / play / ep78xxx18?theme=movie&from_spmid=666.7.recommend.0) and the like.
[0092] After obtaining the media information, the display device 200 can read an information field for representing the identity of the to-be-played media from the obtained media information, wherein the media play address can uniquely distinguish the identity of the media, and therefore the information field should at least include the media play address. Then, the display device 200 calls a local media information encoding rule to combine and convert the extracted information field into a media identifier, such as 010178xxx18.
[0093] In some embodiments, in order to facilitate the distinction of the identity of the media, the media identifier can include a channel ID for representing the identity of the to-be-played media, and the channel ID is an integer data generated based on the media information. Then, when the display device 200 converts the information field into the media identifier according to the preset encoding rule, the display device 200 can combine the information field into a string, and then call an integer function in a language environment supported by the operating system of the display device; and use the integer function to convert the string into an integer data to generate the channel ID.
[0094] For example, the operating system of the display device 200 supports C or C++ language. Then, after obtaining the information field, the display device 200 can splice the obtained information field into a string "text", and then call an integer function based on the C language environment, and use the integer function to convert the string into an integer data, string text = "123"; int number = int.Parse(text), so as to generate the channel ID.
[0095] S200: downloading the streaming media data of the to-be-played media according to the media identifier through a play agent, and setting the media identifier as a data source to the player based on a private protocol.
[0096] After obtaining the media asset identifier, the display device 200 can invoke the playback proxy and private protocol defined in the display device 200 playback system. The private protocol and the playback proxy are generated based on the language supported by the display device's operating system. For example, to address the issue of iOS platform not supporting the Java language, both the private protocol and the playback proxy can be service components built using C / C++ coding.
[0097] Based on the invoked playback proxy service, the display device 200 can download the streaming media data of the media asset to be played according to the media asset identifier (Channel ID). That is, the playback proxy service of the display device 200 can download or find the corresponding streaming media data according to the media asset identifier (Channel ID).
[0098] like Figure 11 As shown, in some embodiments, when the display device 200 controls the playback agent to download the streaming media data of the media asset to be played according to the media asset identifier, it can also parse the playback address from the media asset identifier to detect the platform type of the media asset platform according to the playback address, and thus use different methods to download the streaming media data according to different platform types.
[0099] For example, after resolving the playback address from the media asset identifier, if the playback address includes domain name information converted from the Domain Name System (DNS), then the platform type of the media asset to be played can be determined to be a server. If the playback address does not include domain name information, i.e., the playback address is an IP address or other information, then the platform type of the media asset to be played can be determined to be a peer terminal.
[0100] In some embodiments, to obtain the platform type corresponding to the media asset to be played, the display device 200 can also construct a comparison data table based on the media asset data source. The comparison data table may record the characteristics of playback addresses under different platform types and the key fields they contain. Then, after the display device 200 parses the playback address, it can use the playback address to match it in the comparison data table, thereby determining the platform type based on the matched entries.
[0101] After detecting the platform type of the media asset platform, the display device 200 can request media asset data from the media asset platform according to the media asset data acquisition method appropriate to the platform type. If the platform type is a server, an HTTP request is sent based on the playback address, and the streaming media data is downloaded according to the HTTP response returned by the media asset platform; if the platform type is a peer terminal, a P2P resource request is sent based on the playback address, and the streaming media data is downloaded according to the P2P resource response returned by the media asset platform.
[0102] For example, the display device 200 can parse the play address from the media asset identifier, https: / / www.xxx.com / xxx / play / ep78xxx18?theme=movie&from_spmid=666.7.recommend.0. According to the domain name information www.xxx.com in the play address, it can be determined that the current media asset is provided by the media asset provider corresponding to www.xxx.com, i.e., the platform type is a server. At this time, the display device 200 can send an HTTP request to the media asset platform server according to the play address, and the media asset platform server returns an HTTP response to the display device 200 according to the HTTP request, so that the display device 200 can download the streaming media data of the media asset to be played.
[0103] When the display device 200 downloads the streaming media data of the media asset to be played according to the media asset identifier through the play agent, it can also perform the step of setting the media asset identifier as a data source to the player based on the private protocol in parallel, i.e., the display device 200 can set the media asset identifier as a DataSource to the player through the private protocol of the player at the service layer.
[0104] The private protocol is a protocol defined and implemented by the player developer according to the data transmission specification, which is different from the general and public standard protocol such as HTTP. The private protocol can be used for communication and data transmission between the player and the server. For example, the private protocol can be based on the standard FFMPEG protocol framework, which refers to the protocol stack or protocol set used in FFMPEG. It allows FFMPEG to interact and communicate with other network entities. The protocol framework can provide functions to process and analyze different protocols, so that FFMPEG can handle various network protocol related operations. However, the parameters transmitted by the private protocol are different from the standard protocol, so that the display device 200 can change the data acquisition path of the player in the subsequent playback process, and adapt to the play agent service and the playback data requirements.
[0105] Based on the private protocol, the display device 200 can set the media asset identifier as a data source to the player, so that after the data source of the player is set to the media asset corresponding to the media asset identifier, the media asset data corresponding to the media asset identifier can be recognized and extracted from the cache space of the player for decoding and playing.
[0106] In some embodiments, after setting the data source of the player, the display device 200 can perform an initialization operation based on the private protocol. The initialization operation mainly initializes the cache space, which can include allocation of cache space, initialization of cache structure, determination of replacement strategy, setting of initial state, establishment of index and mapping, synchronization and consistency processing, configuration of performance parameters, error handling and log recording, etc.
[0107] The allocation of cache space is to allocate sufficient space for the cache, which involves determining the size of the cache and allocating memory space accordingly. The initialization of the cache structure includes designing the data structure of the cache and initializing these structures. For example, initializing the hash table, linked list, queue, etc. of the cache. Determining the replacement strategy is to select an appropriate replacement strategy for the cache, such as the Least Recently Used (LRU) strategy, First-In-First-Out (FIFO) strategy, etc., and initialize the related data structures. Setting the initial state can include state settings such as emptying the cache or preloading data. Establishing index and mapping can speed up data lookup and access. Synchronization and consistency processing can be synchronized with other nodes or servers in a distributed system to ensure data consistency. Configuration of performance parameters can include configuring performance parameters of the cache, such as expiration time, maximum capacity, read-write permissions, etc. Error handling and log recording are to initialize error handling and log recording mechanisms for the cache system to facilitate troubleshooting and performance monitoring during subsequent operation.
[0108] Since the playback agent is used to complete playback in cooperation with the player in order to achieve cross-platform playback, and both the playback agent and the player require cache space, the playback agent and the player can also be initialized separately during the initialization process, and a mapping relationship between the two cache spaces can be established. The internal cache of the playback agent is referred to as the first cache, and the internal cache of the player is referred to as the second cache. The first cache and the second cache can be configured from the memory space of the display device 200, for example, both the first cache and the second cache are uint8_t type caches.
[0109] In some embodiments, after setting the media asset identifier as the data source to the player based on the private protocol, the display device 200 can also calculate the unit cache data block capacity according to the media asset identifier and the private protocol, and allocate cache space for the first cache according to the unit cache data block capacity. Then perform cache structure initialization on the first cache according to the allocated cache space, and set the mapping relationship between the first cache and the second cache.
[0110] S300: Store the streaming media data into the first cache.
[0111] After the media asset identifier is set as a data source to the player based on the private protocol and the initialization operation is completed, the display device 200 can use the play agent service to start downloading the streaming media data through an HTTP request or a P2P resource request and save the downloaded streaming media data to the first cache.
[0112] The first cache is an internal cache of the play agent. Since the play agent service does not have data decoding capability, the display device 200 can download and store the data in the form of data blocks during the process of storing the streaming media data to the first cache. That is, as shown in FIG. 2B, in some embodiments, the display device 200 can acquire the cache space of the first cache when storing the streaming media data to the first cache, calculate the maximum number of cache data blocks according to the cache space and the unit cache data block capacity, and store the media asset data blocks to the first cache in the order of the maximum number of cache data blocks. Figure 12
[0113] For example, after the display device 200 obtains the streaming media data of the media asset to be played using the play agent, the display device 200 can acquire the cache space X set for the first cache in the initialization stage, calculate the maximum number of cache data blocks n according to the cache space X and the unit cache data block capacity Y set by the play agent and the private protocol, and then acquire n data blocks from the streaming media data according to the maximum number of cache data blocks n and the unit cache data block capacity Y and store the n data blocks to the first cache.
[0114] S400: transmitting the streaming media data in the first cache to the second cache based on the private protocol to form the play data.
[0115] After the streaming media data is stored to the first cache, the display device 200 can transmit the streaming media data in the first cache to the second cache based on the private protocol to form the play data. In order to improve the transmission efficiency of the streaming media data, in some embodiments, the operating system of the display device includes a plurality of functional levels, and the play agent and the player are configured in the same functional level.
[0116] For example, the playback agent service and the player are both configured in the kernel layer of the operating system of the display device 200. Compared with configuring the playback agent service in the framework layer and configuring the player in the kernel layer of the operating system, configuring the playback agent service and the player in the kernel layer can make the playback agent service and the player perform in parallel first and then interact after the media asset information is sent to the layer through the channel ID, so as to realize playback acceleration.
[0117] The second cache is an internal cache of the player. Since the second cache is an internal cache of the player and the player has decoding capability, the streaming media data can be stored in the second cache in the form of frame data for use by the player. That is, in some embodiments, when the display device 200 transmits the streaming media data in the first cache to the second cache based on the private protocol, the display device 200 reads the media asset data block from the first cache according to the private protocol, performs decoding on the media asset data block to obtain a plurality of playback picture frames, and caches the playback picture frames to the second cache to form playback data.
[0118] It can be seen that in the above embodiments, the display device 200 can first cache media asset data to the first cache through the playback agent, and then cache the media asset data to the second cache through the private protocol. Moreover, the first cache caches data in the form of data blocks, and the second cache caches data in the form of frame data. The media asset data can be converted into playback data to enable the player to perform media asset playback under the premise of meeting the data processing capabilities of the playback agent service and the player respectively.
[0119] S500: Control the player to play the playback data based on the second cache.
[0120] After the playback data is formed in the second cache data, the display device 200 can perform media asset playback, that is, control the player to play the playback data based on the second cache. Since the playback data is the original image frame obtained by parsing the streaming media data, in order to obtain better display effect, the display device 200 can also perform rendering processing on the playback data to improve display quality. That is, in some embodiments, when the display device 200 controls the player to play the playback data based on the second cache, the display device 200 can first read the playback data in the second cache through the player, then perform playback rendering on the playback data to form a playback picture, and finally control the display to display the playback picture.
[0121] It can be seen that, as Figure 13As shown, in order to enable the playback system to be used across platforms, the display device 200 can add a private protocol to directly read the Buffer of the playback agent through the interface of the private protocol. The Buffer data is directly shared to the player, and the player and the playback agent do not need to transmit the streaming media data through the http protocol. The private protocol of the player and the playback agent are both C / C++ coding, which can solve the platform compatibility problem and improve the code running efficiency; at the same time, the player and the playback agent directly transmit data through the Buffer, which can also improve the data transmission efficiency.
[0122] Based on the media asset playback method provided in the above embodiment, in some embodiments of the present application, a display device 200 is further provided, which comprises a display 260 and a controller 250. The display 260 is configured to display a user interface; as Figure 14 As shown, the controller 250 is configured to perform the following program steps:
[0123] S100: In response to a media asset playback instruction, a media asset identifier of a to-be-played media asset is acquired;
[0124] S200: The playback agent downloads streaming media data of the to-be-played media asset according to the media asset identifier, and sets the media asset identifier as a data source to the player based on a private protocol, wherein the private protocol and the playback agent are generated based on a language supported by an operating system of the display device;
[0125] S300: The streaming media data is stored in a first cache, and the first cache is an internal cache of the playback agent;
[0126] S400: The streaming media data in the first cache is transmitted to a second cache based on the private protocol to form playback data, and the second cache is an internal cache of the player;
[0127] S500: The player is controlled to play the playback data based on the second cache.
[0128] According to the technical solution, the display device 200 can obtain the media asset identifier of the media asset to be played in response to a media asset playing instruction, download the streaming media data of the media asset to be played according to the media asset identifier through a playing agent, and set the media asset identifier as a data source to the player based on a private protocol, wherein the private protocol and the playing agent are generated based on a language supported by a display device operating system. The streaming media data is stored in a first cache of the playing agent. The streaming media data in the first cache is transmitted to a second cache of the player based on the private protocol to form playing data, so that the player plays the playing data based on the second cache. The display device 200 can directly read the cache of the playing agent through the private protocol, so that the cache data is directly shared to the player. The streaming media data does not need to be transmitted between the player and the playing agent through an http protocol. Moreover, the private protocol and the playing agent are generated based on the language supported by the display device operating system, so that cross-platform use is achieved, and platform compatibility problems are improved.
[0129] The same or similar parts among various embodiments in the specification can be referred to each other, and will not be described here again.
[0130] Those skilled in the art can clearly understand that the technologies in the embodiments of the present application can be realized by means of software and necessary general hardware platforms. Based on such understanding, the technical solutions in the embodiments of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of various embodiments or some parts of the embodiments of the present application.
[0131] Finally, it should be pointed out that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
[0132] In order to facilitate explanation, the above description has been made in combination with specific embodiments. However, the above exemplary discussion is not intended to exhaust or limit the embodiments to the specific forms disclosed above. Various modifications and variations can be derived according to the above teachings. The selection and description of the above embodiments are for better explanation of principles and practical applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific use considerations.
Claims
1. A display device, characterized by comprising: The method comprises the following steps: a display configured to display a user interface; a controller configured to: in response to a media content playing instruction, acquire a media content identifier of a media content to be played; download streaming media data of the media content to be played according to the media content identifier through a playing agent, and set the media content identifier as a data source for a player based on a private protocol, the private protocol and the playing agent being generated based on a language supported by a display device operating system; store the streaming media data into a first cache, the first cache being an internal cache of the playing agent; transmit the streaming media data in the first cache into a second cache based on the private protocol to form playing data, the second cache being an internal cache of the player; control the player to play the playing data based on the second cache.
2. The display device of claim 1, wherein, The controller performing the step of acquiring the media content identifier is further configured to: parse media content information of the media content to be played from the media content playing instruction; extract an information field for representing the identity of the media content to be played from the media content information, the information field comprising a playing address of the media content to be played on a media content platform; convert the information field into the media content identifier according to a preset encoding rule.
3. The display device of claim 2, wherein, The media content identifier comprises a channel ID for representing the identity of the media content to be played, the channel ID being integer data generated based on the media content information; the controller performing the step of converting the information field into the media content identifier according to a preset encoding rule is further configured to: combine the information field into a string; invoke an integer function in a language environment supported by the display device operating system; convert the string into integer data using the integer function to generate the channel ID.
4. The display device of claim 2, wherein, The controller performing the step of controlling the playing agent to download the streaming media data of the media content to be played according to the media content identifier is further configured to: parse the playing address from the media content identifier; detect a platform type of the media content platform according to the playing address; if the platform type is a server, send an HTTP request based on the playing address, and download the streaming media data according to an HTTP response fed back by the media content platform; if the platform type is a Peer terminal, send a P2P resource request based on the playing address, and download the streaming media data according to a P2P resource response fed back by the media content platform.
5. The display device of claim 1, wherein, The controller performing the step of setting the media content identifier as the data source for the player based on the private protocol is further configured to: calculate a unit cache data block capacity according to the media content identifier and the private protocol; allocate a cache space for the first cache according to the unit cache data block capacity; perform cache structure initialization on the first cache according to the allocated cache space; set a mapping relationship between the first cache and the second cache.
6. The display device of claim 5, wherein, The controller performing the step of storing the streaming media data into the first cache is further configured to: acquire a cache space of the first cache; calculate a maximum cache data block quantity according to the cache space and the unit cache data block capacity; cut media data blocks from the streaming media data according to the maximum cache data block quantity; The media data block is sequentially stored into the first cache.
7. The display device of claim 6, wherein, The controller performs transmission of the streaming media data in the first cache into a second cache based on the private protocol, and is further configured to: read the media data block from the first cache according to the private protocol; perform decoding on the media data block to obtain a plurality of play picture frames; cache the play picture frames into the second cache to form play data.
8. The display device of claim 1, wherein, The controller performs control of the player to play the play data based on the second cache, and is further configured to: read the play data in the second cache by the player; perform play rendering on the play data to form a play picture; control the display to display the play picture.
9. The display device of claim 1, wherein, An operating system of the display device includes a plurality of functional levels, and the play agent and the player are configured in the same functional level.
10. A media playback method, comprising: The media play method applied to the display device of any one of claims 1-9 comprises: in response to a media play instruction, obtaining a media identifier of media to be played; downloading streaming media data of the media to be played by a play agent according to the media identifier, and setting the media identifier as a data source to a player based on a private protocol, the private protocol and the play agent being generated based on a language supported by an operating system of the display device; storing the streaming media data into a first cache, the first cache being an internal cache of the play agent; transmitting the streaming media data in the first cache into a second cache based on the private protocol to form play data, the second cache being an internal cache of the player; controlling the player to play the play data based on the second cache.
Citation Information
Patent Citations
Mobile streaming media offline caching system based on HTTP proxy and method
CN105245939A
Multimedia resource carousel method, electronic equipment and storage medium
CN111131845A