WO2022199541A1 - 媒体文件的播放方法、装置、电子设备、服务器和介质 - Google Patents

媒体文件的播放方法、装置、电子设备、服务器和介质 Download PDF

Info

Publication number
WO2022199541A1
WO2022199541A1 PCT/CN2022/082076 CN2022082076W WO2022199541A1 WO 2022199541 A1 WO2022199541 A1 WO 2022199541A1 CN 2022082076 W CN2022082076 W CN 2022082076W WO 2022199541 A1 WO2022199541 A1 WO 2022199541A1
Authority
WO
WIPO (PCT)
Prior art keywords
segment
media file
index information
target
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/082076
Other languages
English (en)
French (fr)
Inventor
刘善国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Publication of WO2022199541A1 publication Critical patent/WO2022199541A1/zh
Priority to US18/372,686 priority Critical patent/US20240031615A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2183Cache memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2401Monitoring of the client buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Definitions

  • the present application belongs to the field of communication technologies, and specifically relates to a method, apparatus, electronic device, server and medium for playing media files.
  • users can use electronic devices to play media files.
  • the user can click the multimedia application icon to trigger the electronic device to display the multimedia application playing interface, and the user can trigger the electronic device to download the media file from the server and play the media file by operating on the playing interface.
  • the electronic device may re-download these repeated segments from the server, resulting in wasted traffic.
  • the purpose of the embodiments of the present application is to provide a method, apparatus, electronic device, server and medium for playing a media file, which can solve the problem of wasted traffic when playing a media file with repeated segments.
  • an embodiment of the present application provides a method for playing a media file, the method comprising:
  • the server Sending a first request message to the server, where the first request message is used to request to play a target media file, the target media file includes a first segment and a second segment, and the playback sequence of the first segment is earlier than the playback sequence of the second segment;
  • the target configuration file includes at least first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment;
  • the cached content is retrieved based on the second index information, and if the second index information is the same as the first index information, the cached first segment is played.
  • an embodiment of the present application also provides a method for playing a media file, the method comprising:
  • the target configuration file includes first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment ;
  • the second index information is the same as the first index information.
  • an embodiment of the present application also provides a device for playing a media file, the device comprising:
  • the sending module is used to send a first request message to the server, where the first request message is used to request to play a target media file, the target media file includes a first segment and a second segment, and the playback order of the first segment is earlier than the playback of the second segment order;
  • a receiving module configured to receive a target configuration file sent by the server, where the target configuration file includes at least first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment;
  • a playback module configured to cache and play the first segment after acquiring the first segment from the server based on the first index information, and associate the first index information with the cached first segment; retrieve the cached content based on the second index information, And when the second index information is the same as the first index information, the buffered first segment is played.
  • an embodiment of the present application also provides a device for playing a media file, the device comprising:
  • a receiving module configured to receive a first request message sent by the electronic device, where the first request message is used to request to play a target media file, the target media file includes a first segment and a second segment, and the playback sequence of the first segment is earlier than that of the second segment the playback order;
  • the sending module is configured to send a target configuration file to the electronic device according to the first request message, the target configuration file includes first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used for for indicating the second segment, wherein, in the case that the second segment and the first segment are duplicate segments, the second index information is the same as the first index information.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor.
  • the program or instruction is executed by the processor, the The steps of the method of the first aspect.
  • an embodiment of the present application provides a server, where a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the second aspect are implemented.
  • an embodiment of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the method for playing a media file according to the first aspect or the second aspect is implemented A step of.
  • an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run programs or instructions to implement the method of the first aspect or the second aspect.
  • the server stores a target configuration file corresponding to the target media file, wherein the target media file includes multiple segments, and the multiple segments include a first segment and a second segment; the target configuration file includes Multiple index information, the multiple index information includes first index information and second index information, the first index information and the second index information are respectively used to indicate the first segment and the second segment in the target media file, wherein the first The playback order of the segment is earlier than the playback order of the second segment.
  • the electronic device When the electronic device requests the server to play the target media file, after the electronic device downloads and plays the first segment from the server according to the first index information, it can cache the first segment in the cache device of the electronic device, and when playing the second segment, If the index information of the second segment and the first segment are the same, that is, the second index information is the same as the first index information, it means that the second segment and the first segment are duplicate segments with duplicate content, and the electronic device no longer needs to download the server from the server again. Instead, it only needs to retrieve the first segment associated with it in the cache device of the electronic device according to the first index information, and play the first segment to achieve the purpose of playing the second segment, without the need for electronic The device downloads the second segment from the server again, which duplicates the first segment. In this way, in the process of playing the target media file with repeated segments, the electronic device no longer needs to repeatedly download the content repeated segments from the server, thereby saving traffic when playing the media files with repeated segments.
  • FIG. 1 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • FIG. 2 is one of schematic diagrams of interaction of a media file playback method provided by an embodiment of the present application
  • FIG. 3 is the second schematic diagram of the interaction of the media file playback method provided by the embodiment of the present application.
  • FIG. 4 is a third schematic diagram of interaction of a media file playback method provided by an embodiment of the present application.
  • FIG. 5 is one of schematic diagrams of operations for dividing a target media file into segments according to an embodiment of the present application
  • FIG. 6 is the second schematic diagram of operations for dividing a target media file into segments according to an embodiment of the present application
  • FIG. 7 is a third schematic diagram of operations for dividing a target media file into segments according to an embodiment of the present application.
  • FIG. 8 is a fourth schematic diagram of interaction of a media file playback method provided by an embodiment of the present application.
  • FIG. 9 is a fifth schematic diagram of interaction of a media file playback method provided by an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of a method for playing a media file performed by an electronic device according to an embodiment of the present application
  • FIG. 11 is a schematic flowchart of a method for playing a media file performed by a server according to an embodiment of the present application
  • FIG. 12 is one of the schematic structural diagrams of a device for playing a media file provided by an embodiment of the application.
  • FIG. 13 is the second schematic structural diagram of a device for playing media files according to an embodiment of the application.
  • FIG. 15 is the second schematic structural diagram of another media file playback device provided by an embodiment of the application.
  • FIG. 16 is a third schematic structural diagram of another media file playback apparatus provided by an embodiment of the application.
  • 17 is a schematic diagram of hardware of an electronic device provided by an embodiment of the present application.
  • FIG. 18 is a schematic diagram of hardware of a server provided by an embodiment of the present application.
  • the execution body of the method for playing media files provided by the embodiments of this application may be a device for playing media files.
  • the connected server may also be a functional module and/or functional entity in the electronic device and the server capable of implementing the media file playback method, which can be specifically determined according to actual usage requirements, which are not limited in the embodiments of the present application.
  • the method for playing a media file provided by the embodiment of the present application can be applied to a scenario in which an electronic device requests a server to play a media file with repeated segments. Or in a scenario where the electronic device requests the server to play a media file in which audio and video are repeated asynchronously.
  • the server stores a target configuration file corresponding to the target media file, wherein the target media file includes multiple segments, and the multiple segments include a first segment and a second segment; the target configuration file includes Multiple index information, the multiple index information includes first index information and second index information, the first index information and the second index information are respectively used to indicate the first segment and the second segment in the target media file, wherein the first The playback order of the segment is earlier than the playback order of the second segment.
  • the electronic device requests the server to play the target media file, after the electronic device downloads and plays the first segment from the server according to the first index information, it can cache the first segment in the memory of the electronic device.
  • the index information of the second segment and the first segment is the same, that is, the second index information is the same as the first index information, indicating that the second segment and the first segment are duplicate segments with duplicate content, and the electronic device does not need to retrieve the data from the server again.
  • To download the second segment it is only necessary to retrieve the first segment associated with it in the memory of the electronic device according to the first index information, and play the first segment to achieve the purpose of playing the second segment, without the need for the electronic device to replay the second segment.
  • a second segment that duplicates the first segment is downloaded from the server. In this way, in the process of playing the target media file with repeated segments, the electronic device no longer needs to repeatedly download the repeated segments from the server, thereby saving traffic when playing the media file with repeated segments.
  • FIG. 1 shows a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system may include at least one electronic device 01 and a server 02 .
  • a connection and communication can be established between at least one electronic device 01 and the server 02 .
  • FIG. 1 uses an example of a wired network connection between at least one electronic device 01 and the server 02 for exemplary illustration, which does not impose any limitation on the embodiments of the present application. It can be understood that, in actual implementation, a wireless network connection may also be used between at least one electronic device 01 and the server 02, which may be determined according to actual usage requirements.
  • the server may be a computer device that manages resources and provides services for electronic devices.
  • a server may include a processor, hard disk, memory, and bus, among others.
  • the electronic device may send to the server a first request message for requesting to play the target media file, and after the server receives the first request message, the server may first send to the electronic device each segment including each segment in the target media file.
  • the target configuration file of the index information that is, the electronic device obtains the target configuration file sent by the server, and then the electronic device can obtain the cached clips from the electronic device according to the index information in the target configuration file to play, or download the electronic device from the server. Fragments that have not been cached are played.
  • the electronic device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA) etc.
  • the non-mobile electronic device may be a personal computer (personal computer, PC), a television (television, TV), a teller machine, or a self-service machine, etc.
  • the embodiments of the present application do not specifically limit it.
  • the electronic device may be an electronic device with an operating system.
  • the operating system may be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • an embodiment of the present application provides a method for playing media files, and the method for playing media files can pass between the electronic device 01 and the server 02 in the communication system shown in FIG. 1 .
  • information exchange the method for playing a media file provided by the embodiment of the present application will be exemplarily described by taking an example that the media file playing apparatuses are an electronic device and a server respectively.
  • the method for playing the media file may include the following steps 201 to 206 .
  • Step 201 The electronic device sends a first request message to the server.
  • the first request message is used for requesting to play the target media file
  • the target media file includes a first segment and a second segment
  • the playback sequence of the first segment is earlier than the playback sequence of the second segment.
  • the above-mentioned first request message may be used to request to play the target media file. It can be understood that the above-mentioned first request message may be used by the electronic device to request the target media file from the server.
  • the electronic device may send the first request message to the server in the following two ways:
  • the electronic device may operate according to the user's play request, and in response to the play request operation, send a first request message to the server. That is, the electronic device may send the first request message to the server under the trigger of the user.
  • the first request message may be triggered and sent by a user's operation to play a request to play the target media file in the target application.
  • the first request message may be triggered and sent by the user's operation of a play button in the play interface of the target application. .
  • the above-mentioned target application may be a multimedia application in an electronic device, such as a video application, an audio application, or other applications that may play audio files and/or video files.
  • a multimedia application in an electronic device such as a video application, an audio application, or other applications that may play audio files and/or video files.
  • it can be determined according to actual usage requirements, which is not limited in this embodiment of the present application.
  • the electronic device may automatically send the first request message to the server.
  • the above-mentioned electronic device may be installed with a certain video application, and after the electronic device enters the playback interface of the video application, a certain recommended video will be automatically played in the playback interface, that is, after the electronic device enters the playback interface, A first request message for playing the recommended video is automatically sent to the server.
  • the above-mentioned target media file may be an audio media file (ie, including audio), a video media file (ie, including video), or an audio-video media file (ie, including audio and video).
  • the above-mentioned target media file may include multiple segments, and the multiple segments include at least a first segment and a second segment, and the playback sequence of the first segment is earlier than the playback sequence of the second segment. That is, the second segment is played only after the electronic device plays the first segment.
  • the first segment and the second segment may be segments with repeated content or may be segments with different contents.
  • the first segment and the second segment are also audio-type media files
  • the above-mentioned target media file is a video-type media file.
  • the first segment and the second segment are also video media files.
  • the second segment is also an audio and video media file.
  • Step 202 The server receives the first request message.
  • the server may receive the first request message sent by the electronic device, and after the server receives the first request message, the server may obtain the first request message according to the first request message.
  • the target configuration file of the target media file indicated by the first request message may be
  • Step 203 The server sends the target configuration file to the electronic device.
  • the target configuration file includes first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment.
  • the server may store multiple media files, each media file is configured with a configuration file, and these configuration files are all stored in the server.
  • the server may respond to the electronic device's playback request for the target media file, and first send the target configuration file corresponding to the target media file to the electronic device .
  • the above-mentioned target configuration file may include multiple index information, the multiple index information includes at least first index information and second index information, and each index information may be used to indicate a target media file.
  • the first index information is used to indicate the first segment and the second index information is used to indicate the second segment.
  • the target configuration file can be used by the electronic device to download each segment in the target media file from the server before playing the target media file.
  • a possible implementation manner is that the foregoing server may perform slice processing on the target media file to obtain multiple slice files (for example, the first segment and the second segment in the embodiment of the present application). , the server configures an index information for each segment. Then, the server may concatenate the above-mentioned multiple index information into a list file (eg, the target configuration file in this embodiment), and store the target configuration file in the server.
  • a list file eg, the target configuration file in this embodiment
  • the above server may also receive the target configuration file uploaded by the media file provider.
  • the electronic device of the media file provider may first perform slice processing on the target media file to obtain multiple slice files (for example, the first segment and the second segment in the embodiment of the present application), and the electronic device of the media file provider One piece of index information is configured for each of the above-mentioned multiple segments, and then the above-mentioned multiple pieces of index information are spliced into a list file (for example, the target configuration file in this embodiment). Then, the electronic device of the media file provider may upload the target configuration file to the server, and after receiving the target configuration file, the server may store the target configuration file in the server.
  • the electronic device of the media file provider may first perform slice processing on the target media file to obtain multiple slice files (for example, the first segment and the second segment in the embodiment of the present application), and then slice the target media file.
  • the multiple segments are sent to the above-mentioned server, and after receiving the multiple segments, the server configures an index information for each segment respectively. Then, the server may concatenate the above-mentioned multiple index information into a list file (eg, the target configuration file in this embodiment), and store the target configuration file in the server.
  • the target configuration file may be configured as a file in M3U8 format.
  • the M3U8 file is essentially a M3U file (Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator), which is similar to the directory information of audio files, video files, and audio and video files.
  • M3U8 files are not audio files, video files and audio and video files, but a list file of audio files, video files and audio and video files.
  • the electronic device opens the M3U8 file, the electronic device does not directly play the M3U8 file, but first obtains the corresponding index information according to the M3U8 file, and then downloads the corresponding segment and plays it.
  • the above-mentioned multiple index information is greater than or equal to two index information.
  • the above index information may be a uniform resource allocator (Uniform Resource Locator, URL), and the URL locates the resource by providing an abstract identifier for the location of the resource.
  • the above index information may also be storage path information, or may be any other possible form of index information, which may be specifically determined according to actual usage requirements, which is not limited in this embodiment of the present application.
  • the above-mentioned same index information can be understood as the same key (key) value of the URL, that is, the URLs with the same key are located at the same address.
  • the above-mentioned same index information can be understood as the same storage path information.
  • Step 204 the electronic device receives the target configuration file.
  • the electronic device can play the segments indicated by the index information according to the index information in the target configuration file. Specifically, the electronic device can download and play the first segment from the server according to the plurality of first index information in the target configuration file, and the electronic device can also download and play the second segment from the server according to the second index information.
  • Step 205 The electronic device caches and plays the first segment, and associates the first index information with the cached first segment.
  • the electronic device may download the first segment from the server according to the first index information in the received target configuration file, cache the first segment in the local cache device of the electronic device, and then store the first segment in the local cache device of the electronic device.
  • the index information is associated with the cached first segment, so that the electronic device can retrieve the first segment according to the first index information, and can read the first segment by the electronic device at any time.
  • the foregoing electronic device may include a cache device.
  • the cache device may be a static memory (SRAM), also known as a random access memory, which has a fast storage speed for data (such as index information, segments, etc.) or instructions (instructions for playing segments, instructions for reading segments, etc.).
  • SRAM static memory
  • instructions instructions for playing segments, instructions for reading segments, etc.
  • the first segment may be cached in the electronic device.
  • the first segment may be cached in the electronic device.
  • the electronic device may further cache the text indicating the association relationship between the first segment and the first index information in the cache device.
  • Step 206 The electronic device plays the buffered first segment when the second index information is the same as the first index information.
  • the above-mentioned electronic device can confirm whether there are already cached fragments of the same content in the electronic device according to the second index information.
  • the first index information in the The first index information that is the same as the second index information is read from the buffer device and the buffered first segment is played.
  • the server can send the target configuration file corresponding to the target media file.
  • the target media file includes multiple segments, and the multiple segments include the first segment and the second segment;
  • the target configuration file includes multiple index information, and the multiple index information includes the first index information and the second index information,
  • the first index information and the second index information are respectively used to indicate the first segment and the second segment in the target media file, wherein the playback sequence of the first segment is earlier than the playback sequence of the second segment.
  • the electronic device When the content of the second segment is repeated with the first segment, the electronic device no longer downloads the second segment from the server, but reads it from the cache device of the electronic device. Take the first fragment that has been cached. Therefore, when there are duplicate segments in the target media file, if the electronic device has cached the duplicate segments, the electronic device no longer needs to repeatedly download the duplicate segments from the server, thereby avoiding the waste of traffic when the electronic device plays the media file, and, The efficiency of playing media files by the electronic device is also improved.
  • the method for playing a media file may further include the following steps: 207 to step 208.
  • Step 207 The electronic device acquires the second segment from the server based on the second index information.
  • the above-mentioned electronic device can confirm whether there are already cached fragments of the same content in the electronic device according to the second index information. segment, the electronic device can download the second segment from the server.
  • the electronic device when the electronic device performs retrieval according to the second index information, if the same index information as the second index information is not retrieved, it means that there is no cached segment duplicated with the second segment in the electronic device. If the electronic device needs to play the second segment, it needs to download the second segment from the server before it can be played.
  • Step 208 The electronic device caches and plays the second segment, and associates the second index information with the cached second segment.
  • the second segment is cached in the cache device of the electronic device.
  • the electronic device can establish an association relationship between the second index information and the second segment, so that the electronic device can directly read the segment after the second segment that duplicates the content of the second segment.
  • the second segment in the device is cached locally without the need to download the duplicate segment from the server again.
  • the second segment may be cached in the electronic device.
  • the second segment may be cached in the electronic device.
  • the electronic device may further cache the text of the association relationship between the second segment and the second index information in the caching device.
  • the method for playing a media file provided by the embodiment of the present application is only when the cache device of the electronic device does not cache the segment indicated by the index information that is the same as the second index information, that is, the cache device of the electronic device does not cache the segment indicated by the index information that is the same as the second index information.
  • the electronic device is only required to obtain the second segment from the server and play the second segment. Therefore, the electronic device can determine whether to download the second segment from the server according to whether its cache device stores a duplicate segment with the same content as the second segment, so that the electronic device can avoid downloading the second segment from the server when responding to the user's playback request. Traffic waste caused by duplicate segments.
  • Step 209 the server identifies the target media file.
  • the server may perform an identification operation on the above-mentioned target media file. Specifically, the server identifies whether there is a duplicate segment in the target media file, and if there is a duplicate segment, step 210 is performed.
  • Step 210 The server divides the target media file into multiple segments.
  • the multiple segments include a first segment and a second segment.
  • the server may divide the target media file into multiple segments according to the scene content of the target media file.
  • the server may According to the content of the target media file, each segment of repeated actions is divided into a video segment, such as a first segment and a second segment.
  • the server can , divides each segment of repeated audio into an audio segment, such as the first segment and the second segment.
  • the server can For the content of the media file, each audio and video synchronous repeating segment is divided into an audio and video segment, such as the first segment and the second segment.
  • step 210 may be implemented by the following step 210a.
  • Step 210a If the duration of the repeated segments in the target media file is greater than or equal to a preset threshold, the server divides the target media file into a first segment and a second segment.
  • the duration of the above-mentioned repeated segment may be the duration required for completely playing the repeated audio segment.
  • a division method in which a target media file is divided into a plurality of segments is shown, and the above-mentioned target media file includes repeated segments of audio and video synchronously repeated, for example, the target media file is divided into 6 segments, and the first The 5 clips and the 1st clip are repeating clips in which the audio and video are repeated synchronously. If the duration of the first clip or the fifth clip is greater than or equal to the preset threshold, the server confirms that the repeated scene content of the first clip or the fifth clip is longer, indicating that the electronic device needs to download the above-mentioned repeated clips from the server. It consumes a lot of traffic, and it is necessary to divide the target media file into multiple segments, so that when the electronic device plays the repeated segments, it is not necessary to repeatedly download the repeated segments from the server.
  • the division method is the same as that when the target media file is an audio and video file.
  • a target media file is a video target media file, it is divided into multiple segments.
  • the above-mentioned target media file includes repeated segments of the video repetition.
  • the target media file is divided into 6 segments, and the third segment, the fourth segment and the fifth segment are the repeated segments of the video repetition.
  • the server confirms that the content of the scenes repeated by the 3rd, 4th, and 5th segments is longer, and the electronic device Downloading the above-mentioned repeated segments from the server requires a lot of traffic, and it is necessary to divide the target media file into multiple segments for slicing processing, so that the electronic device does not need to repeatedly download these repeated segments from the server when playing the repeated segments.
  • a target media file is an audio target media file
  • the above target media file includes repeated audio clips.
  • the target media file is divided into 6 clips, and each of the six clips has the same content, that is, the six clips are all repeated audio clips. If the duration of these 6 clips is greater than or equal to the preset threshold, the server confirms that the repeated scene content of these 6 clips is long, and the electronic device needs to download the above-mentioned repeated clips from the server, which consumes a lot of traffic, and it is necessary to convert the target media file It is divided into multiple segments, so that when the electronic device plays the repeated segments, it is not necessary to repeatedly download the repeated segments from the server.
  • the server may perform slice processing on the target media file by identifying the segment repetition of the target media file, divide the target media file into multiple segments, and configure the corresponding first index information and the second index information, so that the electronic device does not need to repeatedly download the repeated segments from the server when playing the repeated segments, so that the electronic device can achieve the purpose of saving traffic when playing the target media file.
  • the method for playing a media file provided by the embodiment of the present application may further include the following step 211 .
  • Step 211 based on the presence of duplicate segments in the media file where the audio and video are synchronously repeated, the server processes the media file into a target media file.
  • the above-mentioned media file may be a media file in which audio and video are repeated synchronously.
  • the server regards the above-mentioned media file as a target media file, that is, the server regards the above-mentioned media file as a target media file file, and configure a target configuration file for the target media file, that is, an M3U8 file.
  • the "repeated segment with synchronous repetition of audio and video” means: the video content of at least two segments in the multiple segments in the media file is the same, and the audio content is also the same.
  • the duration of the above-mentioned "repeated segment of audio and video synchronously repeated” may also be greater than or equal to a preset threshold. Media files are sliced. If the duration of the repeated audio and video synchronously repeated segment is very short, and the electronic device consumes less traffic to download the repeated segment from the server, it is not necessary for the server to perform slicing processing on the media file as the target media file.
  • the server may separate the audio and video of the media file into two parts. After each target media file is obtained, slice processing is performed on each target media file.
  • the media file in the case that the media file has audio and video synchronous repeated segments, the media file is processed into a target media file, so that the electronic device uses a player to play the audio of the target media file at the same time. and video.
  • the method for playing a media file provided by the embodiment of the present application may further include the following step 212 .
  • Step 212 The electronic device starts the first player to play the first segment and the second segment of the target media file according to the target configuration file of a target media file.
  • the above-mentioned first player can be used to play the video and audio of the target media file (that is, the player can play both the audio in the target media file and the audio in the target media file. video).
  • the first segment and the second segment are audio and video segments.
  • the above-mentioned first player can play the first segment and the second segment of the target media file.
  • the electronic device uses the first player to play the first segment and the second segment according to the first index information and the second index information
  • the second index information is the same as the first index information
  • the electronic device no longer downloads the second segment from the server, but reads the cached first segment from the cache device of the electronic device, and uses the first player to play the first segment. a fragment.
  • the method for the electronic device to play the first segment and the second segment according to the first index information and the second index information in the target configuration file will be described in detail in the foregoing embodiment, and will not be repeated here.
  • the electronic device uses one player to play the first segment and the second segment in the target media file indicated by the first index information and the second index information, which can save player resources.
  • the audio and video synchronization when the target media file is played is ensured, thereby improving the playback efficiency of the terminal device.
  • the method for playing the media file provided by the embodiment of the present application may further include the following step 213 .
  • Step 213 Based on the existence of duplicate segments in the audio or video in the media file, the server processes the media file into two target media files.
  • one target media file in the two target media files is an audio file
  • the other target media file in the two target media files is a video file
  • the above-mentioned media file may be a media file in which audio or video has duplicate segments respectively.
  • the server separates the above-mentioned media file into two target media files, one of which is an audio file. , that is, the audio target media file, and the other is the video file, that is, the video target media file.
  • the server separates the above media file into two target media files, and each target media file contains a first segment and a second segment. .
  • the above-mentioned server can also configure two target configuration files for the two target media files respectively, that is, the server configures two M3U8 files respectively for the above-mentioned two target media files, and each M3U8 file includes the first index information and the second index information. Index information, the first index information in each M3U8 file is used to indicate the first segment in the M3U8 file, and the second index information is used to indicate the second segment in the M3U8 file.
  • the data frame of the media file may carry type identifiers, and through these identifiers, it can be determined whether the data frame is an audio data frame or a video data frame.
  • the media file may contain both audio data frames and video data frames.
  • the above-mentioned server can extract the audio data frame and the video data frame respectively from the media file, and the extracted audio data frame can be generated as a target media file, that is, the above-mentioned audio target media file, and the extracted video data frame can be generated as a target media file.
  • the target media file that is, the above-mentioned video target media file.
  • the server when the server is requested by the electronic device to play a media file, if the server separates the media file into two target media files, the server will send a corresponding identification code to the electronic device, and the electronic device Send two first request messages to the server simultaneously according to the identification code, so that the electronic device can use different players to play the two target media files.
  • the target configuration files of the two target media files may be different configuration files. That is to say, the first index information of the audio target media file and the first index information of the video target media file may be different index information, and the second index information of the audio target media file and the second index information of the video target media file may be different. for different index information.
  • “there are duplicate segments in the audio or video” means: there are duplicate segments in the audio in the media file, there are duplicate segments in the video in the media file, or there are duplicate segments in both the audio and video in the media file, But the repetition of audio and video is out of sync. As shown in FIG. 8 , the contents of the third to fifth segments in the video target media file are repeated, but the third to fifth segments in the audio target media file are different from each other.
  • the server separates the media file into two target media files, which are respectively an audio target media file and a video target media file, and one or two of the target media files include repeated segments. Therefore, according to the actual situation of the media files, slice processing can be performed on the two target media files respectively, so as to further save the traffic of downloading the repeated segments.
  • the method for playing a media file provided by the embodiment of the present application may further include the following step 214 .
  • Step 214 the electronic device starts the second player to play the first segment and the second segment in a target media file according to the target configuration file of a target media file, and the electronic device starts the third player according to the target configuration of another target media file.
  • the file plays the first segment and the second segment from another target media file.
  • the electronic device may start two players for playing the two target media files respectively.
  • the server separates the media file into two target media files, wherein one target media file is a video target media file, and the other target media file is an audio target question file.
  • the electronic device uses the second player to play the video target media file, and uses the third player to play the audio target media file.
  • the electronic device uses the second player to play the first segment (the first segment in this embodiment) and the second segment according to the target configuration file of the video target media file, since the electronic device has not cached the same video segment, it needs to be Request to download 1st and 2nd fragment from server.
  • the index information of the third segment and the first segment is the same, and the file contents are both segment 1.
  • segment 1 is directly read and played from the buffer device.
  • the electronic device uses the second player to play the fourth segment and the fifth segment, it also directly reads and plays segment 1 from the buffer device. Since the index information of the 6 segments in the audio target media file is different, the contents of the indicated segments are also different, so the third player plays the 6 segments of the audio target media file according to the target configuration file of the audio target media file. , the 6 segments need to be downloaded from the server.
  • segment duration and number of segments in the above-mentioned video target media file may be the same or different from the segment duration and number of segments in the above-mentioned video target media file.
  • the server separates the media file into two target media files, wherein one target media file is a video target media file, and the other target media file is an audio target question file.
  • the electronic device uses the second player to play the video target media file, and uses the third player to play the audio target media file.
  • the electronic device uses the second player to play 6 clips according to the target configuration file of the video target media file, the index information of the 6 clips is different, and the contents of the indicated clips are also different, so the second player is playing the 6 clips.
  • the electronic device needs to request to download the 6 segments from the server.
  • the electronic device uses the third player to play 6 segments according to the target configuration file of the audio target media file, the first segment (the first segment in this embodiment) to the sixth segment (the second segment in this embodiment) ), the index information is the same, and the file content is segment 1. Only the first segment needs to be downloaded from the server. When playing the remaining 5 segments, segment 1 is directly read from the cache device of the electronic device and played.
  • the electronic device uses two players to play two target media files respectively.
  • the repeated repeated segments are read and played separately, thereby further saving the traffic of the electronic device for downloading the repeated segments according to the respective repetitions of the audio and video in the media file.
  • an embodiment of the present application provides a method for playing a media file
  • the execution subject is an electronic device, and the method includes:
  • Step 1001 Send a first request message to a server.
  • the first request message is used for requesting to play the target media file
  • the target media file includes a first segment and a second segment
  • the playback sequence of the first segment is earlier than the playback sequence of the second segment.
  • Step 1002 Receive the target configuration file sent by the server.
  • the target configuration file includes first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment.
  • Step 1003 Cache and play the first segment, and associate the first index information with the cached first segment.
  • Step 1004 Play the buffered first segment when the second index information is the same as the first index information.
  • the above method further includes steps 1005 to 1006:
  • Step 1005 Obtain the second segment from the server based on the second index information.
  • Step 1006 Cache and play the second segment, and associate the second index information with the cached second segment.
  • the above method further includes step 1007:
  • Step 1007 Start the first player to play the first segment and the second segment according to the first index information and the second index information.
  • the above method further includes step 1008:
  • Step 1008 start the second player to play the first segment and the second segment in a target media file according to the target configuration file of a target media file, and the electronic device starts the third player to play according to the target configuration file of another target media file.
  • the first segment and the second segment in another target media file start the second player to play the first segment and the second segment in a target media file according to the target configuration file of a target media file, and the electronic device starts the third player to play according to the target configuration file of another target media file.
  • the first segment and the second segment in another target media file.
  • steps 1001 to 1008 in the method for playing media files provided by the embodiments of the present application, reference may be made to the steps performed by the electronic device and the related descriptions of the effects achieved in the foregoing embodiments. To avoid repetition, details are not repeated here.
  • an embodiment of the present application provides a method for playing a media file
  • the execution subject is a server
  • the method includes:
  • Step 1101 Receive a first request message sent by the electronic device.
  • the first request message is used for requesting to play the target media file
  • the target media file includes a first segment and a second segment
  • the playback sequence of the first segment is earlier than the playback sequence of the second segment.
  • Step 1102 Send the target configuration file to the electronic device according to the first request message.
  • the target configuration file includes first index information and second index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment.
  • the above method further includes:
  • Step 1103 Identify the target media file.
  • Step 1104 Divide the target media file into multiple segments.
  • the multiple segments include a first segment and a second segment.
  • step 1104 specifically includes step 1104a:
  • Step 1104a If the duration of the repeated segments in the target media file is greater than or equal to a preset threshold, divide the target media file into a first segment and a second segment.
  • the above method further includes:
  • Step 1105 Based on the presence of repeated segments of audio and video synchronously repeated in the media file, the server processes the media file into a target media file.
  • the above method further includes:
  • Step 1106 Based on the presence of duplicate segments in the audio or video in the media file, the media file is processed into two target media files.
  • One of the two target media files is an audio file
  • the other of the two target media files is a video file.
  • steps 1101 to 1106 in the media file playback method provided by the embodiments of the present application, reference may be made to the steps performed by the server and the related descriptions of the effects achieved in the foregoing embodiments, which are not repeated here to avoid repetition.
  • an embodiment of the present application provides an apparatus 1200 for playing a media file.
  • the apparatus 1200 for playing the media file may include a sending module 1201 , a receiving module 1202 and a playing module 1203 .
  • the sending module 1201 is used to send a first request message to the server.
  • the first request message is used to request to play a target media file.
  • the target media file includes a first segment and a second segment.
  • the playback order of the first segment is earlier than that of the second segment.
  • the playback sequence of the clips; the receiving module 1202 is used to receive the target configuration file sent by the server after the sending module sends 1201 the first request message.
  • the target configuration file includes at least the first index information and the second index information.
  • the first index information uses For indicating the first segment, the second index information is used for indicating the second segment.
  • the playback module 1203 is configured to cache and play the first segment after the receiving module 1202 obtains the first segment from the server based on the first index information, and associate the first index information with the cached first segment; the playback module 1203 is further based on the The second index information retrieves the cached content, and if the second index information is the same as the first index information, the cached first segment is played.
  • the playback module 1203 may also be configured to obtain the second segment from the server based on the second index information when the second index information is different from the first index information; and cache and play the first segment. two segments, and associate the second index information with the cached second segment.
  • the media file playback apparatus 1200 may further include a start-up module 1204 for starting the first media file when the number of target media files is one.
  • a player plays the first segment and the second segment according to the first index information and the second index information.
  • the startup module 1204 is used to start the second player according to the target of a target media file.
  • the configuration file plays the first segment and the second segment in one target media file, and starts the third player to play the first segment and the second segment in the other target media file according to the target configuration file of the other target media file.
  • the apparatus for playing a media file provided in the embodiment of the present application can implement each process implemented by the electronic device in the foregoing method embodiment, and to avoid repetition, details are not repeated here.
  • a media file playback device when the media file playback device downloads a segment of a target media file from a server, the media file playback device can first determine the local location according to the second index information of the second segment Whether there is a cached first segment with the same index information in the cache device of the first segment, and play the first segment without downloading the second segment from the server again. In this way, the device for playing a media file does not need to download the repeated segment repeatedly during the process of playing the target media file having the repeated segment, thereby saving the traffic for downloading the repeated segment.
  • the apparatus for playing a media file provided in the embodiment of the present application can implement each process implemented by the electronic device in the foregoing method embodiment, and to avoid repetition, details are not repeated here.
  • an embodiment of the present application provides an apparatus 1500 for playing a media file.
  • the apparatus 1500 for playing the media file may include a receiving module 1501 and a sending module 1502 .
  • the receiving module 1501 is configured to receive a first request message sent by the electronic device, the first request message is used to request to play a target media file, the target media file includes a first segment and a second segment, and the playback order of the first segment is earlier than that of the second segment.
  • the playback order of the clips may include a receiving module 1501 and a sending module 1502 .
  • the receiving module 1501 is configured to receive a first request message sent by the electronic device, the first request message is used to request to play a target media file, the target media file includes a first segment and a second segment, and the playback order of the first segment is earlier than that of the second segment. The playback order of the clips.
  • the sending module 1502 is configured to send a target configuration file to the electronic device according to the first request message received by the receiving module 1501, where the target configuration file includes first index information and second index information, and the first index information is used to indicate the first segment , the second index information is used to indicate the second segment; wherein, in the case that the second segment and the first segment are duplicate segments, the second index information is the same as the first index information.
  • the apparatus 1500 for playing the media file may further include an identification module 1503 .
  • the identifying module 1503 is configured to identify the target media file before the sending module 1502 sends the target configuration file to the electronic device.
  • the media file playing apparatus 1500 may further include a dividing module 1504 .
  • the dividing module 1504 is configured to divide the target media file into multiple segments if there are duplicate segments in the target media file, and the multiple segments include the first segment and the second segment.
  • the dividing module 1504 is specifically configured to divide the target media file into a first segment and a second segment if the duration of the repeated segments in the target media file is greater than or equal to a preset threshold.
  • the apparatus 1500 for playing the media file may further include a processing module 1505 .
  • the processing module 1505 is used to process the media file as a target media file based on the repeated segments of audio and video synchronization in the media file; based on the presence of repeated segments in the audio or video in the media file, the media file is processed into two targets For media files, one of the two target media files is an audio file, and the other of the two target media files is a video file.
  • the apparatus for playing a media file provided by the embodiment of the present application can implement each process implemented by the server in the foregoing method embodiment, and to avoid repetition, details are not described here.
  • An embodiment of the present application provides a media file playback device, because before the electronic device sends a first request message to the media file playback device, the media file playback device can first process and identify the target media file, and send the media file to the electronic device.
  • a target configuration file is sent, where the target configuration file includes multiple index information, and the multiple index information includes first index information and second index information. Therefore, the electronic device can receive the target configuration file according to the first request message, so that when the electronic device downloads the segments according to the index information, it is not necessary to download duplicate segments, thereby saving traffic.
  • FIG. 17 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present application.
  • the electronic device 1700 includes but is not limited to: a radio frequency unit 1701 , a network unit 1702 , an audio output unit 1703 , an input unit 1704 , a sensor 1705 , a display unit 1706 , a user input unit 1707 , an interface unit 1708 , and a memory 1709 , a processor 1710, and components such as a power supply.
  • a radio frequency unit 1701 a radio frequency unit 1701
  • the electronic device 1700 includes but is not limited to: a radio frequency unit 1701 , a network unit 1702 , an audio output unit 1703 , an input unit 1704 , a sensor 1705 , a display unit 1706 , a user input unit 1707 , an interface unit 1708 , and a memory 1709 , a processor 1710, and components such as a power supply.
  • the radio frequency unit 1701 is used to send a first request message to the server, and is used to send a first request message to the server, where the first request message is used to request to play a target media file, and the target media file includes a first segment and a second segment, The playback sequence of the first segment is earlier than the playback sequence of the second segment; the radio frequency unit 1701 is further configured to receive the target configuration file sent by the server, and the target configuration file includes the target configuration file including at least the first index information and the second index information, and the first index information and the second index information are included in the target configuration file.
  • One index information is used to indicate the first segment
  • the second index information is used to indicate the second segment.
  • the memory 1709 is configured to cache the first segment in the memory 1708 after the radio frequency unit 1701 receives the first segment sent by the server.
  • the audio output unit 1703 and/or the display unit 1706 are used to play the first segment.
  • the processor 1710 is configured to associate the first index information with the buffered first segment after the audio output unit 1703 and/or the display unit 1706 play the first segment.
  • the audio output unit 1703 and/or the display unit 1706 are further configured to retrieve the cached content with the second index information after the first segment is cached in the memory, and play the content when the second index information is the same as the first index information.
  • the first fragment of the cache is further configured to retrieve the cached content with the second index information after the first segment is cached in the memory, and play the content when the second index information is the same as the first index information.
  • the first fragment of the cache are further configured to retrieve the cached content with the second index information after the first segment is cached in the memory, and play the content when the second index information is the same as the first index information.
  • the first fragment of the cache is further configured to retrieve the cached content with the second index information after the first segment is cached in the memory, and play the content when the second index information is the same as the first index information.
  • the server can send the target configuration file corresponding to the target media file and including multiple index information, so that the electronic device The 1700 can play the target media file in segments. Therefore, when there are duplicate segments in the target media file, if the electronic device 1700 has cached the duplicate segments, the electronic device 1700 does not need to repeatedly download the duplicate segments from the server, thereby avoiding the waste of traffic when the electronic device 1700 plays the media file. , and the efficiency of playing media files by the electronic device 1700 is also improved.
  • the radio frequency unit 1701 is further configured to acquire the second segment from the server based on the second index information when the second index information is different from the first index information, and cache the second segment in the memory 1708 .
  • the processor 1710 is further configured to associate the second index information with the second segment.
  • the processor 1710 is further configured to start an audio output unit 1703 and/or a display unit 1706 to play the first segment and the first segment according to the first index information and the second index information when the number of target media files is one. Second segment.
  • the processor 1710 activates two frequency output units 1703 and/or display units 1706, wherein one frequency output unit 1703 and/or display unit 1706 is based on the first index information and the second frequency output unit 1706.
  • the index information plays the first segment and the second segment in one target media file
  • the other audio output unit 1703 and/or the display unit 1706 plays the first segment in another target media file according to the first index information and the second index information and the second fragment.
  • the radio frequency unit 1701 can be used for receiving and sending signals during sending and receiving of information or during a call. Specifically, after receiving the downlink data from the base station, it is processed by the processor 1710; The uplink data is sent to the base station.
  • the radio frequency unit 1701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency unit 1701 can also communicate with the network and other devices through a wireless communication system.
  • the electronic device provides the user with wireless broadband Internet access through the network unit 1702, such as helping the user to send and receive emails, browse web pages, access streaming media, and the like.
  • the audio output unit 1703 may convert audio data received by the radio frequency unit 1701 or the network unit 1702 or stored in the memory 1709 into audio signals and output as sound. Also, the audio output unit 1703 may also provide audio output related to a specific function performed by the electronic device 1700 (eg, call signal reception sound, message reception sound, etc.).
  • the audio output unit 1703 includes a speaker, a buzzer, a receiver, and the like.
  • the memory 1709 may be used to store software programs as well as various data.
  • the memory 1709 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc.
  • memory 1709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the processor 1710 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the memory 1709, and calling the data stored in the memory 1709. , perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole.
  • the processor 1710 may include one or more processing units; optionally, the processor 1710 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem
  • the modulation processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1710.
  • the electronic device 1700 includes some functional modules not shown, which will not be repeated here.
  • an embodiment of the present application further provides an electronic device, including a processor 1710 as shown in FIG. 17 , a memory 1709 , a computer program stored in the memory 1709 and executable on the processor 1710 , the computer program being When the processor 1710 executes, each process of the foregoing method embodiment is implemented, and the same technical effect can be achieved, which is not repeated here.
  • FIG. 18 is a schematic diagram of a hardware structure of a server according to an embodiment of the present application.
  • the server 1800 may include: one or more processors 1801 , a memory 1802 , a communication interface 1803 and a bus 1804 .
  • the processor 1801 can be configured to receive a first request message sent by the electronic device through the bus 1804 and the communication interface 1803, where the first request message is used to request to play a target media file, and the target media file includes a first segment and a second segment, The playback sequence of the first segment is earlier than the playback sequence of the second segment, then the target configuration file is sent to the electronic device through the bus 1804 and the communication interface 1803, and the target configuration file is sent to the electronic device.
  • the target configuration file includes the first index information and the first index information. Two index information, the first index information is used to indicate the first segment, and the second index information is used to indicate the second segment. The index information is the same.
  • the server 1800 may perform slice processing on the target media file, divide the target media file into multiple segments, and configure corresponding index information, so that when the electronic device plays the repeated segments according to the index information, the These repeated segments need to be downloaded from the server repeatedly, so that the electronic device can achieve the purpose of saving traffic when playing the target media file.
  • the processor 1801 may also identify the target media file; if there are duplicate segments in the target media file, the target media file is divided into multiple segments, and the multiple segments include the first segment and the second segment.
  • the processor 1801 may further divide the target media file into multiple segments.
  • the processor 1801 is configured to process the media file as a target media file based on the presence of repeated segments of audio and video synchronously in the media file; based on the presence of repeated segments in the audio or video in the media file, the media The file is processed as two target media files, one of the two target media files is an audio file, and the other of the two target media files is a video file.
  • one or more processors 1801 , a memory 1802 , and a communication interface 1803 are connected to each other through a bus 1804 .
  • the bus 1804 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus 1804 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the server 1800 may also include some functional modules not shown, which will not be repeated here.
  • an embodiment of the present application further provides a server, including the processor 1801 shown in FIG. 18 , a memory 1802 , and a computer program stored in the memory 1802 and executable on the processor 1801 , the computer program being executed by the processor
  • a server including the processor 1801 shown in FIG. 18 , a memory 1802 , and a computer program stored in the memory 1802 and executable on the processor 1801 , the computer program being executed by the processor
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by the radio frequency unit 1701, the memory 1709, the processor 1710 as shown in FIG. 17 or the computer program shown in FIG. 18 .
  • the processor 1801 shown implements each process of the foregoing method embodiments when executed, and can achieve the same technical effect. To avoid repetition, details are not repeated here.
  • the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk, or an optical disk.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above embodiment of the media file playback method and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种媒体文件的播放方法、装置、电子设备、服务器和介质,属于通信技术领域。该方法包括:向服务器发送第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段;接收服务器发送的目标配置文件,目标配置文件至少包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段;在基于第一索引信息从服务器获取第一片段后,缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联;基于第二索引信息检索缓存内容,并在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。

