CN110300308B - Streaming media playback method and device - Google Patents

Streaming media playback method and device Download PDF

Info

Publication number
CN110300308B
CN110300308B CN201810239723.5A CN201810239723A CN110300308B CN 110300308 B CN110300308 B CN 110300308B CN 201810239723 A CN201810239723 A CN 201810239723A CN 110300308 B CN110300308 B CN 110300308B
Authority
CN
China
Prior art keywords
time
streaming media
user
file
sending
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.)
Active
Application number
CN201810239723.5A
Other languages
Chinese (zh)
Other versions
CN110300308A (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.)
Guizhou Baishancloud Technology Co Ltd
Original Assignee
Guizhou Baishancloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guizhou Baishancloud Technology Co Ltd filed Critical Guizhou Baishancloud Technology Co Ltd
Priority to CN201810239723.5A priority Critical patent/CN110300308B/en
Priority to CN202010018588.9A priority patent/CN111193942B/en
Publication of CN110300308A publication Critical patent/CN110300308A/en
Application granted granted Critical
Publication of CN110300308B publication Critical patent/CN110300308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • H04N21/4325Content retrieval operation from a local storage medium, e.g. hard-disk by playing back content from the storage medium
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • H04N21/4586Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists

Landscapes

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

Abstract

The utility model discloses a streaming media playback method and a device, the method comprises: receiving a streaming media playback request of a user; analyzing the time parameter and the streaming media name in the streaming media playback request; determining a playback time point according to the time parameter; acquiring a play list file corresponding to the playback time point and the streaming media name; and sending the playlist file to the user. The invention can reduce the processing pressure and the source returning pressure of the central server, improve the response time to the user request, reduce the source returning downloading bandwidth, accelerate the access speed and improve the user experience.

Description

