CN105430449A - Media file play method, device and system - Google Patents

Media file play method, device and system Download PDF

Info

Publication number
CN105430449A
CN105430449A CN201510828146.XA CN201510828146A CN105430449A CN 105430449 A CN105430449 A CN 105430449A CN 201510828146 A CN201510828146 A CN 201510828146A CN 105430449 A CN105430449 A CN 105430449A
Authority
CN
China
Prior art keywords
media file
data
target
played
data frame
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.)
Granted
Application number
CN201510828146.XA
Other languages
Chinese (zh)
Other versions
CN105430449B (en
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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510828146.XA priority Critical patent/CN105430449B/en
Publication of CN105430449A publication Critical patent/CN105430449A/en
Application granted granted Critical
Publication of CN105430449B publication Critical patent/CN105430449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/26208Content 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 the scheduling operation being performed under constraints
    • 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/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • 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/26291Content 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 providing content or additional data updates, e.g. updating software modules, stored at the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a media file play method, device and system, and belongs to the field of media file playing. The method comprises the following steps: in a process of playing a media file on a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high version file of the media file played on the media file client at present; when the target media file exists in the media file server, determining data to be played in the target media file according to a current play data frame of the currently played media file; and sending the data to be played in the target media file to the media file client, for enabling the media file client to play the target media file according to the data to be played. The media file play method, device and system provided by the invention are used for solving the problem of complex switching process of the media file in the prior art and realizing the beneficial effects of simplifying the switching process of the media file. The media file play method, device and system provided by the invention are used for playing media files.

Description

Media file playing method, device and system
Technical Field
The present disclosure relates to the field of media file playing, and in particular, to a method, an apparatus, and a system for playing a media file.
Background
With the rapid development of electronic technology, electronic products based on electronic technology are also more and more widely applied. Among them, a terminal such as a smart phone, a computer, etc. is a typical electronic product.
The terminal can be provided with a media file client for playing media files, wherein the media files can be video files or audio files. Taking a media file as a video file and a media file client as a video client as an example, in the related art, the video client can detect whether the target video file exists or not in the process of playing the video file, the target video file is a high version file of a currently playing video file, the high version file of the currently playing video file refers to the same actual video content as the currently playing video file, but the playing effect is better than that of the currently playing video file, for example, the definition of the high version file is higher than that of the currently playing video file, when the target video file exists, the video client can display the reminding information on the playing interface of the currently played video file, when the video client receives a switching instruction triggered by the operation of the user according to the reminding information, and the video client switches the currently played video file to the target video file for playing.
Disclosure of Invention
In order to solve the problems in the related art, the present disclosure provides a media file playing method, device and system. The technical scheme is as follows:
according to a first aspect of the present disclosure, there is provided a media file playing method, the method comprising:
in the process of playing a media file at a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high-version file of the media file currently played at the media file client;
when the target media file exists in the media file server, determining data to be played in the target media file according to a currently played data frame of the currently played media file;
and sending the data to be played in the target media file to the media file client so that the media file client can play the target media file according to the data to be played.
Optionally, the determining, according to the currently played data frame of the currently played media file, data to be played in the target media file includes:
sending a notification message to the media file client, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
receiving a switching request sent by the media file client according to the notification message, wherein the switching request comprises: the media file client extracts a currently played data frame from the data of the currently played media file when receiving the notification message;
determining a first target data frame which is the same as the currently played data frame in the data of the target media file;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining second target data played after the first target playing time from the data of the target media file;
and taking the first target data frame and the second target data as the data to be played.
Optionally, the determining a first target data frame that is the same as the currently played data frame in the data of the target media file includes:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
comparing the current playing data frame with data in a preset time period including the first playing time in the target media file in sequence;
and extracting a first target data frame which is the same as the current playing data frame from the data in the preset time period including the first playing time.
Optionally, the handover request further includes: a first playing time corresponding to the currently playing data frame in the currently playing media file,
the determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
according to the switching request, sequentially comparing the current playing data frame with data in a preset time period including the first playing time in the target media file;
and extracting a first target data frame which is the same as the current playing data frame from the data in the preset time period including the first playing time.
Optionally, the determining a first target data frame that is the same as the currently played data frame in the data of the target media file includes:
comparing the current playing data frame with the data of each playing moment in the target media file in sequence;
and extracting a first target data frame which is the same as the currently played data frame in the data of the target media file.
Optionally, the sequentially comparing the currently played data frame with the data in the target media file within the preset time period including the first playing time includes:
dividing data in a preset time period including the first playing time in the target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
and comparing the current playing data frame with the at least one characteristic data frame in sequence.
Optionally, the determining, according to the currently played data frame of the currently played media file, data to be played in the target media file includes:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, in the process of playing the media file at the media file client, detecting whether the target media file exists in the media file server includes:
in the process of playing the media file at the media file client, periodically detecting whether the target media file exists in the media file server;
or,
and when a detection request sent by the media file client is received, detecting whether the target media file exists in the media file server.
According to a second aspect of the present disclosure, there is provided a media file playing method, the method comprising:
receiving data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and playing the target media file according to the data to be played.
Optionally, before the receiving the data to be played in the target media file sent by the media file server, the method further includes:
receiving a notification message sent by the media file server, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
extracting a currently played data frame from the data of the currently played media file according to the notification message, wherein the currently played data frame is a data frame played when the notification message is received;
generating a switching request according to the current playing data frame, wherein the switching request comprises: the currently played data frame;
and sending the switching request to the media file server so that the media file server can determine the data to be played from the data of the target media file according to the current playing data frame.
Optionally, the playing the target media file according to the data to be played includes:
judging whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and when the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received, playing the target media file according to the data to be played.
Optionally, the determining whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from when the notification message is received includes:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as the current playing data frame in the buffer data of the data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, the playing the target media file according to the data to be played includes:
determining the data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Optionally, the handover request further includes: and a first playing time corresponding to the currently played data frame in the currently played media file.
According to a third aspect of the present disclosure, there is provided a media file playing apparatus, the apparatus comprising:
the system comprises a detection module, a storage module and a processing module, wherein the detection module is configured to detect whether a target media file exists in a media file server in the process of playing a media file by a media file client, and the target media file is a high-version file of the media file currently played by the media file client;
a determining module configured to determine data to be played in the target media file according to a currently played data frame of the currently played media file when the target media file exists in the media file server;
and the sending module is configured to send the data to be played in the target media file to the media file client, so that the media file client can play the target media file according to the data to be played.
Optionally, the determining module includes:
a sending submodule configured to send a notification message to the media file client, where the notification message is used to notify the media file client that the target media file exists in the media file server;
a receiving submodule configured to receive a switching request sent by the media file client according to the notification message, where the switching request includes: the media file client extracts a currently played data frame from the data of the currently played media file when receiving the notification message;
a first determining sub-module configured to determine a first target data frame identical to the currently played data frame in the data of the target media file;
a second determining sub-module configured to determine a corresponding first target play time of the first target data frame in the target media file;
a third determining sub-module configured to determine, from the data of the target media file, second target data played after the first target play time;
and the sub-module is configured to take the first target data frame and the second target data as the data to be played.
Optionally, the first determining sub-module includes:
the time determining submodule is configured to determine a first playing time corresponding to the currently played data frame in the currently played media file;
the comparison submodule is configured to compare the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence;
an extraction sub-module configured to extract a first target data frame identical to the currently played data frame from data within a preset time period including the first play time.
Optionally, the handover request further includes: a first playing time corresponding to the currently playing data frame in the currently playing media file,
the first determination submodule includes:
the comparison submodule is configured to compare the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence according to the switching request;
an extraction sub-module configured to extract a first target data frame identical to the currently played data frame from data within a preset time period including the first play time.
Optionally, the first determining sub-module includes:
a comparison submodule configured to compare the currently played data frame with data including each playing time in the target media file in sequence;
and the extraction sub-module is configured to extract a first target data frame which is the same as the currently played data frame in the data of the target media file.
Optionally, the comparison sub-module is configured to:
dividing data in a preset time period including the first playing time in the target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
and comparing the current playing data frame with the at least one characteristic data frame in sequence.
Optionally, the determining module is configured to:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, the detection module is configured to:
in the process of playing the media file at the media file client, periodically detecting whether the target media file exists in the media file server;
or,
and when a detection request sent by the media file client is received, detecting whether the target media file exists in the media file server.
According to a fourth aspect of the present disclosure, there is provided a media file playing apparatus, the apparatus comprising:
the first receiving module is configured to receive data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of a currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and the playing module is configured to play the target media file according to the data to be played.
Optionally, the apparatus further comprises:
a second receiving module, configured to receive a notification message sent by the media file server, where the notification message is used to notify the media file client that the target media file exists in the media file server;
an extraction module configured to extract a currently played data frame from data of the currently played media file according to the notification message, where the currently played data frame is a data frame played when the notification message is received;
a generating module configured to generate a switching request according to the currently played data frame, wherein the switching request includes: the currently played data frame;
a sending module configured to send the switching request to the media file server, so that the media file server determines the data to be played from the data of the target media file according to the currently played data frame.
Optionally, the playing module includes:
the judging submodule is configured to judge whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and the playing sub-module is configured to play the target media file according to the data to be played when the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, the determining sub-module is configured to:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as the current playing data frame in the buffer data of the data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, the playing sub-module is configured to:
determining the data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Optionally, the handover request further includes: and a first playing time corresponding to the currently played data frame in the currently played media file.
According to a fifth aspect of the present disclosure, there is provided a media file playing apparatus comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
in the process of playing a media file at a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high-version file of the media file currently played at the media file client;
when the target media file exists in the media file server, determining data to be played in the target media file according to a currently played data frame of the currently played media file;
and sending the data to be played in the target media file to the media file client so that the media file client can play the target media file according to the data to be played.
According to a sixth aspect of the present disclosure, there is provided a media file playing apparatus comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
receiving data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and playing the target media file according to the data to be played.
According to a seventh aspect of the present disclosure, there is provided a media file playing system, the system comprising: a media file server and a terminal, wherein the terminal is provided with a media file client,
the media file server comprises the media file playing device of the third aspect;
the media file client comprises the media file playing device of the fourth aspect.
According to an eighth aspect of the present disclosure, there is provided a media file playing system, the system comprising: a media file server and a terminal, wherein the terminal is provided with a media file client,
the media file server comprises the media file playing device of the fifth aspect;
the media file client comprises the media file playing device of the sixth aspect.
The technical scheme provided by the disclosure can comprise the following beneficial effects:
the media file server determines data to be played in the target media file according to a currently played data frame of the currently played media file when the target media file exists in the media file server, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure, the drawings that are needed to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic structural diagram of an implementation environment related to a media file playing method provided in various embodiments of the present disclosure;
FIG. 2 is a method flow diagram illustrating a method of media file playback in accordance with an exemplary embodiment;
FIG. 3 is a method flow diagram illustrating a method of media file playback in accordance with another exemplary embodiment;
FIG. 4-1 is a method flow diagram illustrating a method of media file playback in accordance with yet another exemplary embodiment;
FIG. 4-2 is a flowchart of a method for a media file server to determine data to be played in data of a target media file according to the embodiment shown in FIG. 4-1;
FIG. 4-3 is a flowchart of a method for a media file server to determine data to be played in a target media file according to the embodiment shown in FIG. 4-1;
4-4 are flowcharts of a method for a media file server to determine a first target data frame in data of a target media file according to the embodiment shown in FIG. 4-1;
fig. 4-5 is a flowchart of a method for a media file server to compare a currently played data frame with data in a target media file within a preset time period including a first playing time according to the embodiment shown in fig. 4-1;
4-6 are flowcharts of methods for determining a first target data frame in data of a target media file by another media file server provided by the embodiment shown in FIG. 4-1;
4-7 are flowcharts of methods for determining a first target data frame in data of a target media file by a media file server according to yet another embodiment shown in FIG. 4-1;
fig. 4-8 is a flowchart of a method for a media file client to play a target media file according to data to be played, according to the embodiment shown in fig. 4-1;
fig. 4-9 is a flowchart of a method for a media file client to determine whether a buffering progress of data to be played is greater than a playing progress of a currently played media file according to the embodiment shown in fig. 4-1;
fig. 4-10 is a flowchart of a method for playing a target media file by a media file client according to data to be played, according to the embodiment shown in fig. 4-1;
FIG. 5 is a block diagram illustrating a media file playback device in accordance with an exemplary embodiment;
FIG. 6-1 is a block diagram illustrating a media file playback device in accordance with another exemplary embodiment;
FIG. 6-2 is a block diagram of a determination module provided by the embodiment shown in FIG. 6-1;
FIG. 6-3 is a block diagram of a first determination submodule provided in the embodiment shown in FIG. 6-1;
FIG. 6-4 is a block diagram of another first determination submodule provided in the embodiment shown in FIG. 6-1;
FIG. 6-5 is a block diagram of yet another first determination submodule provided in the embodiment shown in FIG. 6-1;
FIG. 7 is a block diagram illustrating a media file playback device in accordance with yet another exemplary embodiment;
FIG. 8-1 is a block diagram illustrating a media file playback device in accordance with yet another exemplary embodiment;
FIG. 8-2 is a block diagram of a play module provided in the embodiment shown in FIG. 8-1;
FIG. 9 is a block diagram illustrating a media file playback device in accordance with an exemplary embodiment;
FIG. 10 is a block diagram illustrating a media file playback device in accordance with another exemplary embodiment;
FIG. 11 is a block diagram illustrating a media file playback system in accordance with an exemplary embodiment.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more clear, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
Fig. 1 is a schematic structural diagram of an implementation environment related to a media file playing method provided in various embodiments of the present disclosure. Referring to fig. 1, the implementation environment includes: a terminal 120 and a server 140.
The terminal 120 and the server 140 may be connected through a wired network or a wireless network, which may include but is not limited to: wireless fidelity (WIFI for short), bluetooth, infrared, Zigbee (Zigbee), and data, which are not limited in this disclosure.
The terminal 120 may be a smart phone, a tablet computer, a smart television, a desktop computer, a motion picture expert compression standard audio layer 4 (english: motion picture expert group audio layer iv; abbreviated as MP4) player, a motion picture expert compression standard audio layer 3 (english: motion picture expert group audio layer iii; abbreviated as MP3) player, and the like, and the terminal 120 may be installed with a media file client, which may be a video client (for example, a kuku client) or an audio client (for example, a cool dog music client), and the disclosure is not limited thereto.
The server 140 may be a media file server, and the server 140 may be, for example, one server, a server cluster composed of several servers, or a cloud computing service center. The server 140 may be a media file server configured with a media file client installed on the terminal 120, which is defined in the embodiments of the present disclosure.
The media file client on the terminal 120 may obtain data of the media file from the media file server through a network connection with the media file server and play the data, and in the process of playing the media file by the media file client, the media file server may detect whether a target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client; when the target media file exists in the media file server, the media file server can determine the data to be played in the target media file according to the currently played data frame of the currently played media file; and then sending the data to be played in the target media file to the media file client, wherein the media file client can receive the data to be played in the target media file sent by the media file server, and play the target media file according to the data to be played.
Optionally, when the target media file exists in the media file server, the media file server may send a notification message to the media file client, where the notification message is used to notify the media file client that the target media file exists in the media file server; the media file client can extract a currently played data frame from data of a currently played media file according to the notification message, wherein the currently played data frame is a data frame played when the notification message is received, generate a switching request including the currently played data frame according to the currently played data frame, and then send the switching request to the media file server. The media file server may determine, in the data of the target media file, a first target data frame that is the same as a currently played data frame, determine a first target play time at which the first target data frame corresponds to the target media file, determine, from the data of the target media file, second target data that is played after the first target play time, and take the first target data frame and the second target data as data to be played.
Optionally, the media file server may determine a first playing time corresponding to the currently played data frame in the currently played media file; comparing the current playing data frame with data in a preset time period including a first playing time in the target media file in sequence; and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time. Or, optionally, the handover request may further include: the media file server can compare the currently played data frame with data in a preset time period including the first playing time in the target media file according to the switching request; and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time. Or, optionally, the media file server may compare the currently played data frame with the data in the target media file, which includes each playing time in sequence; and extracting a first target data frame which is the same as the currently played data frame in the data of the target media file.
Optionally, the comparing, by the media file server, the current playing data frame with the data in the target media file within the preset time period including the first playing time in sequence may include: the media file server divides data in a preset time period including a first playing time in a target media file into at least two data segments; extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located; the currently playing data frame is compared with at least one characteristic data frame in sequence.
Optionally, when the target media file exists in the media file server, the media file server may count the number of the target media file; and when the number of the target media files is more than or equal to 2, the media file server determines the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, the media file server may periodically detect whether the target media file exists in the media file server in a process of playing the media file at the media file client; alternatively, the media file server may detect whether the target media file exists in the media file server when receiving a detection request sent by the media file client. The embodiments of the present disclosure do not limit this.
Optionally, the playing, by the media file client, the target media file according to the data to be played may include: the media file client judges whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received; and when the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received, playing the target media file according to the data to be played.
For example, the determining, by the media file client, whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time when the notification message is received may include: the media file client determines a first playing time corresponding to a currently played data frame in a currently played media file; determining the current playing time according to the playing progress of the currently played media file; determining a first target data frame which is the same as a current playing data frame in buffer data of data to be played, wherein the buffer data of the data to be played comprises at least one data frame; determining a first target playing time corresponding to the first target data frame in the target media file; determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file; calculating the playing time difference between the current playing time and the first playing time; calculating a target time difference between the second target playing time and the first target playing time; judging whether the target time difference is larger than the playing time difference; when the target time difference is larger than the playing time difference, the media file client determines that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
For example, the playing of the target media file by the media file client according to the data to be played may include: the media file client determines the data frame played at the current playing time in the data of the currently played media file; determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played; and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Fig. 2 is a flowchart illustrating a method for playing a media file according to an exemplary embodiment, where the present embodiment is illustrated by applying the method for playing a media file to the server 140 in the implementation environment shown in fig. 1, and the server 140 may be a media file server. Referring to fig. 2, the media file playing method may include the following steps:
in step 201, in the process of playing a media file by a media file client, it is detected whether a target media file exists in a media file server, where the target media file is a high-version file of the media file currently played by the media file client.
In step 202, when the target media file exists in the media file server, the data to be played in the target media file is determined according to the currently played data frame of the currently played media file.
In step 203, the data to be played in the target media file is sent to the media file client, so that the media file client plays the target media file according to the data to be played.
To sum up, in the media file playing method provided by the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to a currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Optionally, step 202 may include:
sending a notification message to the media file client, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
receiving a switching request sent by a media file client according to the notification message, wherein the switching request comprises: the media file client extracts a currently played data frame from data of a currently played media file when receiving the notification message;
determining a first target data frame which is the same as a currently played data frame in data of a target media file;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining second target data played after the first target playing time from the data of the target media file;
and taking the first target data frame and the second target data as data to be played.
Optionally, determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
determining a first playing time corresponding to a currently played data frame in a currently played media file;
comparing the current playing data frame with data in a preset time period including a first playing time in the target media file in sequence;
and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time.
Optionally, the handover request further includes: a first playing time corresponding to the currently playing data frame in the currently playing media file,
determining a first target data frame identical to a currently played data frame in data of a target media file, including:
according to the switching request, sequentially comparing the current playing data frame with data in a preset time period including a first playing time in the target media file;
and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time.
Optionally, determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
comparing the current playing data frame with the data of each playing moment in the target media file in sequence;
and extracting a first target data frame which is the same as the currently played data frame in the data of the target media file.
Optionally, comparing the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence, includes:
dividing data in a preset time period including a first playing time in a target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
the currently playing data frame is compared with at least one characteristic data frame in sequence.
Optionally, step 202 may include:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, step 201 may include:
in the process of playing the media file at the media file client, periodically detecting whether a target media file exists in the media file server;
or,
when a detection request sent by a media file client is received, whether a target media file exists in a media file server is detected.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
To sum up, in the media file playing method provided by the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to a currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 3 is a flowchart illustrating a method for playing a media file according to another exemplary embodiment, which is illustrated in the embodiment that the method for playing a media file is applied to the terminal 120 in the implementation environment shown in fig. 1, a media file client may be installed in the terminal 120, and the method for playing a media file may be executed by the media file client. Referring to fig. 3, the media file playing method may include the following steps:
in step 301, in the process of playing a media file at a media file client, data to be played in a target media file sent by a media file server is received, where the data to be played in the target media file is determined according to a currently played data frame of a currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file.
In step 302, the target media file is played according to the data to be played.
To sum up, in the media file playing method provided by the embodiment of the present disclosure, the media file client receives data to be played in the target media file sent by the media file server, where the data to be played in the target media file is determined according to the currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file, and the target media file is played according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Optionally, before step 301, the method may further include:
receiving an informing message sent by a media file server, wherein the informing message is used for informing a media file client that a target media file exists in the media file server;
extracting a currently played data frame from data of a currently played media file according to the notification message, wherein the currently played data frame is a data frame played when the notification message is received;
generating a switching request according to the current playing data frame, wherein the switching request comprises: currently playing the data frame;
and sending a switching request to the media file server so that the media file server can determine the data to be played from the data of the target media file according to the current playing data frame.
Optionally, step 302 may include:
judging whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and when the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received, playing the target media file according to the data to be played.
Optionally, the determining whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from when the notification message is received includes:
determining a first playing time corresponding to a currently played data frame in a currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as a current playing data frame in buffer data of data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, playing the target media file according to the data to be played includes:
determining a data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Optionally, the handover request further includes: and a first playing time corresponding to the currently played data frame in the currently played media file.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
To sum up, in the media file playing method provided by the embodiment of the present disclosure, the media file client receives data to be played in the target media file sent by the media file server, where the data to be played in the target media file is determined according to the currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file, and the target media file is played according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 4-1 is a flowchart illustrating a method for playing a media file according to yet another exemplary embodiment, which is illustrated in the embodiment of fig. 1 by applying the method for playing the media file. Referring to fig. 4-1, the media file playing method may include the following steps:
in step 401, in the process of playing the media file by the media file client, the media file server detects whether a target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client.
The media file client may be a video client or an audio client, the video client may be a youth client, an love art client, and the like, the audio client may be a dog music client, a hundred degree music client, and the like, and the media file may be a video file or an audio file, which is not limited in this disclosure.
When playing a media file, a media file client needs to obtain data corresponding to the media file from a server, where the server may be a media file server configured with the media file client, or may also be a third-party server, for example, when the media file client is a cooling client, the server may be a cooling server, or may also be an artistic server (third-party server), which is not limited in this embodiment of the disclosure.
When the media file client acquires the data of the media file from the media file server, the media file server can send the data of the media file to the media file client, and at the moment, the media file server can consider that the media file client plays the media file; or, when the media file client plays the media file, the media file client may send play instruction information to the media file server, and the media file server may determine, according to the play instruction information, that the media file client plays the media file indicated by the play instruction information.
When the media file server determines that the media file client plays the media file, it may detect whether a target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client. For example, assuming that the currently played media file of the media file client is a video file with a file name "xxx.wmv", the target media file is also a video file with a file version "xxx.wmv", and the file version of the target media file is higher than that of the currently played media file, for example, the definition of the target media file is higher than that of the currently played media file, and the sound quality of the target media file is better than that of the currently played media file.
Optionally, the media file server may determine, according to the data of the media file sent to the media file client, an identifier of the media file currently played by the media file client and a file version of the currently played media file, or the media file client may send, to the media file server, the identifier of the currently played media file and the file version of the currently played media file, which are carried in the play instruction information. The media file server can store the corresponding relation between the media file identification and the file version, inquire the corresponding relation between the media file identification and the file version according to the identification of the currently played media file to obtain the media files of all versions corresponding to the identification of the currently played media file, and then detect whether the target media file exists in the media files of all versions corresponding to the identification of the currently played media file. For example, taking a media file as a video file for illustration, the correspondence between the media file identifier and the file version stored in the media file server may be as shown in table 1 below:
TABLE 1
Assuming that the identifier of the media file currently played by the media file client is ID-a and the file version is a1, the media file server queries the corresponding relationship shown in table 1 according to the identifier ID-a to obtain all versions of the media files corresponding to the identifier ID-a on the media file server, as can be seen from table 1, there are 3 media files corresponding to the identifier ID-a on the media file server, where the 3 media files corresponding to the identifier ID-a are a1 media file, a2 media file and A3 media file, respectively, where the a1 media file is a standard definition file (that is, the definition of the a1 media file belongs to the definition range corresponding to the standard definition), the a2 media file (high definition, the definition of the media file with the file version a2 belongs to the definition range corresponding to high definition), and the media file with the file version A3 is an ultra-high definition file (that is, the definition of the media file with the file version A3 belongs to the definition range corresponding to ultra-high definition), so that it can be determined that the file version a2 is higher than the file version a1, the file version A3 is higher than the file version a2, and the media file server can determine the target media file among the 3 media files corresponding to the identifier ID-a, for example, because the file version a2 and the file version A3 are both higher than the file version a1, the media file server determines that the target media file is the media file with the file version a2 and the media file with the file version A3.
It should be noted that, regarding the description of the media file identifier ID-B and the file version corresponding to the media file identifier ID-B, and the description of the media file identifier ID-C and the file version corresponding to the media file identifier ID-C in table 1, reference may be made to the description of the media file identifier ID-a and the file version corresponding to the media file identifier ID-a, which is not described herein again in this disclosure.
It should be further noted that, in the embodiment of the present disclosure, the data of the currently played media file may be obtained by the media file client from a media file server configured with the media file client, or obtained by the media file client from a third-party server. If the data of the currently played media file is acquired by the media file client from the media file server matched with the media file client, the media file server can periodically detect whether a target media file exists in the media file server in the process of playing the media file by the media file client, if the data media file client of the currently played media file is acquired from a third-party server, the media file client can send a detection request to the media file server matched with the media file client, the detection request can carry an identifier of the currently played media file by the media file client, and the media file server matched with the media file client can detect whether the target media file exists in the media file server according to the identifier of the carried media file in the detection request when receiving the detection request, the embodiments of the present disclosure do not limit this.
In step 402, when the target media file exists in the media file server, the media file server determines the data to be played in the target media file according to the currently played data frame of the currently played media file.
If the media file server detects that the target media file exists in the media file server in step 401, the media file server determines the data to be played in the target media file according to the currently played data frame of the media file currently played by the media file client.
For example, referring to fig. 4-2, it shows a flowchart of a method for determining data to be played in data of a target media file by a media file server according to the embodiment shown in fig. 4-1, and referring to fig. 4-2, the method may include the following steps:
in sub-step 402A, the media file server counts the number of target media files.
The media file server may count the number of detected target media files, illustratively, the media file server counts the number of detected target media files identified as ID-a. As can be seen from the above step 201, the media file server determines that the target media file is a media file with a file version A2 and a media file with a file version A3. Therefore, the number of target media files counted by the media file server is 2.
In sub-step 402B, when the number of the target media files is greater than or equal to 2, the media file server determines the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
When the media file server determines in sub-step 402A that the number of target media files is greater than or equal to 2, the media file server determines the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file, for example, because the file version A3 is higher than the file version a2, the media file server determines the data to be played from the target media file with the file version A3 according to the currently played data frame of the currently played media file.
Optionally, in this step 402B, the media file server may first sort the file versions of the media files, then determine the target media file with the highest file version according to the sorting result, and then determine the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
For example, referring to fig. 4-3, it shows a flowchart of a method for determining data to be played in a target media file by a media file server according to the embodiment shown in fig. 4-1, and referring to fig. 4-3, the method may include the following steps:
in sub-step 4021, the media file server sends a notification message to the media file client, the notification message being used to notify the media file client that the target media file exists in the media file server.
When the media file server detects that the target media file exists in the media file server, the media file server may send a notification message to the media file client, where the notification message is used to notify the media file client that the target media file exists in the media file server. In practical application, the notification message may be a character string that can be recognized by both the media file server and the media file client, and the embodiment of the present disclosure does not limit this.
In sub-step 4022, the media file client receives the announcement message sent by the media file server.
When the media file server sends a notification message to the media file client, the media file client may receive the notification message. Wherein the notification message is used to notify the media file client that the target media file exists in the media file server.
In sub-step 4023, the media file client extracts the currently played data frame from the data of the currently played media file according to the notification message, where the currently played data frame is the data frame played when the notification message is received.
When the media file client receives the notification message sent by the media file server, the media file client may extract a currently played data frame from the data of the currently played media file of the media file client according to the notification message, where the currently played data frame may be a data frame being played when the media file client receives the notification message. For example, assuming that the data frame being played by the media file client when the notification message is received is 1120354 th data frame in the currently played media file, where the 1120354 th data frame may be a data frame W, the current data frame extracted by the media file client is the data frame W. In practical applications, when the currently played media file of the media file client is a video file, the currently played data frame may be a frame of image, for example, 1120354 th frame of image.
In sub-step 4024, the media file client generates a switch request according to the currently played data frame, where the switch request includes: the data frame is currently played.
After extracting the currently played data frame, the media file client may generate a switching request including the currently played data frame according to the currently played data frame. Illustratively, the media file client generates a switch request comprising a data frame W. Optionally, the switching request may further include a first play time corresponding to the currently played data frame in the media file currently played by the media file client, where the first play time may be 1:28:30(1 hour 28 minutes 30 seconds), and this is not limited in this embodiment of the disclosure.
In sub-step 4025, the media file client sends a switch request to the media file server.
After generating the switching request including the currently played data frame, the media file client may send the switching request including the currently played data frame to the media file server. The media file server can determine the data to be played from the data of the target media file according to the currently played data frame.
In sub-step 4026, the media file server receives a switch request sent by the media file client.
When the media file client sends a switching request to the media file server, the media file server may receive the switching request sent by the media file client, where the switching request may include: and the media file client extracts the currently played data frame from the data of the currently played media file when receiving the notification message. Illustratively, the media file server receives a switch request including a data frame W sent by the media file client.
In sub-step 4027, the media file server determines a first target data frame in the data of the target media file that is the same as the currently playing data frame.
After receiving a switching request sent by a media file client, a media file server can analyze the switching request to obtain a current playing data frame, and then determines a first target data frame which is the same as the current playing data frame in data of a target media file.
Referring to fig. 4-4, which is a flowchart illustrating a method for determining a first target data frame in data of a target media file by a media file server according to the embodiment shown in fig. 4-1, referring to fig. 4-4, the method may include the following steps:
in sub-step 40271a, the media file server determines a first play time corresponding to the currently playing data frame in the currently playing media file.
The media file server may store information of a currently played media file, and the information of the currently played media file may include: the corresponding relation between the data frame and the playing time records the data frame in the media file currently played by the media file client and the playing time corresponding to the data frame in the currently played media file. The media file server can obtain a first playing time corresponding to the currently played data frame in the currently played media file according to the corresponding relation between the currently played data frame query data frame and the playing time. For example, the media file server queries a corresponding relationship between a data frame W (currently playing data frame) and a playing time to obtain a first playing time corresponding to the data frame W in the currently playing media file, where the first playing time may be 1:28: 30.
In sub-step 40272a, the media file server compares the currently playing data frames in turn with data in a preset time period including the first playing time in the target media file.
After the media file server determines a first playing time corresponding to the currently played data frame in the currently played media file, the currently played data frame may be sequentially compared with data in a preset time period including the first playing time in the target media file. The preset time period may be set according to actual needs, and is not limited in the embodiment of the present disclosure, for example, the preset time period may be 5 minutes, the preset time period including the first play time may be 1:26:30 to 1:31:30, and the media file server compares the data frames W with the data in the target media file in the time period of 1:26:30 to 1:31:30 in sequence.
For example, please refer to fig. 4-5, which shows a flowchart of a method for comparing, by a media file server, a currently played data frame with data in a preset time period including a first play time in a target media file in sequence according to the embodiment shown in fig. 4-1, and referring to fig. 4-5, the method may include the following steps:
in sub-step 40272a1, the media file server divides data in a preset time period including the first play time in the target media file into at least two data segments.
The media file server may divide data in a preset time period including the first play time in the target media file into at least two data segments, where the media file server may divide the data in the preset time period including the first play time at equal intervals, or may divide the data in the preset time period including the first play time according to a correlation between data frames in the data in the preset time period including the first play time in the target media file, and this is not limited in the embodiments of the present disclosure. For example, the data within the preset time period including the first play time may include a plurality of data frames, and the media file server may calculate a similarity between the plurality of data frames, regard the similarity between the plurality of data frames as a correlation between the plurality of data frames, and then divide the data within the preset time period including the first play time according to the correlation.
For example, the preset time period including the first playing time may be 1:26:30 to 1:31:30, and the data in the preset time period including the first playing time may be K1K2K3K4W2WW7P4P2P0V0V9The data in the preset time period including the first playing time comprises a data frame K1Data frame K2Data frame K3Data frame K4Data frame W2Data frame W, data frame W7Data frame P4Data frame P2Data frame P0Data frame V0And a data frame V9
Assuming that the playing time length of each data frame is equal, if the data frame is divided into 4 data segments at equal intervals, the 4 data segments are respectively data segments K1K2K3Data segment K4W2W, data segment W7P4P2And a data segment P0V0V9Each data segment includes 3 data frames.
If the data frames are divided according to the relevance between the data frames in the data in the preset time period including the first playing time in the target media file, the media file server can calculate the data frame K1Data frame K2Data frame K3Data frame K4Data frame W2Data frame W, data frame W7Data frame P4Data frame P2Data frame P0Data frame V0And a data frame V9The data frames with the correlation degree larger than the preset threshold value and adjacent data frames are divided into a group, for example, the data frame K1And a data frame K2The correlation degree is larger than a preset threshold value, and the data frame K2And a data frame K3The correlation degree is larger than a preset threshold value, and the data frame K3And a data frame K4The correlation degree is larger than a preset threshold value, and the data frame K4And a data frame W2If the correlation degree is less than the preset threshold value, the media file server will transmit the data frame K1Data frame K2Data frame K3And a data frame K4Divided into one group, and similarly known, the data frame W2Data frame W and data frame W7As a group, data frame P4Data frame P2And a data frame P0As a group, data frame V0And a data frame V9The divided data segments may include 4 data segments, and the 4 data segments are data segments K respectively1K2K3K4Data segment W2WW7Data segment P4P2P0And a data section V0V9
In sub-step 40272a2, the media file server extracts at least one characteristic data frame in each data segment, where each characteristic data frame is used to characterize the attribute of the playing content corresponding to the data segment where each characteristic data frame is located.
After dividing the data in the preset time period including the first play time in the target media file into at least two data segments, the media file server may extract at least one feature data frame in each data segment, where each feature data frame is used to represent an attribute of the play content corresponding to the data segment in which each feature data frame is located. The media file server can calculate the characteristic value of each data frame in each data segment, then determine the characteristic data frame according to the characteristic value of each data frame, and extract the characteristic data frame. The detailed implementation process of determining the characteristic data frame by the media file server may refer to related technologies, and details of the embodiment of the present disclosure are not repeated herein.
Illustratively, at least two data segments are taken as the data segment K1K2K3K4Data segment W2WW7Data segment P4P2P0And a data section V0V9And assuming that the media file server extracts one characteristic data frame from each data segment, the characteristic data frame extracted by the media file server may be: characteristic data frame K2A characteristic data frame W and a characteristic data frame P0And a feature data frame V9
In sub-step 40272a3, the media file server compares the currently playing data frame with at least one characteristic data frame in turn.
After the media file server extracts the characteristic data frames, the currently played data frames may be sequentially compared with at least one characteristic data frame, for example, the media file server may compare the currently played data frames with at least one characteristic data frameThe data frame W is sequentially connected with the characteristic data frame K2A characteristic data frame W and a characteristic data frame P0And a feature data frame V9A comparison is made.
In sub-step 40273a, the media file server extracts a first target data frame that is the same as the currently playing data frame from data within a preset time period including the first play time.
After comparing the current playing data frame with the data in the target media file within the preset time period including the first playing time in sequence, the media file server may determine the first target data frame, which is the same as the current playing data frame, in the data in the preset time period including the first playing time, and the media file server may extract the first target data frame. For example, as can be seen from the step 40272a, if a first target data frame in the data within the preset time period including the first play time, which is the same as the currently played data frame, is a characteristic data frame W, the media file server extracts the characteristic data frame W.
Optionally, in this embodiment of the present disclosure, the handover request may further include: and a first playing time corresponding to the currently played data frame in the currently played media file of the media file client. When the switching request further includes a first play time corresponding to the currently played data frame in the media file currently played by the media file client, the media file server may determine the first target data frame according to the method shown in fig. 4 to 6.
Referring to fig. 4-6, which illustrate a flow chart of another method for determining a first target data frame in data of a target media file by a media file server according to the embodiment shown in fig. 4-1, referring to fig. 4-6, the flow chart of the method may include the following steps:
in sub-step 40271b, the media file server compares the currently played data frames with the data in the target media file in sequence within a preset time period including the first play time according to the switching request.
The media file server can analyze the switching request to obtain a current playing data frame in a media file currently played by the media file client and a first playing time corresponding to the current playing data frame. And then, sequentially comparing the current playing data frame with data in a preset time period including the first playing time in the target media file. The process of the media file server sequentially comparing the currently played data frame with the data in the target media file within the preset time period including the first playing time may refer to sub-step 40272a in the embodiment shown in fig. 4-4 and the corresponding embodiment shown in fig. 4-5, which is not described herein again in this embodiment of the disclosure.
In sub-step 40272b, the media file server extracts a first target data frame that is the same as the currently playing data frame from data within a preset time period including the first play time.
The sub-step 40272b may be implemented by referring to the sub-step 40273a in the embodiment shown in fig. 4 to 4, and the embodiments of the present disclosure are not described herein again.
Referring to fig. 4-7, which illustrate a flowchart of a method for determining a first target data frame in data of a target media file by a media file server according to another embodiment shown in fig. 4-1, the method may include the following steps, referring to fig. 4-7:
in sub-step 40271c, the media file server compares the currently playing data frame with the data in the target media file in turn, including the respective playing time.
In an example, it is assumed that the target media file includes data of each playing time, that is, all data of the target media file, that is, the media file server compares the currently played data frame with all data of the target media file in sequence2D0D6......K1K2K3K4W2WW7P4P2P0V0V9M1M2M3......MCK3..., the media file server sequentially connects the currently playing data frame W with the data2D0D6......K1K2K3K4W2WW7P4P2P0V0V9M1M2M3......MCK3...
In sub-step 40272c, the media file server extracts a first target data frame of the data of the target media file that is the same as the currently playing data frame.
After comparing the currently played data frame with the data of each playing time in the target media file in sequence, the media file server may determine a first target data frame, which is the same as the currently played data frame, in the data of each playing time, and the media file server may extract the first target data frame. Referring to step 40271c, if the first target data frame in the data at each playing time that is the same as the currently playing data frame is a data frame W, the media file server extracts the data frame W.
In sub-step 4028, the media file server determines a corresponding first target play time for the first target data frame in the target media file.
The media file server may store information of a target media file, which may include: and the corresponding relation between the data frame and the playing time records the data frame in the target media file and the playing time corresponding to the data frame in the target media file. The media file server may obtain a first target play time of the first target data frame in the target media file according to the first target data frame query data frame and play time correspondence. For example, the media file server queries a corresponding relationship between the data frame and the playing time according to the first target data frame W to obtain a first target playing time corresponding to the first target data frame W in the target media file, where the first target playing time may be 1:30:30(1 hour 30 minutes 30 seconds).
In sub-step 4029, the media file server determines second target data to be played after the first target play time from the data of the target media file.
For example, the media file server determines the data played after 1:30:30 from the data of the target media file, and the data played after 1:30:30 may be the second target data. The media file server may query, according to each time after the first target playing time, a corresponding relationship between a data frame in information of a target media file stored by the media file server and the playing time to obtain the data frame played at each time after the first target playing time, and obtain the second target data according to the data frames played at a plurality of times. For example, assume that the data played after 1:30:30 is W7P4P2P0V0V9M1M2M3......MCK3.., the media file server may query the corresponding relationship between the data frame in the information of the target media file and the playing time to obtain the second target data W7P4P2P0V0V9M1M2M3......MCK3..., which are not intended to be limiting by the embodiments of the present disclosure.
In sub-step 4030, the media file server takes the first target data frame and the second target data as data to be played.
After determining the first target data frame and the second target data, the media file server may use the first target data frame and the second target data as data to be played, for example, the media file server uses the first target data frame W and the second target data W7P4P2P0V0V9M1M2M3......MCK3.... as data to be played,the data to be played may be the WW7P4P2P0V0V9M1M2M3......MCK3......。
In step 403, the media file server sends the data to be played in the target media file to the media file client.
After determining the data to be played in the target media file, the media file server may send the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played in the target media file. It should be noted that, in the embodiment of the present disclosure, the media file server may send the data to be played to the media file client while determining the data to be played in the target media file, which is not limited in the embodiment of the present disclosure. Illustratively, the media File Server determines the WW7P4Sending WW to media file client7P4And determining P2P0V0Waiting for the data to be played.
In step 404, the media file client receives the data to be played in the target media file sent by the media file server.
When the media file server sends the data to be played in the target media file to the media file client, the media file client can receive the data to be played in the target media file sent by the media file server.
In step 405, the media file client plays the target media file according to the data to be played.
After receiving the data to be played in the target media file, the media file client can play the target media file according to the data to be played in the target media file.
For example, referring to fig. 4-8, it shows a flowchart of a method for a media file client to play a target media file according to data to be played, according to the embodiment shown in fig. 4-1, and referring to fig. 4-8, the method may include the following steps:
in sub-step 4051, the media file client determines whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file since the notification message was received.
It should be noted that, in the embodiment of the present disclosure, during the process of extracting the currently played data frame, generating the switching request, sending the switching request to the media file server, and determining the data to be played in the data of the target media file by the media file server, the media file client is still playing the currently played media file, that is, before the media file client plays the target media file, the media file client is always playing the currently played media file. Therefore, in order to make the target media file and the currently played media file achieve seamless connection switching and achieve the effect of making the user not perceive the switching process, the media file client can judge whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time of receiving the notification message, and when the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time of receiving the notification message, the media file client plays the target media file according to the data to be played.
For example, please refer to fig. 4-9, which show a flowchart of a method for a media file client to determine whether a buffering progress of data to be played is greater than a playing progress of a currently played media file from when an announcement message is received according to the embodiment shown in fig. 4-1, and referring to fig. 4-9, the method may include the following steps:
in sub-step 40511, the media file client determines a first playing time corresponding to the currently playing data frame in the currently playing media file.
The media file client may store information of played data in a currently played media file, where the information of played data in the currently played media file may include: the corresponding relation between the played data frame and the playing time records the played data frame in the played data in the media file currently played by the media file client and the playing time of the played data frame. The media file client can query the corresponding relation between the played data frame and the playing time according to the currently played data frame to obtain a first playing time corresponding to the currently played data frame in the currently played media file. For example, the media file client queries a corresponding relationship between a played data frame and a playing time according to the currently played data frame W to obtain a first playing time corresponding to the currently played data frame W in the currently played media file, where the first playing time may be 1:28: 30.
In sub-step 40512, the media file client determines the current playing time according to the playing progress of the currently played media file.
The playing progress is the playing time, so the media file client can use the playing progress of the currently played media file as the current playing time. For example, the playing progress of the currently playing media file may be 1:29:00(1 hour, 29 minutes, 0 seconds), and thus the current playing time may be 1:29: 00.
In sub-step 40513, the media file client determines a first target data frame that is the same as the currently played data frame in the buffered data of the data to be played, where the buffered data of the data to be played includes at least one data frame.
The media file server may send the data to be played to the media file client while determining the data to be played, and after receiving the data to be played, the media file client may store the data to be played in a cache space of the terminal, where the data to be played stored in the cache space is buffer data of the data to be played, and the buffer data of the data to be played may include at least one data frame. The media file client may determine, in the buffer data of the data to be played, a first target data frame that is the same as the currently played data frame.
Illustratively, the data to be played may be the WW7P4P2P0V0V9M1M2M3......MCK3.., the buffer data of the data to be played can be WW7P4P2P0V0V9M1M2The buffer data of the data to be played comprises a data frame W and a data frame W7Data frame P4Data frame P2Data frame P0Data frame V0Data frame V9Data frame M1And a data frame M2For a total of 9 data frames. As can be seen from the foregoing sub-step 4023, the currently played data frame is W, and therefore, the media file client may compare the currently played data frame W with the data frames in the buffer data of the data to be played in sequence, and determine the first target data frame W that is the same as the currently played data frame.
In sub-step 40514, the media file client determines a corresponding first target play time of the first target data frame in the target media file.
The data to be played sent by the media file server to the media file client may include information of the data to be played, the media file client may store information of buffer data of the data to be played of the target media file, and the information of the buffer data of the data to be played of the target media file may include: and the corresponding relation between the buffer data frame and the playing time records the buffer data frame in the buffer data of the data to be played of the target media file and the playing time of the buffer data frame. The media file client can obtain a first target playing time of the first target data frame corresponding to the target media file according to the corresponding relation between the first target data frame and the playing time. For example, the media file client queries a corresponding relationship between the buffered data frame and the playing time according to the first target data frame W to obtain a first target playing time corresponding to the first target data frame W in the target media file, where the first target playing time may be 1:30: 30.
In sub-step 40515, the media file client determines a second target play time corresponding to the last data frame to be played in the buffered data of the data to be played in the target media file.
The media file client may query the corresponding relationship between the buffered data frame and the playing time according to the last data frame to be played in the buffered data of the data to be played, and obtain a second target playing time corresponding to the last data frame to be played in the buffered data of the data to be played in the target media file. For example, the buffer data of the data to be played may be WW7P4P2P0V0V9M1M2If the last data frame to be played in the buffer data of the data to be played is the data frame M2The media file client can play the data frame M according to the last data frame to be played in the buffer data of the data to be played2Inquiring the corresponding relation between the buffer data frame and the playing time to obtain the last data frame M to be played in the buffer data of the data to be played2And at a corresponding second target playing time in the target media file, the second target playing time may be 1:31: 10.
In sub-step 40516, the media file client calculates a play time difference between the current play time and the first play time.
After determining the current playing time and the first playing time, the media file client may calculate a playing time difference between the current playing time and the first playing time. Illustratively, the current playing time is 1:29:00 and the first playing time is 1:28:30, so that the playing time difference between the current playing time 1:29:00 and the first playing time 1:28:30 is 30 seconds.
In sub-step 40517, the media file client calculates a target time difference between the second target play time and the first target play time.
After the media file client determines the second target playing time and the first target playing time, a target time difference between the second target playing time and the first target playing time can be calculated. For example, the second target playing time may be 1:31:10, and the first target playing time may be 1:30:30, so that the target time difference between the second target playing time 1:31:10 and the first target playing time 1:30:30 is 40 seconds.
In sub-step 40518, the media file client determines whether the target time difference is greater than the play time difference.
The media file client may compare the target time difference with the play time difference and determine whether the target time difference is greater than the play time difference. In the embodiment of the present disclosure, the target time difference is 40 seconds, the playing time difference is 30 seconds, and since 40 seconds is greater than 30 seconds, the media file client compares the target time difference with the playing time difference to determine that the target time difference is greater than the playing time difference.
In sub-step 40519, when the target time difference is greater than the play time difference, the media file client determines that the buffering progress of the data to be played is greater than the play progress of the currently played media file since the notification message was received.
If in sub-step 40518, the media file client determines that the target time difference is greater than the play time difference, it indicates that the buffering progress of the data to be played is greater than the play progress of the currently played media file since the notification message was received, and therefore, the media file client determines that the buffering progress of the data to be played is greater than the play progress of the currently played media file since the notification message was received.
In sub-step 4052, when the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time when the notification message is received, the media file client performs playing of the target media file according to the data to be played.
If in sub-step 4051, the media file client determines that the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time when the notification message is received, the media file client plays the target media file according to the data to be played.
For example, referring to fig. 4-10, it shows a flowchart of a method for a media file client to play a target media file according to data to be played, which is provided in the embodiment shown in fig. 4-1, and referring to fig. 4-10, the method may include the following steps:
in sub-step 40521, the media file client determines the data frame played at the current playing time among the data of the currently played media file.
The media file client may store information of playing data in a currently playing media file, where the information of playing data in the currently playing media file may include: the corresponding relationship between the playing data frame and the playing time includes the currently playing data frame and the played data frame, and the playing data frame in the playing data in the media file currently played by the media file client and the playing time of the playing data frame are recorded in the corresponding relationship between the playing data frame and the playing time. The media file client can query the corresponding relation between the playing data frame and the playing time according to the current playing time to obtain the data frame played at the current playing time. For example, the current playing time is 1:29:00, the media file client queries the corresponding relationship between the playing data frame and the playing time according to the current playing time 1:29:00 to obtain the data frame played at the current playing time 1:29:00, and the data frame played at the current playing time 1:29:00 may be the data frame V9
In sub-step 40522, the media file client determines a target data frame to be played that is the same as the data frame played at the current playing time in the buffer data of the data to be played.
The media file client may determine a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffered data of the data to be played by comparing the data frame played at the current playing time with the data frame in the buffered data of the data to be played.
For example, the buffer data of the data to be played may be WW7P4P2P0V0V9M1M2The media file client end plays the data frame V at the current playing time9Comparing with each data frame in the buffer data of the data to be played, and determining a target data frame V to be played which is the same as the data frame played at the current playing time in the buffer data of the data to be played9
In sub-step 40523, the media file client sequentially plays the target data frame to be played and the data to be played that is to be played after the playing time corresponding to the target data frame to be played in the buffered data of the data to be played.
After determining the target data frame to be played, the media file client may play the target data frame to be played and the data to be played that is to be played after the play time corresponding to the target data frame to be played in sequence, where the buffered data of the data to be played is WW7P4P2P0V0V9M1M2The target data frame to be played is V9At the target data frame V to be played9The data to be played after the corresponding playing time comprises: data frame M1And a data frame M2Therefore, the media file client end sequentially plays the target data frames to be played V9Data frame M1And a data frame M2And subsequently buffered data.
It should be noted that, the order of the steps of the media file playing method provided in the embodiment of the present disclosure may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by a person skilled in the art within the technical scope of the present disclosure is included in the protection scope of the present disclosure, and therefore, the details are not described again.
To sum up, in the media file playing method provided by the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to a currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, and the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 5 is a block diagram illustrating a media file playing apparatus 500 according to an exemplary embodiment, where the media file playing apparatus 500 may be implemented by software, hardware or a combination of the two as part or all of the server 140 in the implementation environment shown in fig. 1, and the server 140 may be a media file server. Referring to fig. 5, the media file playing apparatus 500 may include:
the detecting module 510 is configured to detect whether a target media file exists in the media file server during a process of playing a media file by the media file client, where the target media file is a high-version file of the media file currently played by the media file client.
The determining module 520 is configured to determine the data to be played in the target media file according to the currently played data frame of the currently played media file when the detecting module 510 detects that the target media file exists in the media file server.
A sending module 530 configured to send the data to be played in the target media file determined by the determining module 520 to the media file client, so that the media file client plays the target media file according to the data to be played.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to the currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 6-1 is a block diagram illustrating a media file playing apparatus 600 according to another exemplary embodiment, where the media file playing apparatus 600 may be implemented by software, hardware or a combination of the two as part or all of the server 140 in the implementation environment shown in fig. 1, and the server 140 may be a media file server. Referring to fig. 6-1, the media file playing apparatus 600 may include, but is not limited to:
the detection module 610 is configured to detect whether a target media file exists in the media file server in the process of playing the media file by the media file client, wherein the target media file is a high-version file of the media file currently played by the media file client;
a determining module 620, configured to determine, when the detecting module 610 detects that the target media file exists in the media file server, data to be played in the target media file according to a currently played data frame of the currently played media file;
the sending module 630 is configured to send the data to be played in the target media file determined by the determining module 620 to the media file client, so that the media file client plays the target media file according to the data to be played.
Optionally, referring to fig. 6-2, a block diagram of a determining module 620 provided in the embodiment shown in fig. 6-1 is shown, and referring to fig. 6-2, the determining module 620 may include:
the sending submodule 621 is configured to send a notification message to the media file client, where the notification message is used to notify the media file client that the target media file exists in the media file server;
the receiving submodule 622 is configured to receive a switching request sent by the media file client according to the notification message sent by the sending submodule 621, where the switching request includes: the media file client extracts a currently played data frame from data of a currently played media file when receiving the notification message;
a first determining sub-module 623 configured to determine, in the data of the target media file, a first target data frame that is the same as the currently played data frame in the switching request received by the receiving sub-module 622;
a second determining sub-module 624 configured to determine a first target playing time of the first target data frame determined by the first determining sub-module 623 in the target media file;
a third determining sub-module 625 configured to determine, from the data of the target media file, second target data played after the first target play time determined by the second determining sub-module 624;
as a sub-module 626, it is configured to take the first target data frame determined by the first determining sub-module 623 and the second target data determined by the third determining sub-module 625 as data to be played.
Optionally, referring to fig. 6-3, a block diagram of a first determining sub-module 623 provided in the embodiment shown in fig. 6-1 is shown, and referring to fig. 6-3, the first determining sub-module 623 may include:
a time determining sub-module 6231, configured to determine a first playing time corresponding to the currently playing data frame in the switching request received by the receiving sub-module 622 in the currently playing media file;
a comparison submodule 6232, configured to compare the currently played data frame in the switching request received by the receiving submodule 622 with the data in the target media file within the preset time period including the first playing time determined by the time determining submodule 6231 in sequence;
an extracting sub-module 6233 configured to extract the same first target data frame as the currently played data frame in the switching request received by the receiving sub-module 622 from the data within the preset time period including the first play time determined by the time determining sub-module 6231.
Optionally, the handover request further includes: referring to fig. 6-4, a block diagram of another first determining sub-module 623 provided in the embodiment shown in fig. 6-1 is shown, where the first determining sub-module 623, referring to fig. 6-4, may include:
a comparing sub-module 6232, configured to compare the currently played data frames with data in a preset time period including the first playing time in the target media file in sequence according to the switching request received by the receiving sub-module 622;
the extracting sub-module 6233 is configured to extract the same first target data frame as the currently played data frame in the switching request received by the receiving sub-module 622 from the data within the preset time period including the first playing time.
Optionally, referring to fig. 6-5, a block diagram of another first determining sub-module 623 provided in the embodiment shown in fig. 6-1 is shown, and referring to fig. 6-5, the first determining sub-module 623 may include:
a comparing sub-module 6234 configured to compare the currently played data frame in the switching request received by the receiving sub-module 622 with the data in the target media file including each playing time in sequence;
the extracting sub-module 6235 is configured to extract a first target data frame in the data of the target media file, which is the same as the currently played data frame in the switching request received by the receiving sub-module 622.
Optionally, the comparison sub-module 6232 is configured to:
dividing data in a preset time period including a first playing time in a target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
the currently playing data frame is compared with at least one characteristic data frame in sequence.
Optionally, the determining module 620 is configured to:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, the detecting module 610 is configured to:
in the process of playing the media file at the media file client, periodically detecting whether a target media file exists in the media file server;
or,
when a detection request sent by a media file client is received, whether a target media file exists in a media file server is detected.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to the currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 7 is a block diagram illustrating a media file playing apparatus 700 according to still another exemplary embodiment, where the media file playing apparatus 700 may be implemented by software, hardware or a combination of the two as part or all of the terminal 120 in the implementation environment shown in fig. 1, and the terminal 120 may be installed with a media file client. Referring to fig. 7, the media file playing apparatus 700 may include:
the first receiving module 710 is configured to receive data to be played in a target media file sent by a media file server in a process of playing a media file at a media file client, where the data to be played in the target media file is determined according to a currently played data frame of a currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file.
The playing module 720 is configured to play the target media file according to the data to be played received by the first receiving module 710.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file client receives data to be played in the target media file sent by the media file server, where the data to be played in the target media file is determined according to the currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file, and the target media file is played according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 8-1 is a block diagram illustrating a media file playing apparatus 800 according to yet another exemplary embodiment, where the media file playing apparatus 800 may be implemented by software, hardware or a combination of the two as part or all of the terminal 120 in the implementation environment shown in fig. 1, and the terminal 120 may be installed with a media file client. Referring to fig. 8-1, the media file playing apparatus 800 may include:
a first receiving module 810, configured to receive data to be played in a target media file sent by a media file server in a process of playing a media file at a media file client, where the data to be played in the target media file is determined according to a currently played data frame of a currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and a playing module 820 configured to play the target media file according to the data to be played received by the first receiving module 810.
Optionally, with continuing reference to fig. 8-1, the media file playing apparatus 800 may further include:
a second receiving module 830, configured to receive an informing message sent by the media file server, where the informing message is used to inform the media file client that the target media file exists in the media file server;
an extracting module 840 configured to extract a currently played data frame from data of a currently played media file according to the notification message received by the second receiving module 830, where the currently played data frame is a data frame played when the notification message is received;
a generating module 850 configured to generate a switching request according to the currently playing data frame extracted by the extracting module 840, where the switching request includes: currently playing the data frame;
a sending module 860 configured to send the switching request generated by the generating module 850 to the media file server, so that the media file server determines the data to be played from the data of the target media file according to the currently played data frame.
Optionally, referring to fig. 8-2, a block diagram of a playing module 820 shown in the embodiment shown in fig. 8-1 is shown, and referring to fig. 8-2, the playing module 820 may include:
a determining submodule 821 configured to determine whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time when the notification message is received;
the playing sub-module 822 is configured to play the target media file according to the data to be played when the judging sub-module 821 determines that the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the time when the notification message is received.
Optionally, the determining submodule 821 is configured to:
determining a first playing time corresponding to a currently played data frame in a currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as a current playing data frame in buffer data of data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, the play sub-module 822 is configured to:
determining a data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Optionally, the handover request further includes: and a first playing time corresponding to the currently played data frame in the currently played media file.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file client receives data to be played in the target media file sent by the media file server, where the data to be played in the target media file is determined according to the currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file, and the target media file is played according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 9 is a block diagram illustrating an apparatus 900 for media file playback according to an example embodiment. For example, the apparatus 900 may be provided as a server. Illustratively, the server may be a media file server, and with reference to FIG. 9, the apparatus 900 includes a processing component 922, which further includes one or more processors, and memory resources, represented by memory 932, for storing instructions, such as applications, executable by the processing component 922. The application programs stored in memory 932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 922 is configured to execute instructions to perform the above-mentioned media file playing method, which includes:
in the process of playing a media file at a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high-version file of the media file currently played at the media file client;
when a target media file exists in the media file server, determining data to be played in the target media file according to a currently played data frame of the currently played media file;
and sending the data to be played in the target media file to the media file client so that the media file client can play the target media file according to the data to be played.
Optionally, determining data to be played in the target media file according to the currently played data frame of the currently played media file includes:
sending a notification message to the media file client, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
receiving a switching request sent by a media file client according to the notification message, wherein the switching request comprises: the media file client extracts a currently played data frame from data of a currently played media file when receiving the notification message;
determining a first target data frame which is the same as a currently played data frame in data of a target media file;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining second target data played after the first target playing time from the data of the target media file;
and taking the first target data frame and the second target data as data to be played.
Optionally, determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
determining a first playing time corresponding to a currently played data frame in a currently played media file;
comparing the current playing data frame with data in a preset time period including a first playing time in the target media file in sequence;
and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time.
Optionally, the handover request further includes: a first playing time corresponding to the currently playing data frame in the currently playing media file,
determining a first target data frame identical to a currently played data frame in data of a target media file, including:
according to the switching request, sequentially comparing the current playing data frame with data in a preset time period including a first playing time in the target media file;
and extracting a first target data frame which is the same as the current playing data frame from data in a preset time period including the first playing time.
Optionally, determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
comparing the current playing data frame with the data of each playing moment in the target media file in sequence;
and extracting a first target data frame which is the same as the currently played data frame in the data of the target media file.
Optionally, comparing the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence, includes:
dividing data in a preset time period including a first playing time in a target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
the currently playing data frame is compared with at least one characteristic data frame in sequence.
Optionally, determining data to be played in the target media file according to the currently played data frame of the currently played media file includes:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
Optionally, in the process of playing the media file at the media file client, detecting whether the target media file exists in the media file server includes:
in the process of playing the media file at the media file client, periodically detecting whether a target media file exists in the media file server;
or,
when a detection request sent by a media file client is received, whether a target media file exists in a media file server is detected.
The device 900 may also include a power component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and an input output (I/O) interface 958. The device 900 may operate based on an operating system such as Windows Server, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, or the like, stored in the memory 932.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to the currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the media file currently played by the media file client, and sends the data to be played in the target media file to the media file client, so that the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 10 is a block diagram illustrating a media file playback apparatus 1000 according to another exemplary embodiment. For example, the apparatus 1000 may be a smartphone, a smart television, a desktop computer, a digital broadcast terminal, a game console, a tablet device, and so on.
Referring to fig. 10, the apparatus 1000 may include one or more of the following components: processing component 1002, memory 1004, power component 1006, multimedia component 1008, audio component 1010, input/output (I/O) interface 1012, sensor component 1014, and communications component 1016.
The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, playback, data communication, camera operations, and recording operations. The processing components 1002 may include one or more processors 1020 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
The memory 1004 is configured to store various types of data to support operations at the apparatus 1000. Examples of such data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1004 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 1006 provides power to the various components of the device 1000. The power components 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1000.
The multimedia component 1008 includes a screen that provides an output interface between the device 1000 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1000 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 1010 is configured to output and/or input audio signals. For example, audio component 1010 includes a Microphone (MIC) configured to receive external audio signals when apparatus 1000 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 1004 or transmitted via the communication component 1016. In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
I/O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the device 1000. For example, sensor assembly 1014 may detect an open/closed state of device 1000, the relative positioning of components, such as a display and keypad of device 1000, sensor assembly 1014 may also detect a change in position of device 1000 or a component of device 1000, the presence or absence of user contact with device 1000, orientation or acceleration/deceleration of device 1000, and a change in temperature of device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 1016 is configured to facilitate communications between the apparatus 1000 and other devices in a wired or wireless manner. The device 1000 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1016 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 1004 comprising instructions, executable by the processor 1020 of the device 1000 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a device 1000, enable the device 1000 to perform a media file playback method, the method comprising:
in the process of playing a media file at a media file client, receiving data to be played in a target media file sent by a media file server, wherein the data to be played in the target media file is determined according to a currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and playing the target media file according to the data to be played.
Optionally, before receiving data to be played in a target media file sent by the media file server, the method further includes:
receiving an informing message sent by a media file server, wherein the informing message is used for informing a media file client that a target media file exists in the media file server;
extracting a currently played data frame from data of a currently played media file according to the notification message, wherein the currently played data frame is a data frame played when the notification message is received;
generating a switching request according to the current playing data frame, wherein the switching request comprises: currently playing the data frame;
and sending a switching request to the media file server so that the media file server can determine the data to be played from the data of the target media file according to the current playing data frame.
Optionally, playing the target media file according to the data to be played includes:
judging whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and when the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received, playing the target media file according to the data to be played.
Optionally, the determining whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from when the notification message is received includes:
determining a first playing time corresponding to a currently played data frame in a currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as a current playing data frame in buffer data of data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
Optionally, playing the target media file according to the data to be played includes:
determining a data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
Optionally, the handover request further includes: and a first playing time corresponding to the currently played data frame in the currently played media file.
To sum up, in the media file playing apparatus provided in the embodiment of the present disclosure, the media file client receives data to be played in the target media file sent by the media file server, where the data to be played in the target media file is determined according to the currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file, and the target media file is played according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Fig. 11 is a schematic diagram illustrating a media file playback system 1100 in accordance with an exemplary embodiment. Referring to fig. 11, the media file playing system 1100 may include: a server 1110 and a terminal 1120, where the server 1110 may be a media file server, and the terminal 1120 has a media file client installed thereon.
In one possible implementation, the server 1110 includes the media file playing apparatus shown in fig. 5 or fig. 6-1, and the media file client includes the media file playing apparatus shown in fig. 7 or fig. 8-1.
In another possible implementation, the server 1110 includes the media file playing apparatus shown in fig. 9, and the media file client includes the media file playing apparatus shown in fig. 10.
To sum up, in the media file playing system provided in the embodiment of the present disclosure, the media file server determines data to be played in the target media file according to the currently played data frame of the currently played media file by detecting whether the target media file exists in the media file server, where the target media file is a high-version file of the currently played media file at the media file client, and sends the data to be played in the target media file to the media file client, and the media file client plays the target media file according to the data to be played. Because the media file switching can be realized without user operation, the problem of complex media file switching process in the related technology is solved, and the beneficial effect of simplifying the media file switching process is achieved.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (32)

1. A method for playing a media file, the method comprising:
in the process of playing a media file at a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high-version file of the media file currently played at the media file client;
when the target media file exists in the media file server, determining data to be played in the target media file according to a currently played data frame of the currently played media file;
and sending the data to be played in the target media file to the media file client so that the media file client can play the target media file according to the data to be played.
2. The method of claim 1, wherein the determining the data to be played in the target media file according to the currently played data frame of the currently played media file comprises:
sending a notification message to the media file client, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
receiving a switching request sent by the media file client according to the notification message, wherein the switching request comprises: the media file client extracts a currently played data frame from the data of the currently played media file when receiving the notification message;
determining a first target data frame which is the same as the currently played data frame in the data of the target media file;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining second target data played after the first target playing time from the data of the target media file;
and taking the first target data frame and the second target data as the data to be played.
3. The method of claim 2, wherein determining the first target data frame that is the same as the currently playing data frame in the data of the target media file comprises:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
comparing the current playing data frame with data in a preset time period including the first playing time in the target media file in sequence;
and extracting a first target data frame which is the same as the current playing data frame from the data in the preset time period including the first playing time.
4. The method of claim 2, wherein the handover request further comprises: a first playing time corresponding to the currently playing data frame in the currently playing media file,
the determining a first target data frame identical to the currently played data frame in the data of the target media file includes:
according to the switching request, sequentially comparing the current playing data frame with data in a preset time period including the first playing time in the target media file;
and extracting a first target data frame which is the same as the current playing data frame from the data in the preset time period including the first playing time.
5. The method of claim 2, wherein determining the first target data frame that is the same as the currently playing data frame in the data of the target media file comprises:
comparing the current playing data frame with the data of each playing moment in the target media file in sequence;
and extracting a first target data frame which is the same as the currently played data frame in the data of the target media file.
6. The method according to claim 3 or 4, wherein the sequentially comparing the currently played data frame with the data in the target media file within a preset time period including the first playing time comprises:
dividing data in a preset time period including the first playing time in the target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
and comparing the current playing data frame with the at least one characteristic data frame in sequence.
7. The method according to any one of claims 1 to 6, wherein the determining the data to be played in the target media file according to the currently played data frame of the currently played media file comprises:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
8. The method according to any one of claims 1 to 6, wherein the detecting whether the target media file exists in the media file server during the process of playing the media file by the media file client comprises:
in the process of playing the media file at the media file client, periodically detecting whether the target media file exists in the media file server;
or,
and when a detection request sent by the media file client is received, detecting whether the target media file exists in the media file server.
9. A method for playing a media file, the method comprising:
receiving data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and playing the target media file according to the data to be played.
10. The method of claim 9, wherein before the receiving the data to be played in the target media file sent by the media file server, the method further comprises:
receiving a notification message sent by the media file server, wherein the notification message is used for notifying the media file client that the target media file exists in the media file server;
extracting a currently played data frame from the data of the currently played media file according to the notification message, wherein the currently played data frame is a data frame played when the notification message is received;
generating a switching request according to the current playing data frame, wherein the switching request comprises: the currently played data frame;
and sending the switching request to the media file server so that the media file server can determine the data to be played from the data of the target media file according to the current playing data frame.
11. The method according to claim 9 or 10,
the playing of the target media file according to the data to be played includes:
judging whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and when the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received, playing the target media file according to the data to be played.
12. The method of claim 11,
the determining whether the buffering progress of the data to be played is greater than the playing progress of the currently played media file from when the notification message is received includes:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as the current playing data frame in the buffer data of the data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
13. The method according to claim 12, wherein the playing the target media file according to the data to be played comprises:
determining the data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
14. The method of claim 10, wherein the handover request further comprises: and a first playing time corresponding to the currently played data frame in the currently played media file.
15. An apparatus for playing a media file, the apparatus comprising:
the system comprises a detection module, a storage module and a processing module, wherein the detection module is configured to detect whether a target media file exists in a media file server in the process of playing a media file by a media file client, and the target media file is a high-version file of the media file currently played by the media file client;
a determining module configured to determine data to be played in the target media file according to a currently played data frame of the currently played media file when the target media file exists in the media file server;
and the sending module is configured to send the data to be played in the target media file to the media file client, so that the media file client can play the target media file according to the data to be played.
16. The apparatus of claim 15, wherein the determining module comprises:
a sending submodule configured to send a notification message to the media file client, where the notification message is used to notify the media file client that the target media file exists in the media file server;
a receiving submodule configured to receive a switching request sent by the media file client according to the notification message, where the switching request includes: the media file client extracts a currently played data frame from the data of the currently played media file when receiving the notification message;
a first determining sub-module configured to determine a first target data frame identical to the currently played data frame in the data of the target media file;
a second determining sub-module configured to determine a corresponding first target play time of the first target data frame in the target media file;
a third determining sub-module configured to determine, from the data of the target media file, second target data played after the first target play time;
and the sub-module is configured to take the first target data frame and the second target data as the data to be played.
17. The apparatus of claim 16, wherein the first determining submodule comprises:
the time determining submodule is configured to determine a first playing time corresponding to the currently played data frame in the currently played media file;
the comparison submodule is configured to compare the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence;
an extraction sub-module configured to extract a first target data frame identical to the currently played data frame from data within a preset time period including the first play time.
18. The apparatus of claim 16, wherein the handover request further comprises: a first playing time corresponding to the currently playing data frame in the currently playing media file,
the first determination submodule includes:
the comparison submodule is configured to compare the currently played data frame with data in a preset time period including the first playing time in the target media file in sequence according to the switching request;
an extraction sub-module configured to extract a first target data frame identical to the currently played data frame from data within a preset time period including the first play time.
19. The apparatus of claim 16,
the first determination submodule includes:
a comparison submodule configured to compare the currently played data frame with data including each playing time in the target media file in sequence;
and the extraction sub-module is configured to extract a first target data frame which is the same as the currently played data frame in the data of the target media file.
20. The apparatus of claim 17 or 18, wherein the comparison submodule is configured to:
dividing data in a preset time period including the first playing time in the target media file into at least two data segments;
extracting at least one characteristic data frame from each data segment, wherein each characteristic data frame is used for representing the attribute of the playing content corresponding to the data segment where each characteristic data frame is located;
and comparing the current playing data frame with the at least one characteristic data frame in sequence.
21. The apparatus according to any of claims 15 to 20, wherein the determining module is configured to:
counting the number of the target media files;
and when the number of the target media files is more than or equal to 2, determining the data to be played from the target media file with the highest version according to the currently played data frame of the currently played media file.
22. The apparatus of any of claims 15 to 20, wherein the detection module is configured to:
in the process of playing the media file at the media file client, periodically detecting whether the target media file exists in the media file server;
or,
and when a detection request sent by the media file client is received, detecting whether the target media file exists in the media file server.
23. An apparatus for playing a media file, the apparatus comprising:
the first receiving module is configured to receive data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of a currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and the playing module is configured to play the target media file according to the data to be played.
24. The apparatus of claim 23, further comprising:
a second receiving module, configured to receive a notification message sent by the media file server, where the notification message is used to notify the media file client that the target media file exists in the media file server;
an extraction module configured to extract a currently played data frame from data of the currently played media file according to the notification message, where the currently played data frame is a data frame played when the notification message is received;
a generating module configured to generate a switching request according to the currently played data frame, wherein the switching request includes: the currently played data frame;
a sending module configured to send the switching request to the media file server, so that the media file server determines the data to be played from the data of the target media file according to the currently played data frame.
25. The apparatus of claim 23 or 24,
the playing module comprises:
the judging submodule is configured to judge whether the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received;
and the playing sub-module is configured to play the target media file according to the data to be played when the buffering progress of the data to be played is greater than the playing progress of the currently played media file from the moment when the notification message is received.
26. The apparatus of claim 25,
the determination submodule configured to:
determining a first playing time corresponding to the currently played data frame in the currently played media file;
determining the current playing time according to the playing progress of the currently played media file;
determining a first target data frame which is the same as the current playing data frame in the buffer data of the data to be played, wherein the buffer data of the data to be played comprises at least one data frame;
determining a first target playing time corresponding to the first target data frame in the target media file;
determining a second target playing time corresponding to the last data frame to be played in the buffer data of the data to be played in the target media file;
calculating the playing time difference between the current playing time and the first playing time;
calculating a target time difference between the second target playing time and the first target playing time;
judging whether the target time difference is larger than the playing time difference;
and when the target time difference is larger than the playing time difference, determining that the buffering progress of the data to be played is larger than the playing progress of the currently played media file from the moment when the notification message is received.
27. The apparatus of claim 26, wherein the play sub-module is configured to:
determining the data frame played at the current playing time in the data of the currently played media file;
determining a target data frame to be played, which is the same as the data frame played at the current playing time, in the buffer data of the data to be played;
and sequentially playing the target data frame to be played and the data to be played which is played after the playing time corresponding to the target data frame to be played in the buffer data of the data to be played.
28. The apparatus of claim 24, wherein the handover request further comprises: and a first playing time corresponding to the currently played data frame in the currently played media file.
29. A media file playback apparatus, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
in the process of playing a media file at a media file client, detecting whether a target media file exists in a media file server, wherein the target media file is a high-version file of the media file currently played at the media file client;
when the target media file exists in the media file server, determining data to be played in the target media file according to a currently played data frame of the currently played media file;
and sending the data to be played in the target media file to the media file client so that the media file client can play the target media file according to the data to be played.
30. A media file playback apparatus, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
receiving data to be played in a target media file sent by a media file server in the process of playing the media file at a media file client, wherein the data to be played in the target media file is determined according to a currently played data frame of the currently played media file when the media file server detects that the target media file exists in the media file server, and the target media file is a high-version file of the currently played media file;
and playing the target media file according to the data to be played.
31. A media file playback system, the system comprising: a media file server and a terminal, wherein the terminal is provided with a media file client,
the media file server comprising the media file playing apparatus of any of claims 15 to 22;
the media file client comprising a media file playback device as claimed in any one of claims 23 to 28.
32. A media file playback system, the system comprising: a media file server and a terminal, wherein the terminal is provided with a media file client,
the media file server comprising the media file playback apparatus of claim 29;
the media file client comprising the media file playback device of claim 30.
CN201510828146.XA 2015-11-25 2015-11-25 Media file playing method, apparatus and system Active CN105430449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510828146.XA CN105430449B (en) 2015-11-25 2015-11-25 Media file playing method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510828146.XA CN105430449B (en) 2015-11-25 2015-11-25 Media file playing method, apparatus and system

Publications (2)

Publication Number Publication Date
CN105430449A true CN105430449A (en) 2016-03-23
CN105430449B CN105430449B (en) 2018-12-18

Family

ID=55508333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510828146.XA Active CN105430449B (en) 2015-11-25 2015-11-25 Media file playing method, apparatus and system

Country Status (1)

Country Link
CN (1) CN105430449B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108307248A (en) * 2018-02-01 2018-07-20 腾讯科技(深圳)有限公司 Video broadcasting method, device, computing device and storage medium
CN109495789A (en) * 2017-09-13 2019-03-19 华为技术有限公司 Media file playing method, equipment and communication system
CN109600626A (en) * 2018-12-24 2019-04-09 北京奇艺世纪科技有限公司 A kind of method for processing video frequency and relevant device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101606388A (en) * 2006-12-06 2009-12-16 联合视频制品公司 The system and method that source of media is selected and changed
CN102149005A (en) * 2011-04-29 2011-08-10 四川长虹电器股份有限公司 Self-adaptive method for controlling network video quality
US20110235530A1 (en) * 2010-03-25 2011-09-29 Avaya Inc. Dlp-based wireless docking for wifi-based endpoints with desktop
CN103051937A (en) * 2011-10-12 2013-04-17 腾讯科技(深圳)有限公司 Video frequency broadcast and control method as well as device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101606388A (en) * 2006-12-06 2009-12-16 联合视频制品公司 The system and method that source of media is selected and changed
US20110235530A1 (en) * 2010-03-25 2011-09-29 Avaya Inc. Dlp-based wireless docking for wifi-based endpoints with desktop
CN102149005A (en) * 2011-04-29 2011-08-10 四川长虹电器股份有限公司 Self-adaptive method for controlling network video quality
CN103051937A (en) * 2011-10-12 2013-04-17 腾讯科技(深圳)有限公司 Video frequency broadcast and control method as well as device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495789A (en) * 2017-09-13 2019-03-19 华为技术有限公司 Media file playing method, equipment and communication system
CN108307248A (en) * 2018-02-01 2018-07-20 腾讯科技(深圳)有限公司 Video broadcasting method, device, computing device and storage medium
US11356739B2 (en) 2018-02-01 2022-06-07 Tencent Technology (Shenzhen) Company Ltd Video playback method, terminal apparatus, and storage medium
CN109600626A (en) * 2018-12-24 2019-04-09 北京奇艺世纪科技有限公司 A kind of method for processing video frequency and relevant device

Also Published As

Publication number Publication date
CN105430449B (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN105244048B (en) Audio play control method and device
CN108737908B (en) Media playing method, device and storage medium
JP6626440B2 (en) Method and apparatus for playing multimedia files
WO2017067070A1 (en) Information pushing method, apparatus, device and system
US20170126801A1 (en) Method, apparatus, and storage medium for performing media synchronization
CN112969096A (en) Media playing method and device and electronic equipment
CN111343476A (en) Video sharing method and device, electronic equipment and storage medium
CN107396171A (en) Live network broadcast method, device and storage medium
TW202122989A (en) Information processing method and apparatus, electronic device and computer readable storage medium
CN107040591B (en) Method and device for controlling client
CN111246283B (en) Video playing method and device, electronic equipment and storage medium
US11379180B2 (en) Method and device for playing voice, electronic device, and storage medium
CN107204883B (en) Network fault processing method and device
CN104618218A (en) Information reminding method and device
CN106559712A (en) Video playback processing method, device and terminal device
CN106534951B (en) Video segmentation method and device
WO2018095252A1 (en) Video recording method and device
CN111182328B (en) Video editing method, device, server, terminal and storage medium
CN111031332A (en) Data interaction method, device, server and storage medium
CN104933071A (en) Information retrieval method and corresponding device
CN105430449B (en) Media file playing method, apparatus and system
CN106453528A (en) Method and device for pushing message
US11545148B2 (en) Do not disturb functionality for voice responsive devices
CN113365099B (en) Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium
CN112910592B (en) Clock synchronization method and device, terminal and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant