Display device and media asset playing method
By setting up a player and a playback agent at the bottom of the system and configuring its interactive interface to enable data transmission through control instructions, the problem of low efficiency of streaming media data transmission in the prior art is solved, and efficient media playback is achieved.
Patent Information
- Application Number
- CN202410006127.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-01-03
AI Technical Summary
In the prior art, the player on the display device realizes the transmission of streaming media data through the interaction between the http protocol and the playback agent, resulting in low data transmission efficiency and affecting the media playback efficiency.
By setting both the player and the play agent at the bottom of the system, the software architecture foundation is built for data transmission between the player and the play agent through control instructions, and the interface on the player that interacts with the play agent is configured. This allows the player to control the playback agent to open the streaming media shard through the connection interface, and the player can control the playback agent to return the video streaming data of the streaming media shard through the reading interface.
It realizes data transmission directly between the player and the playback agent through control instructions, which improves data transmission efficiency and thus improves media playback speed.
Smart Images

Figure CN119420978A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video playback technology, and in particular to a display device and a media playback method. Background Art
[0002] When a player on a display device plays a video, it usually downloads the video's streaming media data from the server through a playback agent. After obtaining the streaming media data, the playback agent generates a URL address based on the http protocol and feeds the URL address back to the player. After the player receives the URL address, it transmits the streaming media data through the interaction between the http request and http response based on the http protocol. This interaction method has low data transmission efficiency, which affects the efficiency of media asset playback. Summary of the invention
[0003] In order to improve the media playback experience, the present application provides a display device and a media playback method.
[0004] In a first aspect, the present application provides a display device, the display device comprising:
[0005] monitor;
[0006] A controller connected to the display, the controller comprising an application layer and a bottom layer, the application layer being provided with a video playback program, and the bottom layer being provided with a player and a playback agent;
[0007] The controller is configured to:
[0008] The video player program of the application layer receives an input media resource playing instruction;
[0009] In response to the media asset playback instruction, the playback agent is started, and the playback agent is configured to download the streaming media segments of the target media asset corresponding to the media asset playback instruction into a cache after being started, and feed back the playback agent address of the streaming media segments in the cache to the video playback program;
[0010] The player is started, and a playback instruction of the target media asset is sent to the player, wherein the playback instruction includes the playback agent address and the media asset identifier of the target media asset, and the player is configured to parse the segment name of the streaming media segment from the playback agent address, and control the playback agent to open the streaming media segment through a connection interface of the http protocol, wherein the method of controlling the playback agent to open the streaming media segment includes: the player sends an opening instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the opening instruction, and the player is also configured to control the playback agent to return the video stream data of the streaming media segment through a read interface of the http protocol, wherein the method of controlling the playback agent to return the video stream data of the streaming media segment includes: the player sends a read instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction, and the player is also configured to play the video stream data.
[0011] In some embodiments, the method of controlling the playback agent to open the streaming media segment further includes:
[0012] If the playback agent returns a message indicating that the streaming media segment fails to be opened, a first http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the first http request.
[0013] In some embodiments, the method of controlling the playback agent to return the video stream data of the streaming media segment further includes:
[0014] If the playback agent returns a message indicating that the streaming media segment reading failed, a second http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the second http request.
[0015] In some embodiments, the method of controlling the playback agent to open the streaming media segment further includes:
[0016] When the system type of the display device is the first system type, sending an opening instruction including the media asset identifier and the segment name to the playback agent, the playback agent being configured to open the streaming media segment in the cache in response to the opening instruction;
[0017] When the system type of the display device is the second system type, a first http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the first http request.
[0018] In some embodiments, the method of controlling the playback agent to return the video stream data of the streaming media segment further includes:
[0019] When the system type of the display device is the first system type, sending a read instruction including the media asset identifier and the segment name to the playback agent, the playback agent being configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction;
[0020] When the system type of the display device is the second system type, a second http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to respond to the second http request and feed back the video stream data of the streaming media segment to the player.
[0021] In some embodiments, the method of controlling the playback agent to return the video stream data of the streaming media segment further includes:
[0022] If the playback agent returns a message indicating that the streaming media segment is opened successfully, a read instruction containing the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction.
[0023] In some embodiments, the video playback program is further configured to:
[0024] In response to the media asset playing instruction, the media asset identifier is obtained from the control data of the control corresponding to the media asset playing instruction.
[0025] In a second aspect, the present application provides a media playback method, which is used for a display device, wherein the display device includes a display and a controller, the controller is connected to the display, the controller includes an application layer and a bottom layer, the application layer is provided with a video playback program, and the bottom layer is provided with a player and a playback agent; the media playback method includes:
[0026] The video player program of the application layer receives an input media resource playing instruction;
[0027] In response to the media asset playback instruction, the playback agent is started, and the playback agent is configured to download the streaming media segments of the target media asset corresponding to the media asset playback instruction into a cache after being started, and feed back the playback agent address of the streaming media segments in the cache to the video playback program;
[0028] The player is started, and a playback instruction of the target media asset is sent to the player, wherein the playback instruction includes the playback agent address and the media asset identifier of the target media asset, and the player is configured to parse the segment name of the streaming media segment from the playback agent address, and control the playback agent to open the streaming media segment through a connection interface of the http protocol, wherein the method of controlling the playback agent to open the streaming media segment includes: the player sends an opening instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the opening instruction, and the player is also configured to control the playback agent to return the video stream data of the streaming media segment through a read interface of the http protocol, wherein the method of controlling the playback agent to return the video stream data of the streaming media segment includes: the player sends a read instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction, and the player is also configured to play the video stream data.
[0029] In some embodiments, the method of controlling the playback agent to return the video stream data of the streaming media segment further includes:
[0030] If the playback agent returns a message indicating that the streaming media segment is opened successfully, a read instruction containing the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction.
[0031] In some embodiments, it also includes:
[0032] In response to the media asset playing instruction, the media asset identifier is obtained from the control data of the control corresponding to the media asset playing instruction.
[0033] The beneficial effects of the display device and media asset playback method provided by the present application include:
[0034] The present application sets both the player and the playback agent at the bottom layer of the system, builds a software architecture foundation for data transmission between the player and the playback agent through control instructions, configures the interface on the player that interacts with the playback agent, and configures the response method of the playback agent, so that the player can control the playback agent to open the streaming media segment through the connection interface, and the player can control the playback agent to return the video stream data of the streaming media segment to the player through the reading interface, and then the player can play the media according to the video stream data returned by the playback agent; the embodiment of the present application realizes direct data transmission between the player and the playback agent through control instructions, improves the data transmission efficiency, and thus improves the media playback speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0036] Figure 1 Schematic diagram of an operation scenario between a display device and a control device according to some embodiments is exemplarily shown in FIG.
[0037] Figure 2 exemplarily shows a hardware configuration block diagram of a control device according to some embodiments;
[0038] Figure 3 exemplarily shows a hardware configuration block diagram of a display device according to some embodiments;
[0039] Figure 4 exemplarily shows a schematic diagram of software configuration in a display device according to some embodiments;
[0040] Figure 5 Schematic diagram of an application layer and a bottom layer of a display device according to some embodiments is exemplarily shown in FIG.
[0041] Figure 6 Schematic diagram of transmission of streaming media data according to some embodiments is exemplarily shown in FIG.
[0042] Figure 7 exemplarily shows a schematic diagram of a home page of a video playback program according to some embodiments;
[0043] Figure 8 Schematic diagrams of detail pages according to some embodiments are exemplarily shown in FIG.
[0044] Fig. 9 A flowchart of a method for playing media assets according to some embodiments is exemplarily shown in FIG.
[0045] Fig.10 exemplarily shows a timing diagram of a media asset playback process according to some embodiments. DETAILED DESCRIPTION
[0046] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0047] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0048] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0049] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0050] The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 and Figure 2 This is a specific implementation of the display device of the present application.
[0051] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .
[0052] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0053] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
[0054] In some embodiments, the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
[0055] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0056] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.
[0057] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200.
[0058] like Figure 3 The display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.
[0059] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.
[0060] The display 260 includes a display screen component for presenting images, and a driving component for driving image display, which is used to receive image signals output from the controller, and display video content, image content, and menu control interface components and user control UI interface.
[0061] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0062] The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.
[0063] The user interface can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.).
[0064] The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
[0065] The external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.
[0066] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.
[0067] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.
[0068] The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform operations related to the object selected by the user command.
[0069] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a RAM (Random Access Memory, RAM), a ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.
[0070] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.
[0071] "User interface" is the medium interface for interaction and information exchange between applications or operating systems and users. It realizes the conversion between the internal form of information and the form acceptable to users. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to the user interface related to computer operation displayed in a graphical way. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.
[0072] See also Figure 4 In some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.
[0073] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.
[0074] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.
[0075] like Figure 4 As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop components on the user interface.
[0076] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).
[0077] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.
[0078] In some embodiments, the kernel layer is a layer between hardware and software. Figure 4As shown, the kernel layer 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, pressure sensor, etc.), and power driver, etc.
[0079] The hardware or software architecture in some embodiments may be based on the introduction in the above embodiments, and in some embodiments may be based on other similar hardware or software architectures, so as to implement the technical solution of the present application.
[0080] In some embodiments, the framework layer includes a playback agent, and the kernel layer includes a player. The playback agent is used to interact with the server, download the video stream data of the media asset, and transmit the video stream data to the player for the player to play. Since the playback agent and the player are at different system levels, data transmission needs to be carried out through the http protocol.
[0081] In some embodiments, in order to facilitate users to order media resources on the display device, a software configuration diagram of the display device can also be seen in Figure 5 , Figure 5 FIG. 1 is a schematic diagram of an application layer and a bottom layer of a display device according to some embodiments. Figure 5 As shown, the application layer includes a video player, which can display multiple recommended media assets, and the user can also search for the media assets he wants to watch in the video player.
[0082] In some embodiments, the display device may be configured to enter the video playback program after powering on, and the home page of the video playback program is the home page of the display device.
[0083] In some embodiments, Figure 5 The bottom layer refers to the kernel layer, and the bottom layer may be provided with a playback agent and a player, that is, in these embodiments, the playback agent is transplanted from the framework layer to the bottom layer, so that the playback agent and the player are at the same system level.
[0084] The playback agent can interact with the server to obtain the streaming media data of the media assets stored on the server. Compared with directly interacting with the server through the player, downloading the streaming media data through the playback agent has the advantage of fast download speed.
[0085] See also Figure 6 On the display device, after the playback agent obtains the streaming media data, it stores the streaming media data in the cache, and the player obtains the streaming media data by interacting with the playback agent.
[0086] In some embodiments, the player is used to play streaming media data, and the video playback program can control the player to interact with the playback agent to obtain the streaming media data downloaded by the playback agent, and play the streaming media data to achieve media asset playback.
[0087] In some embodiments, the player may be a player built into a video playback program, which is configured to interact with the playback agent according to the steps in the media playback method provided in the embodiments of the present application to obtain the streaming media data downloaded by the playback agent, and play the streaming media data to achieve media playback.
[0088] See also Figure 7 , is a schematic diagram of the home page of a video player program according to some embodiments, such as Figure 7 As shown, the home page of the video player program is provided with a navigation bar 510 and a content display area located below the navigation bar 510. The navigation bar 510 is used to display multiple title controls, such as a variety show control, a special zone control, an education control, a music control, and other title controls. When the user moves the focus of the display device 200 between multiple title controls, the content display area 520 displays the recommended content corresponding to the focused title control, and when the focus is on one of the title controls, the page displayed by the display device 200 is the home page corresponding to the title control.
[0089] In some embodiments, the content display area 520 corresponding to the partial title control may display multiple recommendation controls 521, and the recommendation control 521 may correspond to one media asset. The user may move the focus of the display device to one of the recommendation controls 521, and input a trigger instruction of the recommendation control 521 to the display device through the control device, and the trigger instruction is a play instruction of the media asset corresponding to the recommendation control 521.
[0090] In some embodiments, the video player program is provided with a search function, and the user can also search for the media he wants to watch through the search function. The video player program displays the searched media through a recommendation control on the search results page. The user can trigger the recommendation control on the search results page to watch the media on demand.
[0091] In some embodiments, after a user triggers a recommended position control 521, the user can enter the details page of the media asset corresponding to the recommended position control 521. Figure 8 The details page may be provided with a play window 611. The video player program obtains the streaming media data of the media asset corresponding to the recommendation position control 521 from the server through the play agent according to the user operation of entering the details page, that is, the user operation of the user triggering a recommendation position control 521, and plays the streaming media data in the play window 611 through the player to realize the media asset playback.
[0092] In some embodiments, upon entering Figure 8 When the detail page is shown, the focus of the display device is located on the play window 611 by default, and the user can input a full-screen play instruction to the display device through the control device to make the target media asset play in full screen on the display device.
[0093] In some embodiments, after the playback agent obtains the video stream number of the media asset from the server, the player interacts with the playback agent through the http protocol to obtain the streaming media data downloaded by the playback agent. The interaction process includes the player sending an http request to the playback agent, and the playback agent sending an http response to the player. However, since this interaction method requires a connection to be established between the player and the playback agent before data transmission, the process of establishing a connection is relatively cumbersome and takes a long time, resulting in low data transmission efficiency, which in turn causes the player to play the media asset at a poor speed.
[0094] In order to improve the playback speed of media assets, an embodiment of the present application provides a media asset playback method. The media asset playback method is based on the fact that both the player and the playback agent are at the bottom layer of the system and can interact through control instructions. Therefore, after configuring the interaction interface between the player and the playback agent, the player and the playback agent do not need to transmit streaming media data through http requests and http responses, which can improve the speed at which the player plays media assets.
[0095] In some embodiments, the interactive interface between the player and the playback agent includes a connect interface and a read interface, and these two interfaces are interactive interfaces based on the http protocol. Before the player and the playback agent are configured in the embodiment of the present application, these two interfaces can interact based on the interactive process specified in the http protocol, so that the player can obtain the streaming media data stored in the cache by the playback agent from the playback agent, and the interactive process may include: the player and the playback agent establish a connection, the playback agent returns the connection result to the player, the player sends an http request to the playback agent, and the playback agent returns the request result to the playback agent, wherein the http request includes multiple data such as the request line, the request header, and the request data, and the request result includes multiple data such as the response line, the response header, the blank line, and the response entity. This interactive process is time-consuming and affects the data transmission efficiency between the player and the playback agent.
[0096] In some embodiments, the display device is an IOS system device. This type of device does not support the setting of a playback agent at the framework layer, so that this type of device cannot directly achieve media playback through the interaction between the video playback program-player-playback agent. In order to be compatible with this type of device, the embodiment of the present application sets the playback agent at the bottom system level of this type of device, so that the player and the playback agent are at the same system level. After configuring the interactive interface between the player and the playback agent, streaming media data can be transmitted between the player and the playback agent, which can increase the speed at which the player plays media.
[0097] In some embodiments, the configuration of the connect interface of the player includes: configuring the connect interface to: the interaction with the playback agent includes: sending an open instruction to the playback agent, the open instruction is used to open the streaming media segments stored in the cache by the playback agent, wherein the playback agent stores the video stream data of the media asset in the cache in the form of streaming media segments.
[0098] In some embodiments, the configuration of the connect interface of the player includes: the interaction with the playback agent includes: sending an open instruction to the playback agent, if the playback agent returns a message indicating that the streaming media segment has failed to be opened, sending a first http request to the playback agent, the first http request is used to open the streaming media segment. Through the above configuration, the connect interface retains the interaction mode based on the http protocol, and the success rate of opening the streaming media segment is improved.
[0099] In some embodiments, the configuration of the connect interface of the player includes: the interaction with the playback agent includes: according to the system type of the display device being the first system type, sending an open instruction to the playback agent, the open instruction is used to open the streaming media segment stored in the cache of the playback agent, wherein the first system type may include the IOS system; according to the system type of the display device being the second system type, the playback agent sends a first http request, the first http request is used to open the streaming media segment, wherein the second system type may include the Android system. Through the above configuration, the display device of the Android system can continue to execute the existing interaction method based on the http protocol, avoiding compatibility issues of some old devices.
[0100] In some embodiments, configuring the read interface of the player includes: configuring the read interface to: interact with the playback agent including: sending a read instruction to the playback agent, the read instruction is used to obtain data of the streaming media segments stored in the cache of the playback agent.
[0101] In some embodiments, the configuration of the player's read interface includes: the interaction with the playback agent includes: sending a read instruction to the playback agent, if the playback agent returns a message indicating that the streaming media segment reading failed, sending a second http request to the playback agent, the second http request is used to obtain the data in the streaming media segment. Through the above configuration, the read interface retains the interaction mode based on the http protocol, and the data transmission success rate of opening the streaming media segment is improved.
[0102] In some embodiments, the configuration of the player's read interface includes: the interaction with the playback agent includes: according to the display device's system type being the first system type, sending a read instruction to the playback agent; according to the display device's system type being the second system type, the playback agent sending a second http request, the second http request being used to obtain data in the streaming media segment, wherein the second system type may include an Android system. Through the above configuration, the display device of the Android system can continue to execute the existing interaction method based on the http protocol, avoiding compatibility issues with some old devices.
[0103] In some embodiments, in order to realize data transmission between the player and the playback agent through control instructions, the playback agent needs to be configured. The configuration of the playback agent matches the configuration of the player, and the configuration content includes: configuring the playback agent to respond to the opening instruction and open the streaming media segment in the cache; responding to the read instruction, feeding back the video stream data of the streaming media segment to the player.
[0104] In some embodiments, the configuration of the playback agent also includes: after successfully opening the streaming media segment, returning a message indicating that the streaming media segment was successfully opened to the player; after failing to open the streaming media segment, returning a message indicating that the streaming media segment failed to be opened to the player, so that the player executes a corresponding processing flow according to the success or failure of opening the streaming media segment.
[0105] In some embodiments, the configuration of the playback agent further includes: after failing to read the video stream data of the streaming media segment, returning a message indicating the failure to read the streaming media segment to the player, so that the player executes a corresponding processing flow according to the failure to read the streaming media segment.
[0106] Based on the above configuration of the player and the playback agent, the media asset playback method provided in the embodiment of the present application can be found in Fig. 9 , is a flow chart of a method for playing media assets according to some embodiments, such as Fig. 9 As shown, the method may include the following steps:
[0107] Step S101: the video player program of the application layer receives an input media resource playing instruction.
[0108] In some embodiments, a plurality of recommendation position controls are provided on a media asset recommendation page of a video player program, such as a home page of a display device. A user can click a recommendation position control to input a media asset playback instruction of the media asset corresponding to the recommendation position to the display device. The media asset can be referred to as a target media asset. The display device transmits the media asset playback instruction to the video player program at the application layer according to the application program running in the foreground being the video player program.
[0109] In some embodiments, the user may also input a media asset playback instruction of the target media asset by voice input or other methods.
[0110] Step S102: In response to the media asset playback instruction, the playback agent is started, and the playback agent is configured to download the streaming media segments of the target media asset corresponding to the media asset playback instruction into the cache after startup, and feed back the playback agent address of the streaming media segment in the cache to the video playback program.
[0111] In some embodiments, after receiving a media asset playback instruction, the video playback program obtains the media asset information from the control data of the recommendation position control of the media asset corresponding to the media asset playback instruction. The media asset information may include a media asset ID (Identity document) and a playback address, wherein the playback address may be a playback address based on the http protocol, and the playback address is used to download the streaming media data of the target media asset.
[0112] In some embodiments, after receiving the media asset playback instruction, the video playback program starts the playback agent and sends the media asset information of the target media asset to the playback agent. The media asset information may include the playback address.
[0113] In some embodiments, the playback agent, upon startup, creates a cache in the memory of the display device.
[0114] In some embodiments, the configuration of the cache by the playback agent includes: setting the shared cache to open files in the cache through an open interface, and setting files in the cache in an opened state to be readable through a read interface.
[0115] In some embodiments, after the playback agent is started, according to the playback address of the target media asset provided by the video playback program, the server is accessed to download the streaming media data of the target media asset, the streaming media data is stored in the shared cache in the form of streaming media segments, and the playback agent address of the streaming media data is generated, that is, the storage address of the downloaded streaming media data in the cache. The storage address is a URL (Uniform Resource Locator) address corresponding to an M3U8 file, and the M3U8 file is a segment list of streaming media segments. The segment list may include the segment name and storage address of each streaming media segment, and the URL address is a storage address based on the http protocol.
[0116] In some embodiments, after generating the playback agent address, the playback agent returns the playback agent address to the video playback program.
[0117] Step S103: Start the player and send a playback instruction of the target media asset to the player, wherein the playback instruction includes the playback agent address and the media asset identifier of the target media asset, and the player is configured to parse the segment name of the streaming media segment from the playback agent address, and control the playback agent to open the streaming media segment through the connection interface of the http protocol, wherein the method of controlling the playback agent to open the streaming media segment includes: the player sends an opening instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the opening instruction, and the player is also configured to control the playback agent to return the video stream data of the streaming media segment through the reading interface of the http protocol, wherein the method of controlling the playback agent to return the video stream data of the streaming media segment includes: the player sends a reading instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the reading instruction, and the player is also configured to play the video stream data.
[0118] In some embodiments, the video playback program starts the player according to the playback proxy address returned by the playback proxy, and sends a playback instruction of the target media asset to the player, and the playback instruction may include the playback proxy address and the media asset identifier of the target media asset. In some embodiments, the player is initialized after startup, and according to the playback proxy address in the playback instruction being a URL address based on the http protocol, the URL address is parsed to obtain an M3U8 file, and a fragment list of the target media asset is obtained from the M3U8 file, and the fragment list may include the EXTINF tag and fragment name of each streaming media fragment of the target media asset, and the EXTINF tag corresponds to the fragment name.
[0119] In some embodiments, after obtaining the fragment list, the player is configured to send an opening instruction of one of the streaming media fragments of the target media asset, such as the first streaming media fragment, to the playback agent through the connect interface of the http protocol. The opening instruction may include the media asset identifier and fragment name of the target media asset.
[0120] Exemplarily, the code of the opening instruction may include:
[0121] requestDataFromBlockName(getChannelId(),h->ts_filename).
[0122] Where channelid is the media asset identifier of the target media asset, BlockName is the fragment name, and the above code indicates a request to connect to the specified streaming media fragment from the playback agent, and the specified streaming media fragment is the streaming media fragment corresponding to the media asset identifier and fragment name of the target media asset. Since the target media asset usually includes multiple streaming media fragments, the above fragment names may be Block-0.data, Block-1.data, Block-2.data, Block-3.data, etc., where Block-0.data indicates the fragment name of the first streaming media fragment of the target media asset, Block-1.data indicates the fragment name of the second streaming media fragment of the target media asset, Block-2.data indicates the fragment name of the third streaming media fragment of the target media asset, Block-3.data indicates the fragment name of the fourth streaming media fragment of the target media asset, and so on.
[0123] In some embodiments, after receiving the open instruction, the playback agent executes the action of opening the corresponding streaming media segment of the target media in the shared cache through the open interface, generates status information of the streaming media segment, that is, a message indicating whether the streaming media segment fails to be opened or succeeds, and returns the status information of the streaming media segment in the shared cache to the player. If the streaming media segment is opened successfully, the status information is an opened state; if the streaming media segment fails to be opened, the status information is an unopened state.
[0124] In some embodiments, after the player sends an opening instruction for one of the streaming media segments of the target media asset to the playback agent, it may, after a preset time interval, send a read instruction for the streaming media segment to the playback agent through the read interface of the http protocol. The read instruction may include the media asset identifier and segment name of the target media asset corresponding to the opening instruction.
[0125] In some embodiments, when the player receives status information of a streaming media segment and the status information indicates an opened state, the player may send a read instruction for the streaming media segment to the playback agent through the read interface of the http protocol. The read instruction may include a media asset identifier of the media asset corresponding to the open instruction.
[0126] Exemplarily, the code of the read instruction may include:
[0127] len = http_api_read(s->hd,buf,len,chanelid,h->ts_filename); / / Read data according to channelid and save it to buf.
[0128] Among them, channelid is the media asset identifier of the target media asset, and filename is the file name. The above code requests the playback agent to read the specified media asset, that is, the data of the target media asset.
[0129] In some embodiments, after receiving the read instruction, the playback agent reads the segment data of the corresponding streaming media segment in the shared cache through the read interface and returns it to the player.
[0130] In some embodiments, after receiving the segment data of the target media asset, the player parses and plays the segment data to achieve the playback of the target media asset.
[0131] It can be seen from the above embodiments that the present application constructs a software architecture foundation for data transmission between the player and the playback agent through control instructions by setting both the player and the playback agent at the bottom layer of the system, and configures the interface on the player that interacts with the playback agent and the response method of the playback agent, so that the player can control the playback agent to open the streaming media segment through the connection interface, and the player can control the playback agent to return the video stream data of the streaming media segment to the player through the reading interface, and then the player can play the media according to the video stream data returned by the playback agent; the embodiment of the present application realizes direct data transmission between the player and the playback agent through control instructions, thereby improving the data transmission efficiency and thus improving the media playback speed.
[0132] To further illustrate the media asset playback method provided in the embodiment of the present application, Fig.10 A schematic diagram of interaction between a display device and a server according to some embodiments is shown.
[0133] like Fig.10 As shown, after the user inputs a media asset playback instruction in the video playback program, the video playback program obtains the media asset identifier, playback address and other media asset information corresponding to the media asset playback instruction, and then starts the playback agent to send the media asset information to the playback agent.
[0134] In some embodiments, after being started, the playback agent creates a cache in the memory of the display device, sets the cache to open files in the cache through an open interface, and sets the cache to read data in files in the cache through a read interface.
[0135] In some embodiments, the playback agent downloads the streaming media data of the media asset from the server according to the playback address in the media asset information sent by the video playback program, stores the downloaded streaming media data in a cache, generates a playback agent address for the streaming media data, and returns the playback agent address and the media asset identifier of the media asset corresponding to the media asset playback instruction to the video playback program.
[0136] In some embodiments, after receiving the playback agent address sent by the playback agent, the video playback program starts the player and sends the playback agent address to the player.
[0137] In some embodiments, after receiving the playback proxy address, the player parses the playback proxy address to obtain a fragment list, which includes the fragment name of each fragment. The player sends an operation instruction to open one of the fragments in the fragment list to the playback proxy through the connection interface of the http protocol, and the operation instruction includes the media asset identifier and the fragment name.
[0138] In some embodiments, after receiving the operation instruction, the playback agent opens the segment specified in the operation instruction sent by the player according to the media asset identifier and the segment name through the cached open interface, and then returns the status information of the segment to the player. The status information may include an opened status or an unopened status. If the opening is successful, the status information is an opened status, and if the opening fails, the status information is an unopened status.
[0139] In some embodiments, after receiving the status information, when the status information is in the opened state, the player sends a read instruction for reading one of the segments to the playback agent through a read interface of the http protocol, where the read instruction includes a media asset identifier and a segment name.
[0140] In some embodiments, after receiving the read instruction, the playback agent reads the data of the segment specified in the operation instruction sent by the player according to the segment name through the cached read interface, and then returns the segment data to the player.
[0141] In some embodiments, after the player receives the data of the streaming media segment, it plays the streaming media segment of the media asset according to the data of the segment. The playback process may include: parsing audio and video streams, creating a decoder, decoding audio and video streams, rendering audio and video streams and other conventional steps of streaming media segmentation, which will not be repeated here.
[0142] In some embodiments, after the player reads the data in a streaming media segment of the target media asset through the playback agent, it can continue to send opening instructions and reading instructions for the next streaming media segment to the playback agent to read and play the data of the next streaming media segment of the target media asset, and so on, to achieve continuous playback of the target media asset.
[0143] It can be seen from the above embodiments that the present application sets both the playback agent and the player at the bottom layer of the system so that the playback agent and the player have the basis for data transmission through control instructions, without the need for data transmission through the http protocol, and configures the player interface and the response method of the playback agent so that the playback agent and the player can interact through control instructions (open instructions, read instructions), so that the playback agent can quickly transmit the streaming media data to the player for the player to play, which is beneficial to improving the media playback speed.
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0145] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.
Claims
1. A display device, characterized in that: include: monitor; A controller connected to the display, the controller comprising an application layer and a bottom layer, the application layer being provided with a video playback program, and the bottom layer being provided with a player and a playback agent; The controller is configured to: The video player program of the application layer receives an input media resource playing instruction; In response to the media asset playback instruction, the playback agent is started, and the playback agent is configured to download the streaming media segments of the target media asset corresponding to the media asset playback instruction into a cache after being started, and feed back the playback agent address of the streaming media segments in the cache to the video playback program; The player is started, and a playback instruction of the target media asset is sent to the player, wherein the playback instruction includes the playback agent address and the media asset identifier of the target media asset, and the player is configured to parse the segment name of the streaming media segment from the playback agent address, and control the playback agent to open the streaming media segment through a connection interface of the http protocol, wherein the method of controlling the playback agent to open the streaming media segment includes: the player sends an opening instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the opening instruction, and the player is also configured to control the playback agent to return the video stream data of the streaming media segment through a read interface of the http protocol, wherein the method of controlling the playback agent to return the video stream data of the streaming media segment includes: the player sends a read instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction, and the player is also configured to play the video stream data.
2. The display device according to claim 1, characterized in that The method of controlling the playback agent to open the streaming media segment also includes: If the playback agent returns a message indicating that the streaming media segment fails to be opened, a first http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the first http request.
3. The display device according to claim 1, characterized in that The method of controlling the playback agent to return the video stream data of the streaming media segment also includes: If the playback agent returns a message indicating that the streaming media segment reading failed, a second http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the second http request.
4. The display device according to claim 1, characterized in that The method of controlling the playback agent to open the streaming media segment also includes: When the system type of the display device is the first system type, sending an opening instruction including the media asset identifier and the segment name to the playback agent, the playback agent being configured to open the streaming media segment in the cache in response to the opening instruction; When the system type of the display device is the second system type, a first http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the first http request.
5. The display device according to claim 1, characterized in that The method of controlling the playback agent to return the video stream data of the streaming media segment also includes: When the system type of the display device is the first system type, sending a read instruction including the media asset identifier and the segment name to the playback agent, the playback agent being configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction; When the system type of the display device is the second system type, a second http request including the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to respond to the second http request and feed back the video stream data of the streaming media segment to the player.
6. The display device according to claim 1, characterized in that The method of controlling the playback agent to return the video stream data of the streaming media segment also includes: If the playback agent returns a message indicating that the streaming media segment is opened successfully, a read instruction containing the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction.
7. The display device according to claim 1, characterized in that The video player program is also configured to: In response to the media asset playing instruction, the media asset identifier is obtained from the control data of the control corresponding to the media asset playing instruction.
8. A media resource playing method, characterized in that: Used for a display device, the display device includes a display and a controller, the controller is connected to the display, the controller includes an application layer and a bottom layer, the application layer is provided with a video playback program, and the bottom layer is provided with a player and a playback agent; The media asset playing method comprises: The video player program of the application layer receives an input media resource playing instruction; In response to the media asset playback instruction, the playback agent is started, and the playback agent is configured to download the streaming media segments of the target media asset corresponding to the media asset playback instruction into a cache after being started, and feed back the playback agent address of the streaming media segments in the cache to the video playback program; The player is started, and a playback instruction of the target media asset is sent to the player, wherein the playback instruction includes the playback agent address and the media asset identifier of the target media asset, and the player is configured to parse the segment name of the streaming media segment from the playback agent address, and control the playback agent to open the streaming media segment through a connection interface of the http protocol, wherein the method of controlling the playback agent to open the streaming media segment includes: the player sends an opening instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to open the streaming media segment in the cache in response to the opening instruction, and the player is also configured to control the playback agent to return the video stream data of the streaming media segment through a read interface of the http protocol, wherein the method of controlling the playback agent to return the video stream data of the streaming media segment includes: the player sends a read instruction including the media asset identifier and the segment name to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction, and the player is also configured to play the video stream data.
9. The media resource playing method according to claim 8, characterized in that: The method of controlling the playback agent to return the video stream data of the streaming media segment also includes: If the playback agent returns a message indicating that the streaming media segment is opened successfully, a read instruction containing the media asset identifier and the segment name is sent to the playback agent, and the playback agent is configured to feed back the video stream data of the streaming media segment to the player in response to the read instruction.
10. The media resource playing method according to claim 8, characterized in that: Also includes: In response to the media asset playing instruction, the media asset identifier is obtained from the control data of the control corresponding to the media asset playing instruction.
Citation Information
Patent Citations
Method, system and equipment of stream medium order program
CN101252600A
Streaming media file playing method and media player
CN104394475A
Pre-loading method for short video processing
CN113207011A
Display device and media asset playing method
CN115270030A
Caching control for streaming media
US20040003101A1