Streaming media playback method and device
Technical Field
The present application relates to, but not limited to, the field of internet technologies, and in particular, to a streaming media playback method and apparatus.
Background
In an HTTP Live Streaming (HLS) playback service, a user requests an m3u8 playlist file from a Streaming server, the Streaming server generates an m3u8 playlist file according to a user playback time point and then sends the playlist file to the user, and the user acquires the m3u8 playlist file and then sequentially requests a ts file according to an index in the file. Often, an m3u8 playlist file only contains several ts file information, and a user needs to continuously request a new m3u8 playlist file to obtain subsequent ts file information to continuously watch a video, which requires the streaming server to calculate the starting time point of each m3u8 playlist file. The m3u8 playlist files acquired by different users are different, and the streaming media server cannot reduce the calculation pressure through caching, so when the magnitude of the user needing to be served is larger, a large number of servers are needed to provide services, each server bears the pressure of calculating and storing the full ts file, and a large amount of storage space and cost are wasted.
In the prior art, generally, a center-edge architecture is used to provide HLS playback service, a center server is responsible for recording HLS, establishing an index relationship between an m3u8 playlist file index and a ts file, and storing the ts file, and an edge server is used to receive an m3u8 playlist file acquisition request and cache the ts file. All m3u8 playlist file requests in the above solution of the prior art need to reach the central server via the edge node for processing, and this solution has the following disadvantages:
firstly, the central server processes a large number of m3u8 playlist file requests, and huge processing pressure exists;
second, the user experience is greatly affected for delay and stuck-sensitive live broadcasts.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides a streaming media playback method and apparatus.
The streaming media playback method provided by the invention is applied to an edge server and comprises the following steps:
receiving a streaming media playback request of a user;
analyzing the time parameter and the streaming media name in the streaming media playback request;
determining a playback time point according to the time parameter;
acquiring a play list file corresponding to the playback time point and the streaming media name;
and sending the playlist file to the user.
The streaming media playback method also has the following characteristics:
the determining the replay time point according to the time parameter includes:
when the type of the time parameter is judged to be a relative time type, taking the difference between the current system time of the edge server and the relative time in the time parameter as the replay time point;
and when the type of the time parameter is judged to be an absolute time type, taking the difference value between the current system time of the edge server and the absolute time in the time parameter as a temporary relative time, constructing a streaming media playback request with the type of the time parameter as a relative time type and the relative time as the temporary relative time, sending the streaming media playback request to the user, receiving the streaming media playback request with the type of the time parameter as a relative time type from the user, and taking the difference value between the current system time of the edge server and the relative time in the time parameter of the streaming media playback request as the playback time point.
The streaming media playback method also has the following characteristics:
the obtaining of the playlist file corresponding to the playback time point includes:
searching whether a play list file corresponding to the replay time point and the streaming media name is cached or not, if so, sending the cached play list file to the user, if not, constructing a streaming media replay request with the time parameter type being the replay time type and the replay time being the replay time point, sending the streaming media replay request to a central server, receiving the play list file from the central server, and caching the play list file as the play list file corresponding to the replay time point.
The streaming media playback method also has the following characteristics:
the method comprises the following steps that the edge server receives a streaming media playback request of a user at the same time or before and after, and the method also comprises the following steps; acquiring the identification of the user;
after the playlist file corresponding to the playback time point is obtained, adding the user identifier into the playlist file to obtain a playlist file with a user identifier;
the sending the playlist file to the user comprises: and sending the playlist file with the user identification to the user.
The streaming media playback method also has the following characteristics:
after sending the playlist file to the user, the method further comprises:
after receiving a request of a user for acquiring a fragment file of the playlist file, searching whether the fragment file is cached, if so, sending the cached fragment file to the user, otherwise, sending the request to a central server, receiving the fragment file from the central server and caching, and sending the fragment file to the user.
The streaming media playback method also has the following characteristics:
the streaming media is HTTP online streaming HLS, and the playlist file is an m3u8 playlist file.
The invention provides a streaming media playback device, comprising:
the receiving module is used for receiving a streaming media playback request of a user;
the analysis module is used for analyzing the time parameter stream media name in the stream media playback request;
the determining module is used for determining a playback time point according to the time parameter;
a playlist file obtaining module, configured to obtain a playlist file corresponding to the playback time point and the streaming media name;
and the play list file sending module is used for sending the play list file to the user.
The streaming media playback device also has the following characteristics:
the determining module comprises a judging unit, a constructing unit, a request sending unit, a receiving unit and a processing unit;
the judging unit is used for judging whether the type of the time parameter is a relative time type; the time parameter judging module is also used for judging whether the type of the time parameter is an absolute time type;
the construction unit is configured to, when the determination unit determines that the type of the time parameter is an absolute time type, use a difference between a current system time of the edge server and an absolute time in the time parameter as a temporary relative time, and construct a streaming media playback request in which the type of the time parameter is a relative time type and the relative time is the temporary relative time;
the request sending unit is used for sending the streaming media playback request to the user;
the receiving module is used for receiving a streaming media playback request with a time parameter of a relative time type from the user;
the processing unit is configured to, when the determining unit determines that the type of the time parameter is a relative time type, use a difference between the current system time of the edge server and a relative time in the time parameter as the playback time point, and further use, when the determining unit determines that the type of the time parameter is an absolute time type, use a difference between the current system time of the edge server and a relative time in the time parameter of the streaming media playback request as the playback time point.
The streaming media playback device also has the following characteristics:
the playlist file acquisition module comprises a search unit, a construction unit, a sending unit, a receiving unit and a cache unit;
the searching unit is used for searching whether a playlist file corresponding to the playback time point and the streaming media name is cached;
the construction unit is configured to construct a streaming media playback request with a playback time type as a type of a time parameter and a playback time as the playback time point when the playlist file corresponding to the playback time point is not found by the search unit;
the sending unit is used for sending the streaming media playback request constructed by the construction unit to a central server; the searching unit is further configured to send the cached playlist file to the user when the playlist file corresponding to the playback time point is cached in the searching unit;
the receiving unit is used for receiving a playlist file from the central server;
the cache unit is configured to cache the playlist file as a playlist file corresponding to the playback time point.
The streaming media playback device also has the following characteristics:
the device also comprises an identification acquisition module and a file updating module;
the identification acquisition module is used for acquiring the identification of the user;
the file updating module is used for adding the user identifier in the playlist file to obtain the playlist file with the user identifier;
and the play list file sending module is used for sending the play list file with the user identification to the user.
The streaming media playback device also has the following characteristics:
the device also comprises a fragment file acquisition module;
the fragment file query module comprises a fragment file query unit, a sending unit, a receiving unit and a cache unit;
the fragmented file query module is used for searching whether the fragmented files are cached or not;
the sending module is used for sending the cached fragment file to the user when the fragment file is found by the fragment file query module; the system is also used for sending the request to a central server when the fragmented file query module does not find the fragmented file;
the receiving unit is used for receiving the fragment files from the central server;
the cache unit is used for caching the fragment file;
and the sending unit is used for sending the fragment file to the user.
The streaming media playback device also has the following characteristics:
the streaming media is HLS, and the playlist file is an m3u8 playlist file.
The invention can reduce the processing pressure and the source returning pressure of the central server, improve the response time to the user request, reduce the source returning downloading bandwidth, accelerate the access speed and improve the user experience.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart of a streaming media playback method in an embodiment;
fig. 2 is a block diagram of an apparatus for streaming playback in the embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a flowchart of a streaming media playback method in an embodiment, which is applied to an edge server, and includes:
step 1, receiving a streaming media playback request of a user;
step 2, analyzing the time parameter and the streaming media name in the streaming media playback request;
step 3, determining a playback time point according to the time parameter;
step 4, obtaining a play list file corresponding to the playback time point and the streaming media name;
and 5, sending the playlist file to the user.
In the method, the Streaming media includes but is not limited to HTTP Live Streaming (HLS), and the playlist file includes but is not limited to m3u8 playlist file.
Compared with the scheme in the prior art, the method executes the decentralized operation, and the replay request processing which consumes processing resources is carried out on the edge server, so that the processing pressure of the central server is reduced.
Because the software functions supported by the client are different, when the user requests playback, the time parameter may be carried by relative time or absolute time. Relative time refers to a period of time back off from the current time, and absolute time refers to a certain point in time in the past. As the playback process proceeds, the client will in turn send a new m3u8 playlist file request to obtain subsequent ts slice information. The time information in this new m3u8 playlist file request is the same as the time information in the first m3u8 playlist request.
The step 3 of the method for determining the replay time point according to the time parameter specifically comprises the following steps:
and when the type of the time parameter is judged to be a relative time type, taking the difference between the current system time of the edge server and the relative time in the time parameter as a replay time point.
When the type of the time parameter is judged to be an absolute time type, the difference value between the current system time of the edge server and the absolute time in the time parameter is used as a temporary relative time, a streaming media playback request with the type of the time parameter being a relative time type and the relative time being the temporary relative time is constructed, the streaming media playback request is sent to a user, the streaming media playback request with the type of the time parameter being a relative time type is received from the user, and the difference value between the current system time of the edge server and the relative time in the time parameter of the streaming media playback request is used as a playback time point.
The following two cases are exemplified separately.
For the case that the type of the time parameter is a relative time type, the following example is given:
the request sent by the user is as follows:
http://domain/hls/streamName.m3u8relTime=1800
the streamName indicates the name of the streaming media file, the relTime indicates that the type of the time parameter is a relative time type, 1800 indicates relative time, and the unit of the relative time is second. This request indicates that the user wants to start watching from a position where the current live stream play position is backed by 1800 seconds.
When the edge server receives the request and determines that the type of the time parameter is a relative time type, the difference between the current system time of the edge server and the relative time in the time parameter is used as a replay time point, for example, the current system time currtime of the edge server is 1518143400(2018/2/910:30:00), and the replay time point playbackTime is calculated according to the following formula:
playbackTime=curTime–relTime=1518143400–1800=1518141600(2018/2/9 10:0:0)
when the user sends a new m3u8 playlist file request for multiple times, the edge server can calculate the replay time point of the user according to the method.
Secondly, for the case that the type of the time parameter is an absolute time type, the following is exemplified:
the request sent by the user is as follows:
http://domain/hls/streamName.m3u8absTime=1518141600
the request indicates that the user wants to replay the streamName file starting from the location of 1518141600 s.
When the edge server receives the request and determines that the type of the time parameter is an absolute time type, a difference value between the current system time and the absolute time of the edge server is used as a temporary relative time, a streaming media playback request with the type of the time parameter being a relative time type and the relative time being the temporary relative time is constructed, the streaming media playback request is sent to a user, the streaming media playback request with the type of the time parameter being a relative time type is received from the user, and a difference value between the current system time of the edge server and the relative time in the time parameter of the streaming media playback request is used as the playback time point, specifically:
the current system time currTime of the edge server is 1518143400(2018/2/910:30:00), and the difference between the current system time of the edge server and the absolute time is taken as a temporary relative time relTime';
relTime’=1518143400–1518141600=1800
the streaming media playback request with the type of the construction time parameter as a relative time type and the relative time as a temporary relative time is as follows:
http://domain/hls/streamName.m3u8relTime=1800
the request is sent to the user, the specific method is that the request is sent to the user after being written into an EXT-X-STREAM-INF label of an m3u8 playlist file, after the user receives the response, the user subsequently uses a new request address to initiate the request according to the hls specification, namely the request is initiated by using a URL in the label EXT-X-STREAM-INF, namely the request is initiated by using a relative time mode, and the edge server subsequently uses a replay time point calculated by using a relative time mode.
The step 4 of obtaining the playlist file corresponding to the playback time point includes: searching whether a playlist file corresponding to the playback time point and the streaming media name, such as 1518141600-streamname.m3u8, is cached, if so, sending the cached playlist file to the user, and if not, constructing a streaming media playback request with the type of the time parameter being the playback time type and the playback time being the playback time point, such as:
http://domain/hls/streamName.m3u8playbackTime=1518141600
and sending the streaming media playback request to a central server, receiving a play list file from the central server, and caching the play list file into a play list file corresponding to the playback time point.
The central server acquires the playback time point playbackTime according to the request, generates a first m3u8 playlist file according to the playback time point playbackTime, and returns the playlist file to the edge server, so that the central server does not need to calculate time, and the calculation resources of the central server can be saved.
The edge server caches the m3u8 playlist file according to time, for example, caches the m3u8 playlist file according to second, when the playback time range is the latest hour, the m3u8 playlist file request from one edge server to the central server is 3600 times at most, when the number of user requests is large, the source return is greatly reduced, and meanwhile, the user response time is shortened.
Since the m3u8 playlist file generally carries user-related parameters (user id, verification parameters, etc.), when generating the m3u8 playlist, it is necessary to bring the user parameters behind the ts address, i.e. the m3u8 playlist files of the same playbackTime will be different due to the difference of user parameters. For this situation, the edge server first saves the request parameters of the user, calculates the playbackTime, obtains the m3u8 playlist file corresponding to the playbackTime from the cache or the central server, then modifies the content of the obtained m3u8 playlist file, specifically, adds the user parameters to the m3u8 playlist file, generates a differentiated m3u8 playlist file, and returns the differentiated m3u8 playlist file to the user. Since the viewing requirements of each user are different, the requested m3u8 playlist files are also different, the edge server receives and caches the first m3u8 playlist file, and generates a second m3u8 playlist file according to different user parameters and returns the second m3u8 playlist file to the user, so that the m3u8 playlist file is cached at the edge.
At the same time of or before receiving the streaming media playback request of the user in the step 1, the method further comprises the following steps; acquiring an identifier of a user; after the playlist file corresponding to the playback time point is obtained in step 4, the method further includes adding a user identifier to the playlist file to obtain a playlist file with the user identifier; step 5, sending the playlist file to the user specifically includes: sending the playlist file to the user includes: and sending the playlist file with the user identification to the user.
For example:
the edge server receives the request from user 1:
http://domain/hls/streamName.m3u8relTime=1800&userId=1&args…
the edge server determines that the user's id is 1, determines that the playback time point of the request is 1518141600, and obtains a first m3u8 playlist file from the central server or other edge server according to the playback time point as follows:
1518141600-streamName.m3u8
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:140651513
#EXT-X-TARGETDURATION:10
#EXTINF:8,
1.ts
#EXTINF:9,
2.tsuserId=1&args…
#EXTINF:11,
3.tsuserId=1&args…
the edge server generates a second m3u8 playlist file after adding the user identification to the first m3u8 playlist file:
1518141600-streamName.user1.m3u8
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:140651513
#EXT-X-TARGETDURATION:10
#EXTINF:8,
1.tsuserId=1&args…
#EXTINF:9,
2.tsuserId=1&args…
#EXTINF:11,
3.tsuserId=1&args…
for another example:
the edge server receives the request from user 2:
http://domain/hls/streamName.m3u8relTime=1800&userId=1&args…
the edge server determines the id of the user to be 2, determines the playback time point of the request to be 1518141600, and obtains the first m3u8 playlist file from the central server or other edge server (e.g., the edge server located at the parent node) according to the playback time point:
1518141600-streamName.m3u8
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:140651513
#EXT-X-TARGETDURATION:10
#EXTINF:8,
1.ts
#EXTINF:9,
2.ts
the edge server generates a second m3u8 playlist file after adding the user identification to the first m3u8 playlist file:
1518141600-streamName.user2.m3u8
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:140651513
#EXT-X-TARGETDURATION:10
#EXTINF:8,
1.tsuserId=2&args…
#EXTINF:9,
2.tsuserId=2&args…
#EXTINF:11,
3.tsuserId=2&args…
after the playlist file is sent to the user in step 5, the method further includes step 6:
after receiving a request of a user for acquiring a fragment file of the playlist file, searching whether the fragment file is cached, if so, sending the cached fragment file to the user, otherwise, sending the request to a central server, receiving the fragment file from the central server and caching, and sending the fragment file to the user.
In step 6, which is specific to the above example, the user acquires the second m3u8 playlist file and requests the ts file in sequence. Such as user request 1.ts, construct request:http://domain/hls/1.tsuserId=1&args…, sending to the edge server, the edge server processes the logic related to the service according to the user's parameters (such as checking whether the request is legal), then the edge server searches the 1.ts file from the cache, if it is hit, it directly reads and returns to the user, otherwise, it sends the request to the center server, the center server reads 1.ts and returns to the edgeAnd the edge server writes the 1.ts file into the cache and sends the file to the user. Then the user requests 2.ts, 3.ts, and at the same time, the user also updates the m3u8 playlist file to obtain the subsequent ts fragmentation information, so as to request a new ts file.
The edge server caches the ts file, so that the bandwidth of source return downloading is reduced, the access speed is increased, the user can watch the ts file more smoothly, and the use experience of the user is improved.
Fig. 2 is a block diagram of a streaming media playback apparatus, which includes:
the receiving module is used for receiving a streaming media playback request of a user;
the analysis module is used for analyzing the time parameter streaming media name in the streaming media playback request;
the determining module is used for determining a playback time point according to the time parameter;
the playing list file acquisition module is used for acquiring a playing list file corresponding to the playback time point and the streaming media name;
and the playlist file sending module is used for sending the playlist file to the user.
Wherein the content of the first and second substances,
the determining module comprises a judging unit, a constructing unit, a request sending unit, a receiving unit and a processing unit;
the judging unit is used for judging whether the type of the time parameter is a relative time type; the time parameter judging module is also used for judging whether the type of the time parameter is an absolute time type;
the construction unit is used for taking the difference value between the current system time of the edge server and the absolute time in the time parameter as a temporary relative time when the judgment unit judges that the type of the time parameter is the absolute time type, and constructing the streaming media playback request of which the type of the time parameter is the relative time type and the relative time is the temporary relative time;
the request sending unit is used for sending the streaming media playback request to a user;
the receiving module is used for receiving a streaming media playback request with the time parameter type being a relative time type from a user;
and the processing unit is used for taking the difference between the current system time of the edge server and the relative time in the time parameter as a playback time point when the judging unit judges that the type of the time parameter is a relative time type, and is also used for taking the difference between the current system time of the edge server and the relative time in the time parameter of the streaming media playback request as a playback time point when the judging unit judges that the type of the time parameter is an absolute time type.
The playlist file acquisition module comprises a search unit, a construction unit, a sending unit, a receiving unit and a cache unit;
the searching unit is used for searching whether a playlist file corresponding to the playback time point and the streaming media name is cached or not;
the construction unit is used for constructing a streaming media playback request with the playback time parameter type as the playback time type and the playback time as the playback time point when the search unit does not search the playlist file corresponding to the playback time point;
the transmitting unit is used for transmitting the streaming media playback request constructed by the construction unit to the central server; the searching unit is also used for sending the cached playlist file to a user when the playlist file corresponding to the playback time point is cached in the searching unit;
a receiving unit for receiving a playlist file from a central server;
and the cache unit is used for caching the playlist file into the playlist file corresponding to the playback time point.
The device also comprises an identification acquisition module and a file updating module;
the identification acquisition module is used for acquiring the identification of the user;
the file updating module is used for adding the user identifier in the playlist file to obtain the playlist file with the user identifier;
and the playlist file sending module is used for sending the playlist file with the user identification to the user.
The device also comprises a fragment file acquisition module;
the fragment file query module comprises a fragment file query unit, a sending unit, a receiving unit and a cache unit;
the fragment file query module is used for searching whether a fragment file is cached;
the sending module is used for sending the cached fragment file to a user when the fragment file is found by the fragment file query module; the system is also used for sending a request to the central server when the fragmented file query module does not find the fragmented file;
the receiving unit is used for receiving the fragment files from the central server;
the cache unit is used for caching the fragment files;
and the sending unit is used for sending the fragment file to the user.
The streaming media is HLS and the playlist file is an m3u8 playlist file.
The above-described aspects may be implemented individually or in various combinations, and such variations are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits, and accordingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
It is to be noted that, in this document, the terms "comprises", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that an article or apparatus including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of additional like elements in the article or device comprising the element.
The above embodiments are merely to illustrate the technical solutions of the present invention and not to limit the present invention, and the present invention has been described in detail with reference to the preferred embodiments. It will be understood by those skilled in the art that various modifications and equivalent arrangements may be made without departing from the spirit and scope of the present invention and it should be understood that the present invention is to be covered by the appended claims.

Claims (8)

1. A streaming media playback method is applied to an edge server, and comprises the following steps:
receiving a streaming media playback request of a user;
analyzing the time parameter and the streaming media name in the streaming media playback request;
determining a playback time point according to the time parameter;
acquiring a playlist file corresponding to the playback time point and the streaming media name, wherein the playlist file is an m3u8 playlist file;
sending the playlist file to the user;
the obtaining of the playlist file corresponding to the playback time point includes:
searching whether a play list file corresponding to the playback time point and the streaming media name is cached or not, if so, sending the cached play list file to the user, otherwise, constructing a streaming media playback request with the time parameter type being the playback time type and the playback time being the playback time point, sending the streaming media playback request to a central server, receiving the play list file from the central server, and caching the play list file into the play list file corresponding to the playback time point;
the method comprises the steps that the edge server receives a streaming media playback request of a user at the same time or before and after, and the method also comprises the steps of acquiring an identifier of the user;
after the playlist file corresponding to the playback time point is obtained, adding the user identifier into the playlist file to obtain a playlist file with a user identifier;
the sending the playlist file to the user comprises: and sending the playlist file with the user identification to the user.
2. The streaming media playback method of claim 1,
the determining the replay time point according to the time parameter includes:
when the type of the time parameter is judged to be a relative time type, taking the difference between the current system time of the edge server and the relative time in the time parameter as the replay time point;
and when the type of the time parameter is judged to be an absolute time type, taking the difference value between the current system time of the edge server and the absolute time in the time parameter as a temporary relative time, constructing a streaming media playback request with the type of the time parameter as a relative time type and the relative time as the temporary relative time, sending the streaming media playback request to the user, receiving the streaming media playback request with the type of the time parameter as a relative time type from the user, and taking the difference value between the current system time of the edge server and the relative time in the time parameter of the streaming media playback request as the playback time point.
3. The streaming media playback method of claim 1,
after sending the playlist file to the user, the method further comprises:
after receiving a request of a user for acquiring a fragment file of the playlist file, searching whether the fragment file is cached, if so, sending the cached fragment file to the user, otherwise, sending the request to a central server, receiving the fragment file from the central server and caching, and sending the fragment file to the user.
4. The streaming media playback method of claim 1,
the streaming media is HTTP online streaming HLS.
5. A streaming media playback device, specifically an edge server, comprising:
the receiving module is used for receiving a streaming media playback request of a user;
the analysis module is used for analyzing the time parameter stream media name in the stream media playback request;
the determining module is used for determining a playback time point according to the time parameter;
a playlist file obtaining module, configured to obtain a playlist file corresponding to the playback time point and the streaming media name, where the playlist file is an m3u8 playlist file;
a playlist file sending module for sending the playlist file to the user;
the playlist file acquisition module comprises a search unit, a construction unit, a sending unit, a receiving unit and a cache unit;
the searching unit is used for searching whether a playlist file corresponding to the playback time point and the streaming media name is cached;
the construction unit is configured to construct a streaming media playback request with a playback time type as a type of a time parameter and a playback time as the playback time point when the playlist file corresponding to the playback time point is not found by the search unit;
the sending unit is used for sending the streaming media playback request constructed by the construction unit to a central server; the searching unit is further configured to send the cached playlist file to the user when the playlist file corresponding to the playback time point is cached in the searching unit;
the receiving unit is used for receiving a playlist file from the central server;
the cache unit is used for caching the playlist file into a playlist file corresponding to the playback time point;
the device also comprises an identification acquisition module and a file updating module;
the identification acquisition module is used for acquiring the identification of the user;
the file updating module is used for adding the user identifier in the playlist file to obtain the playlist file with the user identifier;
and the play list file sending module is used for sending the play list file with the user identification to the user.
6. The streaming media playback device of claim 5,
the determining module comprises a judging unit, a constructing unit, a request sending unit, a receiving unit and a processing unit;
the judging unit is used for judging whether the type of the time parameter is a relative time type; the time parameter judging module is also used for judging whether the type of the time parameter is an absolute time type;
the construction unit is configured to, when the determination unit determines that the type of the time parameter is an absolute time type, use a difference between a current system time of the edge server and an absolute time in the time parameter as a temporary relative time, and construct a streaming media playback request in which the type of the time parameter is a relative time type and the relative time is the temporary relative time;
the request sending unit is used for sending the streaming media playback request to the user;
the receiving module is used for receiving a streaming media playback request with a time parameter of a relative time type from the user;
the processing unit is configured to, when the determining unit determines that the type of the time parameter is a relative time type, use a difference between the current system time of the edge server and a relative time in the time parameter as the playback time point, and further use, when the determining unit determines that the type of the time parameter is an absolute time type, use a difference between the current system time of the edge server and a relative time in the time parameter of the streaming media playback request as the playback time point.
7. The streaming media playback device of claim 5,
the device also comprises a fragment file acquisition module;
the fragment file query module comprises a fragment file query unit, a sending unit, a receiving unit and a cache unit;
the fragmented file query module is used for searching whether the fragmented files are cached or not;
the sending module is used for sending the cached fragment file to the user when the fragment file is found by the fragment file query module; the system is also used for sending the request to a central server when the fragmented file query module does not find the fragmented file;
the receiving unit is used for receiving the fragment files from the central server;
the cache unit is used for caching the fragment file;
and the sending unit is used for sending the fragment file to the user.
8. The streaming media playback device of claim 5,
the streaming media is HLS.
CN201810239723.5A 2018-03-22 2018-03-22 Streaming media playback method and device Active CN110300308B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810239723.5A CN110300308B (en) 2018-03-22 2018-03-22 Streaming media playback method and device
CN202010018588.9A CN111193942B (en) 2018-03-22 2018-03-22 Streaming media playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810239723.5A CN110300308B (en) 2018-03-22 2018-03-22 Streaming media playback method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202010018588.9A Division CN111193942B (en) 2018-03-22 2018-03-22 Streaming media playback method and device

Publications (2)

Publication Number Publication Date
CN110300308A CN110300308A (en) 2019-10-01
CN110300308B true CN110300308B (en) 2021-10-08

Family

ID=68025599

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010018588.9A Active CN111193942B (en) 2018-03-22 2018-03-22 Streaming media playback method and device
CN201810239723.5A Active CN110300308B (en) 2018-03-22 2018-03-22 Streaming media playback method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010018588.9A Active CN111193942B (en) 2018-03-22 2018-03-22 Streaming media playback method and device

Country Status (1)

Country Link
CN (2) CN111193942B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881151B (en) * 2020-09-28 2021-07-13 湖北安泰泽善科技有限公司 Traffic violation data management method and device and server
CN116112474A (en) * 2021-11-11 2023-05-12 华为云计算技术有限公司 Streaming media scheduling method and device and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420603A (en) * 2008-09-05 2009-04-29 中兴通讯股份有限公司 Method for implementing media distribution, positioning by segmented memory and stream media system thereof
CN101588473A (en) * 2009-06-18 2009-11-25 北京浪弯融科科技有限责任公司 Multimedia time shifting broadcasting method and system
CN101938483A (en) * 2010-09-03 2011-01-05 中兴通讯股份有限公司 Method and system for distributing live broadcast contents
CN102118438A (en) * 2011-01-17 2011-07-06 中兴通讯股份有限公司 Method and device for live broadcasting apple media stream in Internet protocol television (IPTV) system
CN102572555A (en) * 2012-01-16 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for realizing live video playback at HTTP live streaming (HLS) client
CN102883187A (en) * 2012-09-17 2013-01-16 华为技术有限公司 Time-shift program service method, equipment and system
CN103618912A (en) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 Live telecast time shifting method and server
CN104202616A (en) * 2014-09-11 2014-12-10 北京阅联信息技术有限公司 Live telecasting and reviewing method and system based on naked streams
CN105898352A (en) * 2015-11-13 2016-08-24 乐视云计算有限公司 m3u8-based streaming media file direct broadcast method and system
US9883221B1 (en) * 2015-03-25 2018-01-30 Concurrent Computer Corporation System and method for optimizing real-time video-on-demand recording in a content delivery network

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350031B (en) * 2008-08-21 2014-04-30 深圳市同洲电子股份有限公司 Method for storing data and system therefor
US8473628B2 (en) * 2008-08-29 2013-06-25 Adobe Systems Incorporated Dynamically altering playlists
CN101378494B (en) * 2008-10-07 2011-04-20 中兴通讯股份有限公司 System and method for implementing internet television medium interaction
US9038116B1 (en) * 2009-12-28 2015-05-19 Akamai Technologies, Inc. Method and system for recording streams
US20120116883A1 (en) * 2010-11-08 2012-05-10 Sony Corporation Methods and systems for use in incorporating targeted advertising into multimedia content streams
CN104469433B (en) * 2013-09-13 2018-09-07 深圳市腾讯计算机系统有限公司 Method and device is reviewed in a kind of net cast
CN104168516A (en) * 2014-09-01 2014-11-26 上海下一代广播电视网应用实验室有限公司 System and method for achieving program replay on stream media live broadcast platform
US20170272498A1 (en) * 2016-03-21 2017-09-21 Le Holdings (Beijing) Co., Ltd. Streaming media file distribution method and system
CN107404379A (en) * 2016-05-18 2017-11-28 中兴通讯股份有限公司 A kind of processing method and processing device of files in stream media
CN107666613A (en) * 2016-07-27 2018-02-06 中国电信股份有限公司 Method for synchronizing time, server and the system recorded for multiple spot
CN106789976A (en) * 2016-12-07 2017-05-31 中兴通讯股份有限公司 The player method of media file, service end, client and system
CN107707937A (en) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 Time shift optimization method and system based on HLS protocol

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420603A (en) * 2008-09-05 2009-04-29 中兴通讯股份有限公司 Method for implementing media distribution, positioning by segmented memory and stream media system thereof
WO2010025614A1 (en) * 2008-09-05 2010-03-11 中兴通讯股份有限公司 Method and stream media system thereof for media distribution and position by partitioned storage
CN101588473A (en) * 2009-06-18 2009-11-25 北京浪弯融科科技有限责任公司 Multimedia time shifting broadcasting method and system
CN101938483A (en) * 2010-09-03 2011-01-05 中兴通讯股份有限公司 Method and system for distributing live broadcast contents
CN102118438A (en) * 2011-01-17 2011-07-06 中兴通讯股份有限公司 Method and device for live broadcasting apple media stream in Internet protocol television (IPTV) system
CN102572555A (en) * 2012-01-16 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for realizing live video playback at HTTP live streaming (HLS) client
CN102883187A (en) * 2012-09-17 2013-01-16 华为技术有限公司 Time-shift program service method, equipment and system
CN103618912A (en) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 Live telecast time shifting method and server
CN104202616A (en) * 2014-09-11 2014-12-10 北京阅联信息技术有限公司 Live telecasting and reviewing method and system based on naked streams
US9883221B1 (en) * 2015-03-25 2018-01-30 Concurrent Computer Corporation System and method for optimizing real-time video-on-demand recording in a content delivery network
CN105898352A (en) * 2015-11-13 2016-08-24 乐视云计算有限公司 m3u8-based streaming media file direct broadcast method and system