Description

媒体文件的播放方法、装置、电子设备、服务器和介质
相关申请的交叉引用
本申请主张在2021年03月26日在中国提交的中国专利申请号为202110328077.1的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于通信技术领域,具体涉及一种媒体文件的播放方法、装置、电子设备、服务器和介质。
背景技术
随着通信技术的发展,电子设备的使用越来越普及。
目前,用户可以使用电子设备播放媒体文件。具体的,用户可以通过点击多媒体应用图标,从而触发电子设备显示多媒体应用播放界面,用户通过在该播放界面进行操作以触发电子设备从服务器上下载媒体文件,并播放该媒体文件。
但是有些情况下,由于上述媒体文件中可能存在重复片段(例如,运动视频中的重复动作),因此如果按照上述方式,电子设备可能会从服务器重新下载这些重复片段,从而导致流量浪费。
发明内容
本申请实施例的目的是提供一种媒体文件的播放方法、装置、电子设备、服务器和介质,能够解决在播放具有重复片段的媒体文件时产生的流量浪费问题。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种媒体文件的播放方法,该方法包括:
向服务器发送第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;
接收服务器发送的目标配置文件,目标配置文件至少包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段;
在基于第一索引信息从服务器获取第一片段后,缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联;
基于第二索引信息检索缓存内容,并在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
第二方面,本申请实施例还提供了一种媒体文件的播放方法,该方法包括:
接收电子设备发送的第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;
根据第一请求消息,向电子设备发送目标配置文件,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段;
在第二片段与第一片段为重复片段的情况下,第二索引信息与第一索引信息相同。
第三方面,本申请实施例还提供了一种媒体文件的播放装置,该装置包括:
发送模块,用于向服务器发送第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;
接收模块,用于接收服务器发送的目标配置文件,目标配置文件至少包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段;
播放模块,用于在基于第一索引信息从服务器获取第一片段后,缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联;基于第二索引信息检索缓存内容,并在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
第四方面,本申请实施例还提供了一种媒体文件的播放装置,该装置包括:
接收模块,用于接收电子设备发送的第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;
发送模块,用于根据第一请求消息,向电子设备发送目标配置文件,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段,其中,在第二片段与第一片段为重复片段的情况下,第二索引信息与第一索引信息相同。
第五方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。
第六方面,本申请实施例提供了一种服务器,服务器上存储程序或指令,程序或指令被处理器执行时实现如第二方面的方法的步骤。
第七方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现如第一方面或第二方面的媒体文件的播放方法的步骤。
第八方面,本申请实施例提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面或第二方面的方法。
在本申请实施例中,服务器中存储有与目标媒体文件对应的目标配置文件,其中,目标媒体文件中包括多个片段,多个片段中包括第一片段和第二片段;目标配置文件中包括多个索引信息,多个索引信息中包括第一索引信息和第二索引信息,第一索引信息和第二索引信息分别用于指示目标媒体文件中的第一片段和第二片段,其中第一片段的播放顺序早于第二片段的播放顺序。当电子设备向服务器请求播放目标媒体文件时,电子设备根据第一索引信息从服务器下载并播放第一片段后,可以将第一片段缓存在电子设备的缓存装置内,当播放第二片段时,如果第二片段和第一片段的索引信息相同,也即第二索引信息与第一索引信息相同,说明第二片段与第一片段是内容重复的重复片段,则电子设备不再需要再次从服务器中下载第二片段,而是只需要根据第一索引信息在电子设备的缓存装置中检索到与其关联的第一片段,并播放第一片段即可达到播放第二片段的目的,而不需要电子设备再次从服务器中下载与第一片段重复的第二片段。如此,电子设备在播放具有重复片段的目标媒体文件的过程中,不再需要从服务器重复下载内容重复片段,进而节省了播放具有重复片段的媒体文件时的流量。
附图说明
图1为本申请实施例提供的通信系统的架构示意图;
图2为本申请实施例提供的媒体文件播放方法的交互示意图之一;
图3为本申请实施例提供的媒体文件播放方法的交互示意图之二;
图4为本申请实施例提供的媒体文件播放方法的交互示意图之三;
图5为本申请实施例提供的目标媒体文件划分为片段的操作示意图之一;
图6为本申请实施例提供的目标媒体文件划分为片段的操作示意图之二;
图7为本申请实施例提供的目标媒体文件划分为片段的操作示意图之三;
图8为本申请实施例提供的媒体文件播放方法的交互示意图之四;
图9为本申请实施例提供的媒体文件播放方法的交互示意图之五;
图10为本申请实施例提供的电子设备执行媒体文件播放方法的流程示意图;
图11为本申请实施例提供的服务器执行媒体文件播放方法的流程示意图;
图12为本申请实施例提供的一种媒体文件的播放装置的结构示意图之一;
图13为本申请实施例提供的一种媒体文件的播放装置的结构示意图之二;
图14为本申请实施例提供的另一种媒体文件的播放装置的结构示意图之一;
图15为本申请实施例提供的另一种媒体文件的播放装置的结构示意图之二;
图16为本申请实施例提供的另一种媒体文件的播放装置的结构示意图之三;
图17为本申请实施例提供的电子设备的硬件示意图;
图18为本申请实施例提供的服务器的硬件示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例提供的媒体文件的播放方法的执行主体可以为媒体文件的播放装置,该装置可以为上述的电子设备(包括移动电子设备和非移动电子设备),也可以为与上述电子设备建立连接的服务器,还可以为该电子设备和服务器中能够实现该媒体文件的播放方法的功能模块和/或功能实体,具体的可以根据实际使用需求确定,本申请实施例不作限定。本申请实施例提供的媒体文件的播放方法可以应用于电子设备向服务器请求播放具有重复片段的媒体文件的场景中,例如,电子设备向服务器请求播放音频和视频同步重复的媒体文件的场景中,或者电子设备向服务器请求播放音频和视频异步重复的媒体文件的场景中。
在本申请实施例中,服务器中存储有与目标媒体文件对应的目标配置文件,其中,目标媒体文件中包括多个片段,多个片段中包括第一片段和第二片段;目标配置文件中包括多个索引信息,多个索引信息中包括第一索引信息和第二索引信息,第一索引信息和第二索引信息分别用于指示目标媒体文件中的第一片段和第二片段,其中第一片段的播放顺序早于第二片段的播放顺序。当电子设备向服务器请求播放目标媒体文件时,电子设备根据第一索引信息从服务器下载并播放第一片段后,可以将第一片段缓存在电子设备的存储器内,当播放第二片段时,如果第二片段和第一片段的索引信息相同,也即第二索引信息与第一索引信息相同,说明第二片段与第一片段是内容重复的重复片段,则电子设备不再需要再次从服务器中下载第二片段,而是只需要根据第一索引信息在电子设备的存储器中检索到与其关联的第一片段,并播放第一片段即可达到播放第二片段的目的,而不需要电子设备再次从服务器中下载与第一片段重复的第二片段。如此,电子设备在播放具有重复片段的目标媒体文件的过程中,不再需要从服务器重复下载这些重复片段,进而节省了播放具有重复片段的媒体文件时的流量。
下面结合图1至图17,通过具体的实施例及其应用场景对本申请实施例提供的媒体文件的播放方法、装置、电子设备及服务器进行详细地说明。
示例性的,图1示出了本申请实施例提供的一种通信系统的架构示意图。如图1所示,该通信系统可以包括至少一个电子设备01和服务器02。其中,至少一个电子设备01和服务器02之间可以建立连接并进行通信。
可选的,上述图1是以至少一个电子设备01和服务器02之间为有线网络连接为例进行示例性说明,其并不对本申请实施例造成任何限定。可以理解,实际实现时,至少一个电子设备01和服务器02之间还可以为无线网络连接,具体可以根据实际使用需求确定。
可选的,本申请实施例中,服务器可以为管理资源并为电子设备提供服务的计算机设备。服务器可以包括处理器、硬盘、存储器和总线等。
可选的,本申请实施例中,电子设备可以向服务器发送请求播放目标媒体文件的第一请求消息,服务器接收到第一请求消息之后,服务器可以先向电子设备发送包括目标媒体文件中各个片段的索引信息的目标配置文件,即电子设备获取服务器发送的目标配置文件,然后电子设备可以根据目标配置文件中的索引信息从电子设备中获取已经缓存的片段播放,或者从服务器中下载电子设备中还未缓存的片段播放。
可选的,本申请实施例中,电子设备可以为移动电子设备,也可以为非移动电子设备。 移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等;非移动电子设备可以为个人计算机(personalcomputer,PC)、电视机(television,TV)、柜员机或者自助机等;本申请实施例不作具体限定。
可选的,本申请实施例中,电子设备可以为具有操作系统的电子设备。该操作系统可以为安卓操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
基于如图1所示的通信系统,本申请实施例提供一种媒体文件的播放方法,且该媒体文件的播放方法可以通过如图1所示的通信系统中的电子设备01和服务器02之间的信息交互实现。下面以媒体文件的播放装置分别为电子设备和服务器为例,对本申请实施例提供的媒体文件的播放方法进行示例性的描述。如图2所示,该媒体文件的播放方法可以包括下述的步骤201至步骤206。
步骤201、电子设备向服务器发送第一请求消息。
其中,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序。
其中,上述第一请求消息可以用于请求播放目标媒体文件。可以理解,上述第一请求消息可以用于电子设备向服务器请求目标媒体文件。
本申请实施例中,电子设备可以通过以下两种方式向服务器发送第一请求消息:
第一种方式,电子设备可以根据用户的播放请求操作,并响应于该播放请求操作,向服务器发送第一请求消息。即电子设备可以在用户的触发下向服务器发送第一请求消息。
示例性的,第一请求消息可以为用户对目标应用中的目标媒体文件的播放请求操作触发发送的,例如第一请求消息可以为用户对目标应用的播放界面中的播放按键进行操作触发发送的。
可选的,本申请实施例中,上述目标应用可以为电子设备中的多媒体类应用,如视频类应用、音频类应用,或者可能播放音频文件和/或视频文件的其他类应用。具体可以根据实际使用需求确定,本申请实施例不做限定。
第二种方式,电子设备可以自动向服务器发送第一请求消息。
示例性的,上述电子设备可以安装有某视频类应用,在电子设备进入到视频类应用的播放界面之后,该播放界面中会自动播放某个推荐视频,即电子设备在进入该播放界面后,会自动向服务器发送播放该推荐视频的第一请求消息。
可选的,本申请实施例中,上述目标媒体文件可以为音频类媒体文件(即包含音频)、视频类媒体文件(即包含视频)或者音视频类媒体文件(即包含音频和视频)。
可选的,本申请实施例中,上述目标媒体文件中可以包括多个片段,多个片段中至少包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序,也即在电子设备播放第一片段之后才播放第二片段。
可选的,本申请实施例中,上述第一片段和第二片段可能是内容重复片段也可能是内容不同的片段。
可选的,本申请实施例中,上述目标媒体文件为音频类媒体文件(即只包含音频)的情况下,第一片段和第二片段也是音频类媒体文件,上述目标媒体文件为视频类媒体文件(即只包含视频)的情况下,第一片段和第二片段也是视频类媒体文件,在上述目标媒体文件为音视频类媒体文件(即包含音频和视频)的情况下,第一片段和第二片段也是音视频类媒体文件。
步骤202、服务器接收第一请求消息。
本申请实施例中,电子设备向服务器发送第一请求消息之后,服务器可以接收电子设备发送的第一请求消息,在服务器接收到该第一请求消息之后,服务器可以根据该第一请求消息,获取该第一请求消息指示的目标媒体文件的目标配置文件。
对于服务器获取目标媒体文件的目标配置文件的方法将在下述实施例中进行详细的描述,此处不予赘述。
步骤203、服务器向电子设备发送目标配置文件。
其中,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段。
可选的,本申请实施例中,上述服务器中可以存储有多个媒体文件,每个媒体文件均配置有配置文件,这些配置文件均存储在服务器内。当电子设备向服务器请求播放某个媒体文件,例如上述的目标媒体文件时,服务器可以响应于电子设备的对目标媒体文件的播放请求,先向电子设备发送与该目标媒体文件对应的目标配置文件。
可选的,本申请实施例中,上述目标配置文件中可以包括多个索引信息,多个索引信息中至少包括第一索引信息和第二索引信息,每个索引信息可以用于指示目标媒体文件中的一个片段,如第一索引信息用于指示第一片段以及第二索引信息用于指示第二片段。该目标配置文件可以用于电子设备在播放目标媒体文件之前,从服务器中下载目标媒体文件中的各个片段。
可选的,本申请实施例中,一种可能的实现方式是,上述服务器可以对目标媒体文件进行切片处理后得到多个切片文件(例如本申请实施例中的第一片段和第二片段),服务器为每个片段分别配置一个索引信息。然后,服务器可以将上述多个索引信息拼接成一个列表文件(例如本实施例中的目标配置文件),并将该目标配置文件存储在服务器中。
另一种可能的实现方式是,上述服务器还可以接收媒体文件提供方上传的目标配置文件。具体的,媒体文件提供方的电子设备可以先对目标媒体文件进行切片处理,得到多个切片文件(例如本申请实施例中的第一片段和第二片段),并且媒体文件提供方的电子设备为上述多个片段各分别配置一个索引信息,再将上述多个索引信息拼接成一个列表文件(例如本实施例中的目标配置文件)。然后,该媒体文件提供方的电子设备可以将目标配置文件上传至服务器,服务器接收该目标配置文件之后,可以将该目标配置文件存储在服务器中。
又一种可能的实现方式是,媒体文件提供方的电子设备可以先对目标媒体文件进行切片处理,得到多个切片文件(例如本申请实施例中的第一片段和第二片段),再将该多个片段发送至上述服务器,该服务器接收该多个片段之后,为每个片段分别配置一个索引信息。然后,服务器可以将上述多个索引信息拼接成一个列表文件(例如本实施例中的目标配置文件),并将该目标配置文件存储在服务器中。
可选的,本申请实施例中,目标配置文件可以被配置为M3U8格式的文件。M3U8文件实质上也是一种M3U文件(Moving Picture Experts Group Audio Layer 3 Uniform Resource Locator),M3U文件类似于音频文件、视频文件和音视频文件的目录信息。
需要说明的是,M3U8文件不是音频文件、视频文件和音视频文件,而是音频文件、视频文件和音视频文件的列表文件。当电子设备打开M3U8文件后,电子设备并不是直接播放该M3U8文件的,而是先根据该M3U8文件获取到相应的索引信息,然后再下载对应的片段并进行播放。
可选的,本申请实施例中,上述多个索引信息为大于或等于2个的索引信息。
可选的,本申请实施例中,上述索引信息可以为统一资源分配符(Uniform Resource Locator,URL),URL通过提供资源位置的一种抽象标志符来对资源进行定位。上述索引信息也可以为存储路径信息,还可以为其他任意可能形式的索引信息,具体可以根据实际使用需求确定,本申请实施例不做限定。
可以理解的,本申请实施例中,上述相同的索引信息可以理解为URL的key(键)值相同,也即具有相同key的URL定位的地址相同。或者,上述相同的索引信息可以理解为存储路径信息相同。
步骤204、电子设备接收目标配置文件。
本申请实施例中,上述电子设备接收到服务器发送的目标配置文件之后,电子设备可以根据目标配置文件中的索引信息,播放这些索引信息指示的片段。具体的,电子设备可以根据目标配置文件中的多个第一索引信息从服务器中下载并播放第一片段,电子设备也可以根据第二索引信息从服务器中下载并播放第二片段。
步骤205、电子设备缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联。
本申请实施例中,上述电子设备可以根据接收的目标配置文件中的第一索引信息从服务器中下载第一片段,并将第一片段缓存在电子设备本地的缓存装置的中,再将第一索引信息与缓存的第一片段进行关联,以便于电子设备根据第一索引信息能够检索到第一片段,并能够随时供电子设备读取第一片段。
可选的,本申请实施例中,上述电子设备可以包括缓存装置。该缓存装置可以为静态 存储器(SRAM),又称随机存储器,其对数据(如索引信息、片段等)或者指令(播放片段的指令、读取片段的指令等)存储速度快。
可选的,本申请实施例中,在电子设备接收到第一片段之后,可以将第一片段缓存在电子设备内。
可选的,本申请实施例中,上述电子设备在播放完上述第一片段之后,可以将第一片段缓存在电子设备内。
可选的,本申请实施例中,上述电子设备还可以将指示第一片段和第一索引信息的关联关系文本缓存在缓存装置内。
步骤206、电子设备在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
本申请实施例中,上述电子设备可以根据第二索引信息确认电子设备中是否存在已经缓存的相同内容的片段,如果电子设备的缓存装置中存在与第二索引信息相同的索引信息(本实施例中的第一索引信息),则说明电子设备中存在与第二片段具有相同内容的片段且该片段(本实施例中的第一片段)已经缓存在本地的缓存装置中,则电子设备直接根据与第二索引信息相同的第一索引信息从缓存装置中读取并播放该缓存的第一片段。
本申请实施例提供的媒体文件的播放方法,由于在电子设备向服务器发送播放目标媒体文件的第一请求消息之后,服务器可以发送与目标媒体文件相应的的目标配置文件。其中,目标媒体文件中包括多个片段,多个片段中包括第一片段和第二片段;目标配置文件中包括多个索引信息,多个索引信息中包括第一索引信息和第二索引信息,第一索引信息和第二索引信息分别用于指示目标媒体文件中的第一片段和第二片段,其中,第一片段的播放顺序早于第二片段的播放顺序。电子设备在播放目标媒体文件时能够分片段播放该目标媒体文件,当第二片段与第一片段内容重复时,电子设备不再从服务器下载第二片段,而是从电子设备的缓存装置中读取已经缓存的第一片段。因此,在目标媒体文件中存在重复片段时,如果电子设备中已经缓存了重复片段,则电子设备不再需要反复从服务器下载重复片段,从而可以避免电子设备播放媒体文件时的流量浪费,并且,也提高了电子设备播放媒体文件的效率。
可选的,本申请实施例中,如图3所示,在第二索引信息与第一索引信息不同的情况下,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤207至步骤208。
步骤207、电子设备基于第二索引信息,从服务器获取第二片段。
本申请实施例中,上述电子设备可以根据第二索引信息确认电子设备中是否存在已经缓存的相同内容的片段,如果电子设备根据第二索引信息确认没有缓存与第二索引信息具有相同索引信息的片段,那么电子设备可以从服务器中下载该第二片段。
可以理解的,当电子设备根据第二索引信息进行检索时,如果没有检索到与第二索引信息相同的索引信息,则说明电子设备中不存在与第二片段重复的已经缓存的片段。如果电子设备需要播放第二片段,则需要先从服务器中下载该第二片段,才能再行播放。
步骤208、电子设备缓存并播放第二片段,并将第二索引信息与缓存的第二片段进行关联。
本申请实施例中,上述电子设备在播放第二片段后,将第二片段缓存在电子设备的缓存装置中。在将第二片段进行缓存后,电子设备可以建立第二索引信息与第二片段的关联关系,以便于在播放位于第二片段之后的与第二片段内容重复片段时,电子设备可以直接读取本地缓存装置中的第二片段,而不需要再次从服务器中下载重复片段。
可选的,本申请实施例中,在电子设备接收到第二片段之后,可以将第二片段缓存在电子设备内。
可选的,本申请实施例中,上述电子设备在播放完上述第二片段之后,可以将第二片段缓存在电子设备内。
可选的,本申请实施例中,上述电子设备还可以将第二片段和第二索引信息的关联关系文本缓存在缓存装置内。
本申请实施例提供的媒体文件的播放方法,只有在电子设备的缓存装置中未缓存与第二索引信息相同的索引信息所指示片段时,也即电子设备的缓存装置中未缓存有与第二片段重复片段时,才需要电子设备从服务器中获取该第二片段,并播放该第二片段。因此,该电子设备能够根据其缓存装置是否存储有与第二片段内容相同的重复片段,确定是否从 服务器下载该第二片段,从而可以避免电子设备在响应于用户的播放请求时,从服务器下载重复片段造成的流量浪费。
可选的,本申请实施例中,结合图2,如图4所示,服务器在接收电子设备发送的第一请求消息之前,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤209至步骤210。
步骤209、服务器识别目标媒体文件。
本申请实施例中,服务器在接收到媒体文件提供方上传的目标媒体文件之后,可以对上述目标媒体文件进行识别操作。具体的,服务器识别目标媒体文件中是否存在重复片段,如果存在重复片段,则执行步骤210。
步骤210、服务器将目标媒体文件划分为多个片段。
其中,多个片段中包括第一片段和第二片段。
可选的,本申请实施例中,服务器可以根据目标媒体文件的场景内容将目标媒体文件划分为多个片段。
示例性的,在目标媒体文件为视频文件的情况下,如果目标媒体文件存在重复片段,例如目标媒体文件为运动教程类的媒体文件时,由于场景内容多数为按照节拍不断重复的动作,服务器可以根据目标媒体文件的内容,将每个重复动作的片段划分为一个视频片段,如第一片段和第二片段。
示例性的,在目标媒体文件为音频文件的情况下,如果目标媒体文件存在重复的音频片段,例如目标媒体文件为音频内容不断重复的白噪音类媒体文件时,服务器可以根据目标媒体文件的内容,将每个重复音频的片段划分为一个音频片段,如第一片段和第二片段。
示例性的,在目标媒体文件为音视频文件的情况下,如果目标媒体文件存在音频和视频同步重复片段,例如目标媒体文件为音视频内容不断同步重复的风景类媒体文件时,服务器可以根据目标媒体文件的内容,将每个音视频同步重复片段划分为一个音视频片段,如第一片段和第二片段。
具体的,上述步骤210可以通过下述的步骤210a实现。
步骤210a、若目标媒体文件中的重复片段的时长大于或等于预设阈值,则服务器将目标媒体文件划分为第一片段和第二片段。
可选的,本申请实施例中,上述重复片段的时长可以为完整播放该重复音片段所需要的时长。
示例性的,如图5,示出了一个目标媒体文件被划分为多个片段的划分方式,上述目标媒体文件包括音频和视频同步重复的重复片段,例如目标媒体文件划分为6个片段,第5个片段和第1个片段为音频和视频同步重复的重复片段。如果第1个片段或第5个片段的时长大于或等于预设阈值,则服务器确认第1个片段或第5个片段的重复的场景内容较长,说明电子设备从服务器中下载上述重复片段需要耗费较多的流量,有必要将目标媒体文件划分为多个片段,以供电子设备在播放重复片段时,不需要反复从服务器中下载这些重复片段。
可以理解的是,当目标媒体文件为音频文件或者视频文件时,其划分方式与目标媒体文件为音视频文件时的划分方式相同。示例性的,如图6,示出了一个目标媒体文件为视频目标媒体文件时被划分为多个片段的划分方式。上述目标媒体文件包括视频重复的重复片段,例如目标媒体文件划分为6个片段,第3个片段、第4个片段和第5个片段为视频重复的重复片段。如果第3个片段、第4个片段和第5个片段的时长大于或等于预设阈值,则服务器确认第3个片段、第4个片段和第5个片段重复的场景内容较长,电子设备从服务器中下载上述重复片段需要耗费较多的流量,有必要将目标媒体文件切片处理划分为多个片段,以供电子设备在播放重复片段时,不需要反复从服务器中下载这些重复片段。
示例性的,如图7,示出了一个目标媒体文件为音频目标媒体文件时被划分为多个片段的划分方式。上述目标媒体文件包括音频重复的重复片段,例如目标媒体文件划分为6个片段,这6个片段中的每一个片段的内容均相同,也即这6个片段均为音频重复的重复片段。如果这6个片段的时长大于或等于预设阈值,则服务器确认这6个片段重复的场景内容较长,电子设备从服务器中下载上述重复片段需要耗费较多的流量,有必要将目标媒体文件划分为多个片段,以供电子设备在播放重复片段时,不需要反复从服务器中下载这些重复片段。
本申请实施例提供的媒体文件的播放方法,服务器可以通过识别目标媒体文件的片段重复情况,对目标媒体文件进行切片处理,将目标媒体文件划分为多个片段,并配置对应的第一索引信息和第二索引信息,以供电子设备在播放重复片段时,不需要反复从服务器中下载这些重复片段,使电子设备在播放目标媒体文件时能够达到节省流量的目的。
可选的,本申请实施例中,结合图4,如图8所示,服务器在识别目标媒体文件之前,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤211。
步骤211、基于媒体文件中存在音频和视频同步重复的重复片段,服务器将媒体文件处理为一个目标媒体文件。
本申请实施例中,上述媒体文件可以为音频和视频同步重复的媒体文件,当音频和视频同步重复时,服务器将上述媒体文件作为一个目标媒体文件,也即服务器将上述媒体文件作为一个目标媒体文件,并为该目标媒体文件配置一个目标配置文件,也即一个M3U8文件。
需要说明的是,“音频和视频同步重复的重复片段”的意思为:媒体文件中多个片段中至少存在两个片段的视频内容相同,音频内容也相同。可选的,本申请实施例中,上述“音频和视频同步重复的重复片段”的时长也可以大于或等于预设阈值,当上述重复片段的时长较长,说明服务器有必要将媒体文件作为目标媒体文件进行切片处理。如果音频和视频同步重复的重复片段的时长很短,电子设备从服务器中下载该重复片段所消耗的流量较少,则服务器没有必要将媒体文件作为目标媒体文件进行切片处理。
可选的,本申请实施例中,“音频和视频同步重复的重复片段”的时长如果小于预设阈值,并且媒体文件的音频或视频单独重复,服务器可以将媒体文件的音频和视频分离为两个目标媒体文件后,再对每一个目标媒体文件进行切片处理。
本申请实施例提供的媒体文件的播放方法,在媒体文件存在音视频同步重复片段的情况下,将媒体文件处理为一个目标媒体文件,以使电子设备使用一个播放器同时播放目标媒体文件的音频和视频。
可选的,本申请实施例中,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤212。
步骤212、电子设备启动第一播放器根据一个目标媒体文件的目标配配置文件播放目标媒体文件的第一片段和第二片段。
可选的,本申请实施例中,上述第一播放器可以用于播放目标媒体文件的视频和音频(即该一个播放器既可以播放目标媒体文件中的音频,又可以播放目标媒体文件中的视频)。
可选的,本申请实施例中,第一片段和第二片段为音视频片段。上述第一播放器可以播放目标媒体文件的第一片段和第二片段。
可以理解的,本实施例中,电子设备使用第一播放器根据第一索引信息和第二索引信息播放第一片段和第二片段时,如果第二索引信息与第一索引信息相同,则说明第二片段与第一片段的内容相同,电子设备不再从服务器下载第二片段,而是从电子设备的缓存装置中读取已经缓存的第一片段,并使用改第一播放器播放该第一片段。对于电子设备根据目标配置文件中的第一索引信息和第二索引信息播放第一片段和第二片段的方法将在上述实施例中进行了详细的描述,此处不再赘述。
本申请实施例提供的媒体文件的播放方法,电子设备使用一个播放器播放第一索引信息和第二索引信息所指示的目标媒体文件中的第一片段和第二片段,可以在节省播放器资源的基础上,保证目标媒体文件播放时的音画同步,进而提高了终端设备的播放效率。
可选的,本申请实施例中,结合图4,如图9所示,服务器在识别目标媒体文件之前,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤213。
步骤213、基于媒体文件中的音频或者视频中存在重复片段,服务器将媒体文件处理为两个目标媒体文件。
其中,两个目标媒体文件中的一个目标媒体文件为音频文件,两个目标媒体文件中的另一个目标媒体文件为视频文件。
本申请实施例中,上述媒体文件可以为音频或者视频分别存在重复片段的媒体文件,当音频和视频分别存在重复片段时,服务器将上述媒体文件分离为两个目标媒体文件,其中一个是音频文件,也即音频目标媒体文件,另外一个是视频文件,也即视频目标媒体文 件,服务器将上述媒体文件分离为两个目标媒体文件,其中每个目标媒体文件中都包含第一片段和第二片段。上述服务器也可以为该两个目标媒体文件分别配置两个目标配置文件,也即服务器为上述两个目标媒体文件分别配置两个M3U8文件,每个M3U8文件中均包括第一索引信息和第二索引信息,每个M3U8文件中的第一索引信息用于指示该M3U8文件中的第一片段,第二索引信息用于指示该M3U8文件中第二片段。
需要说明的是,媒体文件的数据帧可以带有类型标识,通过这些标识可以确定数据帧为音频数据帧还是视频数据帧。本申请实施例中,媒体文件中可以既包含有音频数据帧也包含有视频数据帧。上述服务器可以从媒体文件中分别提取出音频数据帧和视频数据帧,提取出的音频数据帧可以生成为一个目标媒体文件,也即上述音频目标媒体文件,提取出的视频数据帧可以生成为一个目标媒体文件,也即上述视频目标媒体文件。
可选的,本申请实施例中,当服务器被电子设备请求播放媒体文件时,如果服务器将该媒体文件分离为两个目标媒体文件时,服务器将向上述电子设备发送相应的识别码,电子设备根据识别码向服务器同时发送两个第一请求消息,以使电子设备能够分别使用不同的播放器播放该两个目标媒体文件。
可选的,本申请实施例中,两个目标媒体文件的目标配置文件可以为不同的配置文件。也就是说,音频目标媒体文件的第一索引信息与视频目标媒体文件的第一索引信息可以为不同的索引信息,音频目标媒体文件的第二索引信息与视频目标媒体文件的第二索引信息可以为不同的索引信息。
示例性的,“音频或者视频存在重复片段”的意思为:媒体文件中的音频中存在重复片段、媒体文件中的视频中存在重复片段,或者媒体文件中的音频和视频中都存在重复片段,但是音频和视频的重复不同步。如图8所示,视频目标媒体文件的第3个片段至第5个片段内容重复,但音频目标媒体文件中的第3个片段至第5个片段却各不相同。
本申请实施例提供的媒体文件的播放方法,服务器通过分离媒体文件为两个目标媒体文件,分别为音频目标媒体文件和视频目标媒体文件,其中的一个或者两个目标媒体文件中包括重复片段,从而能够根据媒体文件的实际情况,对两个目标媒体文件分别进行切片处理,以进一步地节省下载重复片段的流量。
可选的,本申请实施例中,本申请实施例提供的媒体文件的播放方法,还可以包括下述的步骤214。
步骤214、电子设备启动第二播放器根据一个目标媒体文件的目标配置文件播放一个目标媒体文件中的第一片段和第二片段,电子设备启动第三播放器根据另一个目标媒体文件的目标配置文件播放另一个目标媒体文件中的第一片段和第二片段。
可选的,本申请实施例中,当媒体文件被分离为两个目标媒体文件时,电子设备可以启动两个播放器,分别用于播放两个目标媒体文件。
示例性的,本申请实施例中,如图6所示,服务器将媒体文件分离为两个目标媒体文件,其中一个目标媒体文件为视频目标媒体文件,另一个目标媒体文件为音频目标问题文件。电子设备使用第二播放器播放视频目标媒体文件,使用第三播放器播放音频目标媒体文件。电子设备使用第二播放器根据视频目标媒体文件的目标配置文件播放第1个片段(本实施例中的第一片段)和第2个片段时,由于电子设备未缓存过同样的视频片段,需要从服务器请求下载第1个片段和第2个片段。在第二播放器播放到第3个片段时(本实施例中的第二片段),第3个片段和第1个片段的索引信息相同,文件内容都是片段1,且由于片段1之前已经播放过,就直接从缓存装置中读取并播放片段1。电子设备使用第二播放器播放到第4个片段和第5个片段时,同样直接从缓存装置中读取并播放片段1。而由于音频目标媒体文件中的6个片段的索引信息不同,其指示的片段的内容也不相同,所以第三播放器在根据音频目标媒体文件的目标配置文件播放音频目标媒体文件的6个片段时,需要从向服务器中下载该6个片段。
需要说明的是,上述视频目标媒体文件中的片段时长和片段数量和上述视频目标媒体文件中片段时长和片段数量可以相同也可以不同。
示例性的,本申请实施例中,如图7所示,服务器将媒体文件分离为两个目标媒体文件,其中一个目标媒体文件为视频目标媒体文件,另一个目标媒体文件为音频目标问题文件。电子设备使用第二播放器播放视频目标媒体文件,使用第三播放器播放音频目标媒体文件。电子设备使用第二播放器根据视频目标媒体文件的目标配置文件播放6个片段时,6 个片段的索引信息不同,其指示的片段的内容也不相同,所以第二播放器在播放6个片段时,电子设备需要从服务器请求下载该6个片段。电子设备使用第三播放器根据音频目标媒体文件的目标配置文件播放6个片段时,第1个片段(本实施例中的第一片段)至第6个片段(本实施例中的第二片段)的索引信息均相同,文件内容都是片段1,只有第1个片段需要请求从服务器下载,播放其余5个片段时,就直接从电子设备的缓存装置中读取并播放片段1。
本申请实施例提供的媒体文件的播放方法,在电子设备使用两个播放器分别播放两个目标媒体文件,电子设备可以分别根据媒体文件的音频和视频的重复情况,从电子设备的缓存装置中分别读取播放重复的重复片段,进而进一步地根据媒体文件中音频和视频各自的重复情况节省了电子设备下载重复片段的流量。
如图10所示,本申请实施例提供一种媒体文件的播放方法,执行主体为电子设备,该方法包括:
步骤1001、向服务器发送第一请求消息。
其中,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序。
步骤1002、接收服务器发送的目标配置文件。
其中,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段。
步骤1003、缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联。
步骤1004、在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
可选的,在第二索引信息与第一索引信息不同的情况下,上述方法还包括步骤1005至步骤1006:
步骤1005、基于第二索引信息,从服务器获取第二片段。
步骤1006、缓存并播放第二片段,并将第二索引信息与缓存的第二片段进行关联。
可选的,上述方法还包括步骤1007:
步骤1007、启动第一播放器根据第一索引信息和第二索引信息播放第一片段和第二片段。
可选的,上述方法还包括步骤1008:
步骤1008、启动第二播放器根据一个目标媒体文件的目标配置文件播放一个目标媒体文件中的第一片段和第二片段,电子设备启动第三播放器根据另一个目标媒体文件的目标配置文件播放另一个目标媒体文件中的第一片段和第二片段。
本申请实施例提供的媒体文件的播放方法,对于步骤1001至步骤1008的描述可以参见上述实施例中电子设备执行的步骤和所达到的效果的相关描述,为避免重复,此处不再赘述。
如图11所示,本申请实施例提供一种媒体文件的播放方法,执行主体为服务器,该方法包括:
步骤1101、接收电子设备发送的第一请求消息。
其中,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序。
步骤1102、根据第一请求消息,向电子设备发送目标配置文件。
其中,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段。
可选的,在步骤1101之前,上述方法还包括:
步骤1103、识别目标媒体文件。
步骤1104、将目标媒体文件划分为多个片段。
其中,多个片段中包括第一片段和第二片段。
可选的,步骤1104具体包括步骤1104a:
步骤1104a、若目标媒体文件中的重复片段的时长大于或等于预设阈值,则将目标媒体文件划分为第一片段和第二片段。
可选的,在步骤1103之前,上述方法还包括:
步骤1105、基于媒体文件中存在音频和视频同步重复的重复片段,服务器将媒体文件 处理为一个目标媒体文件。
可选的,在步骤1103之前,上述方法还包括:
步骤1106、基于媒体文件中的音频或者视频中分别存在重复片段,媒体文件处理为两个目标媒体文件。两个目标媒体文件中的一个目标媒体文件为音频文件,两个目标媒体文件中的另一个目标媒体文件为视频文件。
本申请实施例提供的媒体文件的播放方法,对于步骤1101至步骤1106的描述可以参见上述实施例中服务器执行的步骤和所达到的效果的相关描述,为避免重复,此处不再赘述。
如图12所示,本申请实施例提供一种媒体文件的播放装置1200。该媒体文件的播放装置1200可以包括发送模块1201、接收模块1202和播放模块1203。其中,发送模块1201,用于向服务器发送第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;接收模块1202,用于在发送模块发1201送第一请求消息之后接收服务器发送的目标配置文件,目标配置文件至少包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段。播放模块1203用于对于在接收模块1202基于第一索引信息从服务器获取第一片段后,缓存并播放第一片段,并将第一索引信息与缓存的第一片段进行关联;播放模块1203还基于第二索引信息检索缓存内容,并在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
可选的,本申请实施例中,播放模块1203还可以用于在第二索引信息与第一索引信息不同的情况下,基于第二索引信息,从服务器获取第二片段;且缓存并播放第二片段,并将第二索引信息与缓存的第二片段进行关联。
可选的,本申请实施例中,结合图12,如图13所示,该媒体文件的播放装置1200还可以包括启动模块1204,用于在目标媒体文件的数量为一个的情况下,启动第一播放器根据第一索引信息和第二索引信息播放第一片段和第二片段。或者,在目标媒体文件的数量为两个,两个目标媒体文件分别为一个媒体文件的音频文件和视频文件的情况下;启动模块1204,用于启动第二播放器根据一个目标媒体文件的目标配置文件播放一个目标媒体文件中的第一片段和第二片段,且启动第三播放器根据另一个目标媒体文件的目标配置文件播放另一个目标媒体文件中的第一片段和第二片段。
本申请实施例提供的媒体文件的播放装置能够实现上述方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
本申请实施例提供的一种媒体文件的播放装置,当媒体文件的播放装置从服务器下载目标媒体文件的片段的过程中,媒体文件的播放装置可以先根据第二片段的第二索引信息确定本地的缓存装置中是否存在已经缓存的具有相同索引信息的第一片段,若存在,说明第二片段的内容与第一片段的内容重复,那么媒体文件的播放装置将直接从缓存装置中直接读取该第一片段,并且播放第一片段,而不需要再次从服务器下载第二片段。如此,媒体文件的播放装置在播放具有重复片段的目标媒体文件的过程中,不需要重复下载该重复片段,进而节省了下载重复片段的流量。
本申请实施例提供的媒体文件的播放装置能够实现上述方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
如图14所示,本申请实施例提供一种媒体文件的播放装置1500。该媒体文件的播放装置1500可以包括接收模块1501和发送模块1502。接收模块1501,用于接收电子设备发送的第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序。发送模块1502,用于根据接收模块1501接收的第一请求消息,向电子设备发送目标配置文件,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段;其中,在第二片段与第一片段为重复片段的情况下,第二索引信息与第一索引信息相同。
可选的,本申请实施例中,结合图14,如图15所示,该媒体文件的播放装置1500还可以包括识别模块1503。识别模块1503用于在发送模块1502向电子设备发送目标配置文件之前,识别目标媒体文件。该媒体文件的播放装置1500还可以包括划分模块1504。划分模块1504用于若目标媒体文件中存在重复片段,则将目标媒体文件划分为多个片段,多个片段包括第一片段和第二片段。
可选的,本申请实施例中,划分模块1504具体用于若目标媒体文件中的重复片段的时长大于或等于预设阈值,则将目标媒体文件划分为第一片段和第二片段。
可选的,本申请实施例中,结合图14,如图16所示,该媒体文件的播放装置1500还可以包括处理模块1505。处理模块1505用于基于媒体文件中存在音频和视频同步重复的重复片段,将媒体文件处理为一个目标媒体文件;基于媒体文件中的音频或者视频中存在重复片段,将媒体文件处理为两个目标媒体文件,两个目标媒体文件中的一个目标媒体文件为音频文件,两个目标媒体文件中的另一个目标媒体文件为视频文件。
本申请实施例提供的媒体文件的播放装置能够实现上述方法实施例中服务器实现的各个过程,为避免重复,这里不再赘述。
本申请实施例提供一种媒体文件的播放装置,由于在电子设备向媒体文件的播放装置发送第一请求消息之前,媒体文件的播放装置可以先对目标媒体文件进行处理和识别,并向电子设备发送目标配置文件,目标配置文件中包括多个索引信息,多个索引信息中包括第一索引信息和第二索引信息。因此,使得电子设备可以根据该第一请求消息,接收该目标配置文件,进而使电子设备根据索引信息下载片段时,免于下载重复片段,进而节省了流量。
图17为实现本申请各个实施例的一种电子设备的硬件结构示意图。如图17所示,该电子设备1700包括但不限于:射频单元1701、网络单元1702、音频输出单元1703、输入单元1704、传感器1705、显示单元1706、用户输入单元1707、接口单元1708、存储器1709、处理器1710、以及电源等部件。本领域技术人员可以理解,图17中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本申请实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、以及计步器等。
其中,射频单元1701,用于向服务器发送第一请求消息,用于向服务器发送第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序;射频单元1701还用于接收服务器发送的目标配置文件,目标配置文件中包括目标配置文件至少包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段。
可选的,存储器1709,用于在射频单元1701接收服务器发送的第一片段之后,在存储器1708缓存第一片段。音频输出单元1703和/或显示单元1706用于播放第一片段。
可选的,处理器1710,用于在音频输出单元1703和/或显示单元1706播放第一片段之后,将第一索引信息与缓存的第一片段。
可选的,音频输出单元1703和/或显示单元1706还用于在存储器缓存第一片段之后,第二索引信息检索缓存内容,并在第二索引信息与第一索引信息相同的情况下,播放缓存的第一片段。
本申请实施例提供的电子设备,由于在电子设备1700向服务器发送播放目标媒体文件的第一请求消息之后,服务器可以发送与目标媒体文件相应的包含多个索引信息的目标配置文件,使电子设备1700能够分片段播放该目标媒体文件。因此,在目标媒体文件中存在重复片段时,如果电子设备1700中已经缓存了重复片段,则电子设备1700不再需要反复从服务器下载重复片段,从而可以避免电子设备1700播放媒体文件时的流量浪费,并且,也提高了电子设备1700播放媒体文件的效率。
可选的,射频单元1701还用于在第二索引信息与第一索引信息不同的情况下,基于第二索引信息从服务器获取第二片段,并缓存在存储器1708中。音频输出单元1703和/或显示单元1706在播放第二片段后,处理器1710还用于将第二索引信息与第二片段进行关联。
可选的,处理器1710还用于在目标媒体文件的数量为一个的情况下,启动一个音频输出单元1703和/或显示单元1706根据第一索引信息和第二索引信息播放第一片段和第二片段。在目标媒体文件的数量为两个的情况下,处理器1710启动两个频输出单元1703和/或显示单元1706,其中一个频输出单元1703和/或显示单元1706根据第一索引信息和第二索引信息播放一个目标媒体文件中的第一片段和第二片段,另一个音频输出单元1703和/或显示单元1706根据第一索引信息和第二索引信息播放另一个目标媒体文件中的第一片段和第二片段。
应理解的是,本申请实施例中,射频单元1701可用于收发信息或通话过程中,信号的 接收和发送,具体的,将来自基站的下行数据接收后,给处理器1710处理;另外,将上行的数据发送给基站。通常,射频单元1701包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元1701还可以通过无线通信系统与网络和其他设备通信。
电子设备通过网络单元1702为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元1703可以将射频单元1701或网络单元1702接收的或者在存储器1709中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元1703还可以提供与电子设备1700执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元1703包括扬声器、蜂鸣器以及受话器等。
存储器1709可用于存储软件程序以及各种数据。存储器1709可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1709可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器1710是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器1709内的软件程序和/或模块,以及调用存储在存储器1709内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器1710可包括一个或多个处理单元;可选的,处理器1710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1710中。
另外,电子设备1700包括一些未示出的功能模块,在此不再赘述。
可选的,本申请实施例还提供一种电子设备,包括如图17所示的处理器1710,存储器1709,存储在存储器1709上并可在处理器1710上运行的计算机程序,该计算机程序被处理器1710执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,这里不再赘述。
图18为本申请实施例提供的一种服务器的硬件结构示意图。如图18所示,该服务器1800可以包括:一个或多个处理器1801、存储器1802、通信接口1803和总线1804。
其中,处理器1801,可以用于通过总线1804和通信接口1803接收电子设备发送的第一请求消息,第一请求消息用于请求播放目标媒体文件,目标媒体文件包括第一片段和第二片段,第一片段的播放顺序早于第二片段的播放顺序,则通过总线1804和通信接口1803向电子设备发送目标配置文件,向电子设备发送目标配置文件,目标配置文件中包括第一索引信息和第二索引信息,第一索引信息用于指示第一片段,第二索引信息用于指示第二片段,其中,在第二片段与第一片段为重复片段的情况下,第二索引信息与第一索引信息相同。
本申请实施例提供的服务器,服务器1800可以对目标媒体文件进行切片处理,将目标媒体文件划分为多个片段,并配置对应的索引信息,以供电子设备在根据索引信息播放重复片段时,不需要反复从服务器中下载这些重复片段,使电子设备在播放目标媒体文件时能够达到节省流量的目的。
可选的,处理器1801还可以识别目标媒体文件;若目标媒体文件中存在重复片段,则将目标媒体文件划分为多个片段,多个片段包括第一片段和第二片段。
可选的,若目标媒体文件中的重复片段的时长大于或等于预设阈值,处理器1801还可以将目标媒体文件划分为多个片段。
可选的,处理器1801用于基于媒体文件中存在音频和视频同步重复的重复片段,则将媒体文件处理为一个目标媒体文件;基于媒体文件中的音频或者视频中分别存在重复片段,将媒体文件处理为两个目标媒体文件,两个目标媒体文件中的一个目标媒体文件为音频文件,两个目标媒体文件中的另一个目标媒体文件为视频文件。
在本申请实施例中,一个或多个处理器1801、存储器1802、通信接口1803通过总线1804相互连接。其中,总线1804可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。总线1804可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示, 但并不表示仅有一根总线或一种类型的总线。另外,服务器1800还可以包括一些未示出的功能模块,在此不再赘述。
可选的,本申请实施例还提供一种服务器,包括图18所示的处理器1801,存储器1802,存储在存储器1802上并可在处理器1801上运行的计算机程序,该计算机程序被处理器1801执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,这里不再赘述。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被如图17所示的射频单元1701、存储器1709、处理器1710或者如图18所示的处理器1801执行时实现上述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述媒体文件播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台电子设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例描述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (23)

  1. 一种媒体文件的播放方法,所述方法包括:
    向服务器发送第一请求消息,所述第一请求消息用于请求播放目标媒体文件,所述目标媒体文件包括第一片段和第二片段,所述第一片段的播放顺序早于所述第二片段的播放顺序;
    接收所述服务器发送的目标配置文件,所述目标配置文件至少包括第一索引信息和第二索引信息,所述第一索引信息用于指示所述第一片段,所述第二索引信息用于指示所述第二片段;
    在基于所述第一索引信息从所述服务器获取所述第一片段后,缓存并播放所述第一片段,并将所述第一索引信息与缓存的所述第一片段进行关联;
    基于所述第二索引信息检索缓存内容,并在所述第二索引信息与所述第一索引信息相同的情况下,播放缓存的所述第一片段。
  2. 根据权利要求1所述的方法,其中,所述基于所述第二索引信息检索缓存内容之后,所述方法还包括:
    在所述第二索引信息与所述第一索引信息不同的情况下,基于所述第二索引信息,从所述服务器获取所述第二片段;
    缓存并播放所述第二片段,并将所述第二索引信息与缓存的所述第二片段进行关联。
  3. 根据权利要求1或2所述的方法,其中,所述方法还包括:
    在所述目标媒体文件的数量为一个的情况下,启动第一播放器根据所述第一索引信息和所述第二索引信息播放所述第一片段和所述第二片段。
  4. 根据权利要求1或2所述的方法,其中,所述方法还包括:
    在所述目标媒体文件的数量为两个,两个所述目标媒体文件分别为一个媒体文件的音频文件和视频文件的情况下;
    启动第二播放器根据一个所述目标媒体文件的所述目标配置文件播放一个所述目标媒体文件中的所述第一片段和所述第二片段,且启动第三播放器根据另一个所述目标媒体文件的所述目标配置文件播放另一个所述目标媒体文件中的所述第一片段和所述第二片段。
  5. 一种媒体文件的播放方法,所述方法包括:
    接收电子设备发送的第一请求消息,所述第一请求消息用于请求播放目标媒体文件,所述目标媒体文件包括第一片段和第二片段,所述第一片段的播放顺序早于所述第二片段的播放顺序;
    根据所述第一请求消息,向所述电子设备发送目标配置文件,所述目标配置文件中包括第一索引信息和第二索引信息,所述第一索引信息用于指示所述第一片段,所述第二索引信息用于指示所述第二片段;
    在所述第二片段与所述第一片段为重复片段的情况下,所述第二索引信息与所述第一索引信息相同。
  6. 根据权利要求5所述的方法,其中,向所述电子设备发送目标配置文件之前,所述方法还包括:
    识别所述目标媒体文件;
    若所述目标媒体文件中存在重复片段,则将所述目标媒体文件划分为多个片段,所述多个片段包括所述第一片段和所述第二片段。
  7. 根据权利要求6所述的方法,其中,
    所述若所述目标媒体文件中存在重复片段,则将所述目标媒体文件划分为所述第一片段和所述第二片段,包括:
    若所述目标媒体文件中的所述重复片段的时长大于或等于预设阈值,则将所述目标媒体文件划分为所述第一片段和所述第二片段。
  8. 根据权利要求6所述的方法,其中,在识别所述目标媒体文件之前,所述方法还包括:
    基于媒体文件中存在音频和视频同步重复的重复片段,则将所述媒体文件处理为一个所述目标媒体文件;
    基于媒体文件中的音频或者视频中存在重复片段,将所述媒体文件处理为两个所述目标媒体文件,两个所述目标媒体文件中的一个目标媒体文件为音频文件,两个所述目标媒 体文件中的另一个目标媒体文件为视频文件。
  9. 一种媒体文件的播放装置,所述装置包括:
    发送模块,用于向服务器发送第一请求消息,所述第一请求消息用于请求播放目标媒体文件,所述目标媒体文件包括第一片段和第二片段,所述第一片段的播放顺序早于所述第二片段的播放顺序;
    接收模块,用于接收所述服务器发送的目标配置文件,所述目标配置文件至少包括第一索引信息和第二索引信息,所述第一索引信息用于指示所述第一片段,所述第二索引信息用于指示所述第二片段;
    播放模块,用于在基于所述第一索引信息从所述服务器获取所述第一片段后,缓存并播放所述第一片段,并将所述第一索引信息与缓存的所述第一片段进行关联;基于所述第二索引信息检索缓存内容,并在所述第二索引信息与所述第一索引信息相同的情况下,播放缓存的所述第一片段。
  10. 根据权利要求9所述的媒体文件的播放装置,其中,所述播放模块,还用于在所述第二索引信息与所述第一索引信息不同的情况下,基于所述第二索引信息,从所述服务器获取所述第二片段,且缓存并播放所述第二片段,并将所述第二索引信息与缓存的所述第二片段进行关联。
  11. 根据权利要求9或10所述的媒体文件的播放装置,其中,所述装置还包括:
    启动模块,用于在所述目标媒体文件的数量为一个的情况下,启动第一播放器根据所述第一索引信息和所述第二索引信息播放所述第一片段和所述第二片段。
  12. 根据权利要求9或10所述的媒体文件的播放装置,其中,在所述目标媒体文件的数量为两个的情况下,两个所述目标媒体文件分别为一个媒体文件的音频文件和视频文件,所述装置还包括:
    启动模块,用于启动第二播放器根据一个所述目标媒体文件的目标配置文件播放一个所述目标媒体文件中的所述第一片段和所述第二片段,且启动第三播放器根据另一个所述目标媒体文件的所述目标配置文件播放另一个所述目标媒体文件中的所述第一片段和所述第二片段。
  13. 一种媒体文件的播放装置,所述装置包括:
    接收模块,用于接收电子设备发送的第一请求消息,所述第一请求消息用于请求播放目标媒体文件,所述目标媒体文件包括第一片段和第二片段,所述第一片段的播放顺序早于所述第二片段的播放顺序;
    发送模块,用于根据所述第一请求消息,向所述电子设备发送目标配置文件,所述目标配置文件中包括第一索引信息和第二索引信息,所述第一索引信息用于指示所述第一片段,所述第二索引信息用于指示所述第二片段;
    其中,在所述第二片段与所述第一片段为重复片段的情况下,所述第二索引信息与所述第一索引信息相同。
  14. 根据权利要求13所述的媒体文件的播放装置,其中,所述装置还包括:识别模块,用于在发送模块向电子设备发送目标配置文件之前,识别目标媒体文件;
    划分模块,用于若所述目标媒体文件中存在重复片段,则将所述目标媒体文件划分为多个片段,所述多个片段包括所述第一片段和所述第二片段。
  15. 根据权利要求14所述的媒体文件的播放装置,其中,所述划分模块,具体用于若所述目标媒体文件中的重复片段的时长大于或等于预设阈值,则将所述目标媒体文件划分为所述第一片段和所述第二片段。
  16. 根据权利要求14所述的媒体文件的播放装置,其中,所述装置还包括:
    处理模块,用于在所述识别模块识别所述目标媒体文件之前,基于媒体文件中存在音频和视频同步重复的重复片段,将媒体文件处理为一个所述目标媒体文件;基于媒体文件中的音频或者视频中存在重复片段,将媒体文件处理为两个所述目标媒体文件,两个所述目标媒体文件中的一个所述目标媒体文件为音频文件,两个所述目标媒体文件中的另一个所述目标媒体文件为视频文件。
  17. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至4中任一项所述的媒体文件的播放方法的步骤。
  18. 一种服务器,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求5至8中任一项所述的媒体文件的播放方法的步骤。
  19. 一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至8中任一项所述的媒体文件的播放方法的步骤。
  20. 一种计算机程序产品,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-8任一项所述的媒体文件的播放方法的步骤。
  21. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-8任一项所述的媒体文件的播放方法的步骤。
  22. 一种电子设备,所述电子设备被配置成用于执行如权利要求1-4任一项所述的媒体文件的播放方法的步骤。
  23. 一种服务器,所述服务器被配置成用于执行如权利要求5-8任一项所述的媒体文件的播放方法的步骤。