Also Published As

Publication number Publication date
CN111193942B (en) 2022-08-02
CN111193942A (en) 2020-05-22
CN110300308A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
US10735800B2 (en) Rendering content and time-shifted playback operations for personal over-the-top network video recorder
US11350139B2 (en) Video live broadcast method and apparatus
US8838725B2 (en) Internet cache subscription for wireless mobile users
US9906595B2 (en) Content source discovery
CN110933517B (en) Code rate switching method, client and computer readable storage medium
WO2013044569A1 (en) Network user identification method and application server thereof
US20170187837A1 (en) Ad download method, the client and the server
CN107566477B (en) Method and device for acquiring files in distributed file system cluster
CN110300339B (en) Live multimedia playback method, device and system
CN103945259A (en) Online video playing method and device
CN110300308B (en) Streaming media playback method and device
RU2738447C1 (en) Video caching method and video caching device
CN107302727B (en) Method, device and system for downloading live video fragments
US10284894B2 (en) Methods and apparatus for naming video content chunks
CN108449308A (en) Identify the method and device that malice resource accesses
WO2015081797A1 (en) Method and system for simultaneous playback of desktop background and live broadcast interface
CN110708402A (en) Accessible resource display method and device and resource access system
CN108366097B (en) Resource access control method and system
WO2017113726A1 (en) Advertisement downloading method, client and server
WO2017096886A1 (en) Content pushing method, apparatus and system
WO2017152557A1 (en) Service object placing method and device, and server
CN106686156B (en) Internet audio and video domain name resolution method and device
CN105847867A (en) Multimedia live content piloting method and device
JP2007527067A (en) Hierarchical distribution of UI assets
CN108564971B (en) Audio playing method and device

Legal Events

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