PCT/CN2022/082076 2021-03-26 2022-03-21 媒体文件的播放方法、装置、电子设备、服务器和介质 Ceased WO2022199541A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/372,686 US20240031615A1 (en) 2021-03-26 2023-09-25 Media file play method and apparatus, electronic device, server, and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110328077.1 2021-03-26
CN202110328077.1A CN113163226B (zh) 2021-03-26 2021-03-26 媒体文件的播放方法、装置、电子设备、服务器和介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/372,686 Continuation US20240031615A1 (en) 2021-03-26 2023-09-25 Media file play method and apparatus, electronic device, server, and medium

Publications (1)

Publication Number Publication Date
WO2022199541A1 true WO2022199541A1 (zh) 2022-09-29

Family

ID=76885026

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/082076 Ceased WO2022199541A1 (zh) 2021-03-26 2022-03-21 媒体文件的播放方法、装置、电子设备、服务器和介质

Country Status (3)

Country Link
US (1) US20240031615A1 (zh)
CN (1) CN113163226B (zh)
WO (1) WO2022199541A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163226B (zh) * 2021-03-26 2023-04-07 维沃移动通信有限公司 媒体文件的播放方法、装置、电子设备、服务器和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601535A (zh) * 2014-05-08 2015-05-06 腾讯科技(深圳)有限公司 视频处理方法和系统
CN108540868A (zh) * 2018-05-16 2018-09-14 北京百度网讯科技有限公司 Hls直播的处理方法、装置、服务器、终端及存储介质
CN108763375A (zh) * 2018-05-17 2018-11-06 上海七牛信息技术有限公司 一种媒体文件缓存方法、装置以及多媒体播放系统
CN108965910A (zh) * 2018-08-09 2018-12-07 网宿科技股份有限公司 一种视频缓存方法及播放器
CN109729386A (zh) * 2019-01-03 2019-05-07 深圳市网心科技有限公司 一种视频文件启播方法、系统及电子设备和存储介质
CN113163226A (zh) * 2021-03-26 2021-07-23 维沃移动通信有限公司 媒体文件的播放方法、装置、电子设备、服务器和介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2939394B1 (en) * 2012-12-27 2020-02-26 Telefonaktiebolaget LM Ericsson (publ) Distributed caching
CN103618919B (zh) * 2013-11-19 2017-09-05 深圳Tcl新技术有限公司 网络电视加载视频的方法和装置
CN103686455A (zh) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 一种基于hls协议的视频播放方法和装置
US9491239B2 (en) * 2014-01-31 2016-11-08 Comcast Cable Communications, Llc Methods and systems for processing data requests
CN105100912B (zh) * 2014-05-12 2018-10-12 联想(北京)有限公司 流媒体处理方法和流媒体处理装置
CN106303577B (zh) * 2015-06-08 2019-10-08 广州市动景计算机科技有限公司 下载流媒体的方法及装置
CN106550263A (zh) * 2015-09-16 2017-03-29 深圳市腾讯计算机系统有限公司 媒体播放方法及装置
CN106559677B (zh) * 2015-09-30 2020-04-03 华为技术有限公司 终端、缓存服务器及获取视频分片的方法及装置
CN106231440A (zh) * 2016-07-22 2016-12-14 华为技术有限公司 一种流媒体文件分片下载方法、装置及终端
CN109089175B (zh) * 2017-06-14 2022-04-22 中兴通讯股份有限公司 一种视频缓存加速的方法及装置
CN107911712B (zh) * 2017-11-30 2020-10-09 歌尔科技有限公司 数据缓冲方法和电子设备
CN111787391A (zh) * 2020-07-17 2020-10-16 广州优谷信息技术有限公司 一种信息卡片展示方法、装置、设备及存储介质
CN112423140A (zh) * 2020-12-16 2021-02-26 富盛科技股份有限公司 视频播放方法、装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104601535A (zh) * 2014-05-08 2015-05-06 腾讯科技(深圳)有限公司 视频处理方法和系统
CN108540868A (zh) * 2018-05-16 2018-09-14 北京百度网讯科技有限公司 Hls直播的处理方法、装置、服务器、终端及存储介质
CN108763375A (zh) * 2018-05-17 2018-11-06 上海七牛信息技术有限公司 一种媒体文件缓存方法、装置以及多媒体播放系统
CN108965910A (zh) * 2018-08-09 2018-12-07 网宿科技股份有限公司 一种视频缓存方法及播放器
CN109729386A (zh) * 2019-01-03 2019-05-07 深圳市网心科技有限公司 一种视频文件启播方法、系统及电子设备和存储介质
CN113163226A (zh) * 2021-03-26 2021-07-23 维沃移动通信有限公司 媒体文件的播放方法、装置、电子设备、服务器和介质

Also Published As

Publication number Publication date
CN113163226B (zh) 2023-04-07
US20240031615A1 (en) 2024-01-25
CN113163226A (zh) 2021-07-23

Similar Documents

Publication Publication Date Title
CN104081787B (zh) 接收设备、接收方法、发送设备和发送方法
JP5805616B2 (ja) 通信デバイスにおけるコンテンツの検索/ダウンロードのための装置および方法
US9838758B2 (en) Relevancy improvement through targeting of information based on data gathered from a networked device associated with a security sandbox of a client device
TWI547159B (zh) 媒體內容分享方法和終端設備及內容分享系統
CN103945259B (zh) 一种在线视频播放方法及装置
CN110096660A (zh) 用于加载页面图片的方法、装置和电子设备
KR101643238B1 (ko) 공유된 장치 및 개인용 장치를 이용한 개인맞춤화된 사용자 기능의 협력적 제공
WO2016173396A1 (zh) 基于视频播放的信息处理方法和系统、客户端和服务器
CN108540868A (zh) Hls直播的处理方法、装置、服务器、终端及存储介质
CN108319708B (zh) 视频播放方法、装置、存储介质及电子设备
CN106598996A (zh) 多媒体海报生成方法及装置
EP2769312A2 (en) Optimization of web page content including video
WO2016127799A1 (zh) 一种视频广告过滤的方法、装置和系统
WO2015070796A1 (zh) 智能电视向移动通信终端推送资源的方法和装置
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
WO2015180446A1 (zh) 一种多设备联动服务中的连接通道维护系统及方法
CN103956175A (zh) 一种多媒体文件的播放方法及播放设备
CN112784201B (zh) 网页显示方法、装置、终端及存储介质
WO2022199541A1 (zh) 媒体文件的播放方法、装置、电子设备、服务器和介质
CN110113298B (zh) 数据传输方法、装置、信令服务器和计算机可读介质
WO2014139366A1 (zh) 多媒体信息发布的方法及装置
CN112738776A (zh) 获取音乐信息的方法、装置、系统及存储介质
CN103702167B (zh) 一种实现节目预览图显示的方法及电子设备
KR101498920B1 (ko) 오프라인 실행을 위한 웹 페이지 사전 캐싱 시스템 및 방법
CN113079545A (zh) 网络共享方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22774200

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22774200

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.02.2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22774200

Country of ref document: EP

Kind code of ref document: A1