CN117714719A - Live file cache time synchronization method, system, computing device and storage medium - Google Patents

Live file cache time synchronization method, system, computing device and storage medium Download PDF

Info

Publication number
CN117714719A
CN117714719A CN202311741682.7A CN202311741682A CN117714719A CN 117714719 A CN117714719 A CN 117714719A CN 202311741682 A CN202311741682 A CN 202311741682A CN 117714719 A CN117714719 A CN 117714719A
Authority
CN
China
Prior art keywords
file
live
time
node
expiration
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.)
Pending
Application number
CN202311741682.7A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202311741682.7A priority Critical patent/CN117714719A/en
Publication of CN117714719A publication Critical patent/CN117714719A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a live file caching time synchronization method, a live file caching time synchronization system, a computing device and a storage medium. The method comprises the following steps: the source station server receives the live file request, generates an expiration time stamp for the live file, and transmits the live file and the expiration time stamp to an aggregation node in the CDN; the sink node sends the live broadcast file and the expiration time stamp to the next stage sink node and/or at least one edge node; the at least one level of sink node and the at least one edge node are used for caching live broadcast files and setting the caching time of the cached live broadcast files according to the expiration time stamp; when the caching time of the cached live files reaches, the source station server, the at least one level of sink node and the at least one edge node carry out caching expiration marking on the live files, and all levels of nodes in the CDN set the caching time according to the expiration time stamp through source return transmission expiration time stamp, so that the caching data of all nodes are guaranteed to expire simultaneously according to the expiration time stamp.

Description

Live file cache time synchronization method, system, computing device and storage medium
Technical Field
The application relates to the technical field of computers, in particular to a live file cache time synchronization method, a live file cache time synchronization system, a computing device and a storage medium.
Background
Different real-time transport protocols may be used in a live CDN, such as rtmp, flv based on long connections, or HLS based on short links.
The HLS live broadcast protocol based on short links generally packages file data in a file form, nodes in a CDN network can aggregate convergence requests layer by layer in a tree structure manner, finally obtain live broadcast files by requesting HLS source stations, in order to reduce unnecessary source return, reduce query rate per second (qps) and bandwidth pressure of source station servers, generally, nodes in the CDN network can cache the received live broadcast files, and cache expiration time is mainly calculated by adding a fixed time to the time of receiving the data.
Disclosure of Invention
The purpose of the application is to provide a live file caching time synchronization method, a live file caching time synchronization system, a live file caching time synchronization computing device and a live file caching time synchronization storage medium, so that the problems that in the prior art, caching time is continuously amplified, live broadcasting is low in instantaneity, user watching live broadcasting experience is poor and the like are solved.
According to an aspect of the embodiments of the present application, there is provided a live file buffering time synchronization method, applied to a transmission link, where the transmission link includes: the source station server, the at least one level of sink node and the at least one edge node, the method comprises the following steps:
the source station server receives the live file request, generates an expiration time stamp for the live file, and transmits the live file and the expiration time stamp to an aggregation node in the CDN;
the sink node sends the live broadcast file and the expiration time stamp to the next stage sink node and/or at least one edge node; the at least one level of sink node and the at least one edge node are used for caching live broadcast files, and the caching time of the cached live broadcast files is set according to the expiration time stamp;
when the caching time of the cached live broadcast file arrives, the source station server, the at least one level aggregation node and the at least one edge node carry out caching expiration marking on the live broadcast file so as to realize expiration of the live broadcast file at the same time.
Further, generating the expiration time stamp for the live file further comprises:
and determining the expiration time stamp of the live file according to the live file production time and the live file playing time.
Further, the transmitting the live file and the expiration time stamp to the sink node in the CDN network further includes:
generating a response message carrying the live broadcast file, wherein a field value corresponding to a preset field of a response header of the response message is an expiration time stamp, and transmitting the response message to an aggregation node in the CDN.
Further, the method further comprises: the source station server updates the file name of the live file which is finished in production into a live file list of the index file, so that the user side sends a live file request to at least one edge node according to the file name in the index file to acquire the corresponding live file.
Further, the method further comprises: the method comprises the steps that at least one edge node receives an index file request sent by a user side, the index file request is forwarded to a source station server through at least one level of sink nodes, and the source station server responds to the index file request and forwards an index file to the user side through at least one level of sink nodes and at least one edge node;
At least one edge node receives a live broadcast file request sent by a user side according to a file name contained in an index file, and the at least one edge node forwards the live broadcast file request to a source station server through at least one level of sink nodes when the live broadcast file does not exist or the live broadcast file is out of date.
Further, the method further comprises: after receiving the live file request, the source station server establishes short links with the sink nodes in the CDN;
delivering the live file and the expiration time stamp to the sink node in the CDN further comprises:
the live file and the expiration time stamp are transmitted to an aggregation node in the CDN through short links;
the method further comprises the steps of: the source station server breaks the short link after transmitting the live file and the expiration time stamp to the sink node in the CDN network.
Further, the method further comprises: the source station server starts a time calibration service, network time is acquired by the time calibration service, and time information of the source station server is calibrated according to the network time; and/or
The at least one stage of sink node starts a time calibration service, network time is obtained by using the time calibration service, and time information of the at least one stage of sink node is calibrated according to the network time; and/or
At least one edge node starts a time calibration service, network time is acquired by using the time calibration service, and time information of the at least one edge node is calibrated according to the network time.
According to another aspect of the embodiments of the present application, there is provided a live file buffering time synchronization system, including: the system comprises a source station server, at least one level of sink node and at least one edge node;
the source station server is suitable for receiving the live file request, generating an expiration time stamp for the live file, and transmitting the live file and the expiration time stamp to an aggregation node in the CDN;
the sink node is suitable for sending the live broadcast file and the expiration time stamp to the next-stage sink node and/or at least one edge node; the at least one level of sink node and the at least one edge node are used for caching live broadcast files, and the caching time of the cached live broadcast files is set according to the expiration time stamp;
the source station server, the at least one level of sink nodes and the at least one edge node are suitable for caching expiration marks on the live broadcast files when the caching time of the cached live broadcast files arrives, so that the live broadcast files are expired at the same time.
According to yet another aspect of embodiments of the present application, there is provided a computing device comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the live file cache time synchronization method.
According to still another aspect of the embodiments of the present application, there is provided a computer storage medium, where at least one executable instruction is stored in the storage medium, where the executable instruction causes a processor to perform operations corresponding to the live file buffering time synchronization method described above.
According to the scheme provided by the embodiment of the application, the source station server generates the expiration time stamp of the live file and transmits the expiration time stamp to each level of nodes in the CDN network in a source-back transparent transmission mode, each level of nodes in the CDN network sets the caching time of the cached live file according to the expiration time stamp, so that the cache data of all nodes in the transmission link can be guaranteed to be expired at the same time by means of the expiration time stamp, live broadcasting instantaneity is further guaranteed, and the experience of a user for watching live broadcasting is improved.
The foregoing description is only an overview of the technical solutions of the present application, and may be implemented according to the content of the specification in order to make the technical means of the present application more clearly understood, and in order to make the above-mentioned and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a schematic diagram of a tree structure of a CDN;
FIG. 2 is a schematic diagram of CDN source retrieval in the prior art;
FIG. 3 is a schematic diagram of buffer enlargement when a sink node or an edge node in a CDN network buffers live files according to the prior art;
FIG. 4 illustrates a flowchart of a live file cache time synchronization method according to one embodiment of the present application;
fig. 5A illustrates a flowchart of a live file buffering time synchronization method according to another embodiment of the present application;
FIG. 5B is a schematic diagram of cache synchronization when an aggregation node or an edge node in a CDN network caches live files;
FIG. 6 illustrates a schematic diagram of a live file cache time synchronization system according to one embodiment of the present application;
FIG. 7 illustrates a structural schematic diagram of a computing device according to one embodiment in the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First, terms related to one or more embodiments of the present application will be explained.
The CDN, which is generally called Content Delivery Network, i.e., a content delivery network, is a technology that, by deploying nodes at the edge of the network, caches static resources of a website onto edge nodes closer to a user, thereby improving the access speed of the user, reducing bandwidth consumption, and increasing concurrency capacity.
Live broadcast: live broadcast refers to real-time transmission of audio and video signals through networks such as the Internet in a certain time for users to watch online.
Short links: short links generally refer to a request that does not remain connected for a long period of time after completion, but rather is closed in time, unlike long links that remain connected. Short-chain switching is often used in scenarios where small amounts of data are transmitted in a short time, such as HTTP request responses, instant messaging, etc. Because the long-term connection state does not need to be maintained, the short link is lighter than the long link, and the pressure of the server can be relieved.
HLS protocol: the streaming media transmission protocol based on the fmp4 and the HTTP is used for transmitting the live broadcast content through the HTTP by dividing the live broadcast content into small files, and a user can watch the live broadcast content in progress and can jump to any live broadcast position for review.
Pushing flow: and acquiring audio and video data of the user terminal, encoding and packaging by using a transmission protocol, and transmitting to a server. The server here is a source server in the CDN architecture.
The source station server: and producing the live stream as a service device of the live file.
And (3) source returning: the content delivery network initiates a process back to the source server to pull the direct broadcast content.
Fig. 1 is a schematic tree structure of a CDN network. As shown in fig. 1, the CDN network includes: edge node, first-level sink node, second-level sink node. The first-level sink node is a node above the edge node, the second-level sink node is a node above the first-level sink node, the source station is a node above the second-level sink node, the edge node is responsible for receiving user requests sent by the user end, namely live file requests, the same user requests are converged through the first-level sink node and the second-level sink node, and finally the user requests reach the source station. It should be noted that fig. 1 is only a schematic illustration, and the sink node may be multiple layers.
Fig. 2 is a schematic diagram of CDN back source in the prior art. In the method, a single node is taken as an example for cache management, after a user requests to enter the node, the node queries a local disk, judges whether a live file requested by the user exists and is out of date, if the live file exists and is not out of date, the live file is directly returned, if the live file is out of date or the live file does not exist, the live file is directly returned, the source is requested to a source station, and after the live file returned by the source returning response is received, the cache expiration time of the live file is calculated according to the return time and the fixed time of the live file.
In the prior art, the buffering start time of an aggregation node or an edge node in a CDN network is the request completion time, that is, the time when a live file to be buffered is received, and each node calculates and sets the buffering time of the live file, usually, the buffering start time is added with a fixed time to serve as the buffering expiration time of the live file, and this buffering mode can cause the influence of layer-by-layer amplifying the buffering time after the next node takes and buffers the live file which is fast-expired.
Fig. 3 is a schematic diagram of buffer amplification when an aggregation node or an edge node in a CDN network buffers live files in the prior art. As shown in fig. 3, the buffering start time is the request completion time, the secondary sink node sends a live file source returning request to the source station, the source station responds to the live file source returning request and transmits the corresponding live file in a transparent manner, and as the secondary sink node may request the live file when the live file stored in the source station is out of date, the secondary sink node buffers the live file which is out of date quickly, however, after the secondary sink node acquires the live file, the secondary sink node determines the expiration time of the live file by adding a fixed buffering time to the buffering start time, which results in the live file buffer time increase in the secondary sink node, and the primary sink node and the edge node are identical, so that the layer-by-layer buffer time is amplified, and the real-time performance of live broadcast is not high, and the live watching experience of users is affected.
For example, for the same live file, the live file cache expiration time determined by the source station is 00:00:01, the live file cache expiration time determined by the secondary sink node is 00:00:03, the live file cache expiration time determined by the primary sink node is 00:00:06, the live file cache expiration time determined by the primary sink node is 00:00:09, the cache time is amplified layer by layer, and users may watch the live file which is out of date, so that the real-time performance of live broadcast is not high.
In order to solve the problems, the inventor of the application provides a live file caching time synchronization scheme through creative labor, and the scheme converges qps and bandwidth of a source return request and simultaneously expires upstream and downstream caching data, so that live broadcasting instantaneity is further guaranteed, and user experience is improved.
The following description is made in connection with specific embodiments:
fig. 4 shows a flowchart of a live file buffering time synchronization method according to an embodiment in the present application. The method is applied to a transmission link comprising: the source station server, at least one level of sink nodes and at least one edge node, as shown in fig. 4, the method comprises the steps of:
In step S401, the source station server receives the live file request, generates an expiration time stamp for the live file, and transparently transmits the live file and the expiration time stamp to the sink node in the CDN network.
In the HLS (HTTP Live Streaming, HTTP-based adaptive rate streaming protocol) live system, the anchor pushes to the source server, which produces the live stream to obtain a live file, where the live file exists in slice form.
The live file request is a source return request sent to the source station server by the sink node in the CDN when the live file is not cached locally or is out of date, and the source station server receives the live file request and generates an expiration time stamp for the live file, wherein the expiration time stamp defines the expiration time of the live file, namely when the live file is out of date. The expiration time stamp is a fixed absolute time. And the source station server transmits the produced live broadcast file and the expiration time stamp corresponding to the live broadcast file to an aggregation node in the CDN.
In step S402, the sink node sends the live file and the expiration time stamp to the next-stage sink node and/or at least one edge node.
Specifically, after receiving the live broadcast file and the expiration time stamp which are transmitted by the source station server, the sink node caches the live broadcast file to the local disk, sets the caching time of the cached live broadcast file according to the expiration time stamp, and when the caching time is exceeded, the live broadcast file cached locally by the sink node is expired. The sink node can send the live broadcast file and the expiration time stamp to the next sink node or to at least one edge node in the transmission link, and the at least one sink node and the at least one edge node are used for caching the live broadcast file and setting the caching time of the cached live broadcast file according to the expiration time stamp. The source station server and all levels of nodes in the CDN network are enabled to buffer and expire simultaneously for the same live file within a fixed absolute time through the transparent expiration time stamp, that is, all nodes in the transmission link are enabled to expire simultaneously for the same live file, and the problem that the buffer and expire time of all levels of nodes in the source station server and the CDN network are inconsistent for the same live file is avoided.
Step S403, when the caching time of the cached live file arrives, the source station server, the at least one level of sink node and the at least one edge node perform caching expiration marking on the live file so as to realize expiration of the live file at the same time.
Specifically, the source station server, at least one level of sink nodes and at least one edge node can periodically query whether the caching time of the cached live file arrives, compare the current time with the caching time, and exceed the caching time, namely consider that the caching time of the cached live file arrives, and when the caching time of the cached live file arrives, perform a caching expiration mark on the live file so as to realize expiration of the live file at the same time. The source station server, the at least one level of sink node and the at least one edge node can delete the locally cached outdated live files regularly, so that disk space is released.
Taking the CDN network in fig. 1 as an example, the source station server transmits the live file to a second-stage sink node in the CDN network with an expiration timestamp corresponding to the live file, the second-stage sink node caches the live file to its local disk, the second-stage sink node sets a cache time of the cached live file according to the expiration timestamp, the second-stage sink node transmits the live file and the expiration timestamp to the first-stage sink node, the first-stage sink node caches the live file to its local disk, the cache time of the cached live file is set according to the expiration timestamp, the first-stage sink node transmits the live file and the expiration timestamp to the edge node, and the edge node caches the live file to its local disk, and sets a cache time of the cached live file according to the expiration timestamp.
According to the scheme provided by the application, the source station server generates the expiration time stamp of the live broadcast file, and transmits the expiration time stamp to each level of nodes in the CDN network in a source transmission mode, each level of nodes in the CDN network sets the caching time of the cached live broadcast file according to the expiration time stamp, so that the caching data of all nodes in a transmission link can be guaranteed to be expired at the same time by means of the expiration time stamp, the live broadcast real-time performance is further guaranteed, and the experience of a user for watching live broadcast is improved.
Fig. 5A is a flowchart illustrating a live file buffering time synchronization method according to another embodiment of the present application. The method is applied to a transmission link comprising: the source station server, at least one level of sink nodes and at least one edge node, as shown in fig. 5A, the method comprises the steps of:
in step S501, the source station server receives the live file request, and establishes a short link with the sink node in the CDN network.
The live file request is a source return request sent to a source station server when an aggregation node in the CDN network does not cache live files locally or the live files are out of date, and the source station server receives the live file request and establishes short link with the aggregation node in the CDN network. The short link may be used to transfer small amounts of data in a short time. The short link is lighter weight than the long link, since it is not necessary to maintain a long-term connection state, and can relieve the stress of the source station server. Wherein the live file request is an http request.
Step S502, the source station server determines the expiration time stamp of the live file according to the live file production time and the live file playing time.
Specifically, the main broadcasting end pushes the live stream to the source station server, and the source station server slices the live stream to generate live files, so that the source station server can know the playing time length corresponding to each live file, wherein the playing time length reflects how long the live files can be played.
Thus, the expiration time stamp of the live file may be determined according to the live file production time and the live file playing time length, for example, expiration time stamp=live file production time+live file playing time length, wherein the live file production time is the time when live file production is completed, and the expiration time stamp defines the expiration time of the live file, i.e. when the live file expires, and the expiration time stamp is a fixed absolute time.
Optionally, after the live broadcast is a push of the main broadcasting end, the user end requests the live broadcast file to watch, so that the user end has hysteresis, and the hysteresis time is relatively fixed, so that when determining the expiration time stamp of the live broadcast file, the hysteresis time also needs to be considered, and the expiration time stamp of the live broadcast file is determined according to the production time of the live broadcast file, the play time of the live broadcast file and the hysteresis time.
Step S503, generating a response message carrying the live broadcast file, wherein a field value corresponding to a preset field of a response header of the response message is an expiration time stamp.
The source station server responds to the live file request to produce a response message carrying the live file, wherein a field is customized in a response header of the response message, the field value of the field is set as an expiration time stamp, and the expiration time stamp is transmitted in a transmission mode of the response message.
Step S504, the response message is transmitted to the sink node in the CDN through the short link.
Specifically, after generating a response message carrying the live file, the source station server transparently transmits the response message to the sink node in the CDN through the short link.
In step S505, the sink node sends the live file and the expiration time stamp to the next-level sink node and/or at least one edge node.
Specifically, after receiving a response message transmitted by a source station server, the sink node extracts a live broadcast file from the response message, analyzes a response header of the response message, extracts an expiration time stamp from a preset field of the response header, caches the live broadcast file to a local disk of the sink node, and sets the caching time of the cached live broadcast file according to the expiration time stamp. The sink node also sends the response message to the next-stage sink node and/or to at least one edge node in the transmission link, after the at least one-stage sink node and/or the at least one edge node receives the response message transmitted by the source station server, the sink node extracts the live broadcast file from the response message, analyzes a response header of the response message, extracts an expiration time stamp from a preset field of the response header, caches the live broadcast file to a local disk of the live broadcast file, and sets the caching time of the cached live broadcast file according to the expiration time stamp. The expiration time stamp is transmitted in a transparent transmission response message mode, so that all levels of nodes in the source station server and the CDN network buffer expiration time for the same live file within a fixed absolute time, and the problem that the expiration time of the source station server and all levels of nodes in the CDN network buffer expiration time for the same live file is inconsistent is avoided.
Step S506, the short link is disconnected.
After the response message is transmitted to the sink node in the CDN network, the short link between the source station server and the sink node in the CDN network is disconnected, and occupied resources can be released in time by timely disconnecting the short link, so that the pressure of the source station server is relieved.
In step S507, when the buffering time of the buffered live file arrives, the source station server, the at least one level aggregation node and the at least one edge node perform buffering expiration marking on the live file, so as to realize expiration of the live file at the same time.
Specifically, the source station server, at least one level of sink nodes and at least one edge node can periodically query whether the caching time of the cached live file arrives, compare the current time with the caching time, and exceed the caching time, namely consider that the caching time of the cached live file arrives, and when the caching time of the cached live file arrives, perform a caching expiration mark on the live file so as to realize expiration of the live file at the same time. The source station server, the at least one level of sink node and the at least one edge node can delete the locally cached outdated live files regularly, so that disk space is released.
Fig. 5B is a schematic diagram of cache synchronization when an sink node or an edge node in a CDN network caches live files, and as shown in fig. 5B, although the source server, the secondary sink node, the primary sink node, and the edge node have different cache start times for the same live file, the cache expiration time for the live file is the same. The nodes of each stage of CDN simultaneously buffer the outdated data of the live file in a fixed absolute time, so that the outdated data is not obtained when a new live file request exists, but the newly produced data is ensured, and the instantaneity of the live file is ensured. In addition, due to the fact that the expiration time stamps are transmitted to all levels of nodes in the CDN, the number of live file requests sent to the source station server by all levels of nodes is effectively controlled, qps pressure of the source station server is reduced, and bandwidth pressure of the source station server is reduced.
In an alternative embodiment of the present application, the method further comprises: the source station server updates the file name of the live file which is finished in production into a live file list of the index file, so that the user side sends a live file request to the edge node according to the file name in the index file to acquire the corresponding live file.
The source station server slices the live stream to generate a live file, and when the live file production is finished, the source station server updates the file name of the live file with the finished production into a live file list of the index file. With the continuous streaming of the anchor, the server can continuously produce new live files, so that the index files are continuously updated.
In an alternative embodiment of the present application, the method further comprises: the method comprises the steps that at least one edge node receives an index file request sent by a user side, the index file request is forwarded to a source station server through at least one level of sink nodes, and the source station server responds to the index file request and forwards an index file to the user side through at least one level of sink nodes and at least one edge node;
at least one edge node receives a live broadcast file request sent by a user side according to a file name contained in an index file, and the at least one edge node forwards the live broadcast file request to a source station server through at least one level of sink nodes when the live broadcast file does not exist or the live broadcast file is out of date.
In the application, the user side can send a live file request to the edge node according to the file name in the index file to acquire the corresponding live file. Specifically, the user side sends an index file request to the edge nodes, at least one edge node receives the index file request sent by the user side, the edge nodes send the index file request to the previous-stage sink nodes, the index file request is forwarded upwards level by level until the index file request is forwarded to the source station server, namely, the at least one edge node forwards the index file request to the source station server through the at least one-stage sink nodes, the source station server responds to the index file request and forwards the index file to the user side through the sink nodes and the edge nodes at all stages, namely, the source station server sends the index file to the sink nodes in the CDN network, and then downwards level by level until the index file is sent to the user side through the edge nodes; the method comprises the steps that a user side sends a live broadcast file request to an edge node according to a file name contained in an index file, at least one edge node receives the live broadcast file request sent by the user side according to the file name contained in the index file, after receiving the live broadcast file request, the at least one edge node judges whether the live broadcast file exists or not and whether the live broadcast file is out of date, and if the live broadcast file does not exist or the live broadcast file is out of date, the live broadcast file request is forwarded to a source station server through at least one level of sink nodes so as to obtain the corresponding live broadcast file.
The user side needs to continuously request the index file and request the live file according to the file name in the requested index file, and the user side requests the updated index file every time.
In an optional embodiment of the present application, in order to ensure that the live file cached by the source station server and each node in the CDN network can expire at the same time, the method further includes:
the source station server starts a time calibration service, network time is acquired by the time calibration service, and time information of the source station server is calibrated according to the network time; and/or
The at least one stage of sink node starts a time calibration service, network time is obtained by using the time calibration service, and time information of the at least one stage of sink node is calibrated according to the network time; and/or
At least one edge node starts a time calibration service, network time is acquired by using the time calibration service, and time information of the at least one edge node is calibrated according to the network time.
Specifically, each node in the source station server and the CDN network is internally provided with a time calibration service, each node in the source station server and the CDN network comprises at least one level of aggregation node and at least one edge node, the time calibration service is started, network time is obtained from the network by using the time calibration service, then time information of each node in the source station server and the CDN network is calibrated according to the network time, time consistency of each node in the source station server and the CDN network is guaranteed, and therefore cache expiration time consistency of live files is guaranteed.
According to the scheme provided by the application, the source station server generates the expiration time stamp of the live broadcast file, and transmits the expiration time stamp to each level of nodes in the CDN network in a back source transparent transmission mode, each level of nodes in the CDN network sets the cache time of the cached live broadcast file according to the expiration time stamp, so that the cache data of all nodes in a transmission link can be guaranteed to be expired at the same time by means of the expiration time stamp, the live broadcast real-time performance is further guaranteed, and the experience of a user for watching live broadcast is improved; due to the fact that the expiration time stamps are transmitted to all levels of nodes in the CDN, the number of live file requests sent to the source station server by all levels of nodes is effectively controlled, qps pressure of the source station server is reduced, and bandwidth pressure of the source station server is reduced.
Fig. 6 illustrates a schematic structure diagram of a live file cache time synchronization system according to one embodiment in the present application. As shown in fig. 6, the system includes: a source station server 601, at least one level of sink nodes 602, and at least one edge node 603;
the source station server 601 is adapted to receive the live file request, generate an expiration time stamp for the live file, and transmit the live file and the expiration time stamp to an aggregation node in the CDN network;
Sink node 602 adapted to send the live file and the expiration time stamp to the next level sink node and/or to the at least one edge node 603; the at least one level of sink node and the at least one edge node are used for caching live broadcast files, and the caching time of the cached live broadcast files is set according to the expiration time stamp;
the source station server 601, the at least one level aggregation node 602 and the at least one edge node 603 are adapted to perform a cache expiration flag on the live file when the cache time of the cached live file arrives, so as to realize that the live file expires at the same time.
Optionally, the source station server is further adapted to: and determining the expiration time stamp of the live file according to the live file production time and the live file playing time.
Optionally, the source station server is further adapted to: generating a response message carrying the live broadcast file, wherein a field value corresponding to a preset field of a response header of the response message is an expiration time stamp, and transmitting the response message to an aggregation node in the CDN.
Optionally, the source station server is further adapted to: and updating the file name of the live file after the production is finished into a live file list of the index file, so that the user side can send a live file request to at least one edge node according to the file name in the index file to acquire the corresponding live file.
Optionally, the at least one edge node is further adapted to: receiving an index file request sent by a user side, and forwarding the index file request to a source station server through at least one level of sink nodes; receiving a live broadcast file request sent by a user terminal according to a file name contained in an index file, and forwarding the live broadcast file request to a source station server through at least one level of sink nodes when the live broadcast file does not exist or the live broadcast file is out of date
The source station server is further adapted to: and forwarding the index file to the user terminal through at least one level of sink node and at least one edge node in response to the index file request.
Optionally, the source station server is further adapted to: after receiving the live file request, establishing short links between the live file request and sink nodes in the CDN;
the live file and the expiration time stamp are transmitted to an aggregation node in the CDN through short links;
after the live file and the expiration time stamp are transmitted to the sink node in the CDN network, the short link is disconnected.
Optionally, the source station server is further adapted to: starting a time calibration service, acquiring network time by using the time calibration service, and calibrating time information of a source station server according to the network time; and/or
The at least one level of sink nodes is further adapted to: starting a time calibration service, acquiring network time by using the time calibration service, and calibrating the time information of at least one stage of sink nodes according to the network time; and/or
The at least one edge node is further adapted to: starting a time calibration service, acquiring network time by using the time calibration service, and calibrating time information of at least one edge node according to the network time.
According to the scheme provided by the application, the source station server generates the expiration time stamp of the live broadcast file, and transmits the expiration time stamp to each level of nodes in the CDN network in a source transmission mode, each level of nodes in the CDN network sets the caching time of the cached live broadcast file according to the expiration time stamp, so that the caching data of all nodes in a transmission link can be guaranteed to be expired at the same time by means of the expiration time stamp, the live broadcast real-time performance is further guaranteed, and the experience of a user for watching live broadcast is improved.
The embodiment of the application also provides a nonvolatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the live file cache time synchronization method in any of the method embodiments.
FIG. 7 illustrates a schematic diagram of a computing device, according to one embodiment of the application, the particular embodiments of which are not limiting on the particular implementation of the computing device.
As shown in fig. 7, the computing device may include: a processor 702, a communication interface (Communications Interface), a memory 706, and a communication bus 708.
Wherein: processor 702, communication interface 704, and memory 706 perform communication with each other via a communication bus 708.
A communication interface 704 for communicating with network elements of other devices, such as clients or other servers.
The processor 702 is configured to execute the program 710, and may specifically perform relevant steps in the foregoing live file buffering time synchronization method embodiment.
In particular, program 710 may include program code including computer-operating instructions.
The processor 702 may be a Central Processing Unit (CPU), or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors included by the computing device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 706 for storing programs 710. The memory 706 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 710 may be specifically configured to cause the processor 702 to perform the live file cache time synchronization method in any of the method embodiments described above. The specific implementation of each step in the program 710 may refer to corresponding steps and corresponding descriptions in the units in the live file buffering time synchronization embodiment, which are not described herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and the above description of specific languages is provided for disclosure of preferred embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the present application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components according to embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). The present application may also be embodied as an apparatus or device program (e.g., computer program and computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (10)

1. The live file buffer time synchronization method is applied to a transmission link, and the transmission link comprises the following steps: a source station server, at least one level of sink nodes, and at least one edge node, the method comprising:
the source station server receives the live file request, generates an expiration time stamp for the live file, and transmits the live file and the expiration time stamp to the sink node in the CDN;
the sink node sends the live broadcast file and the expiration time stamp to a next-stage sink node and/or the at least one edge node; the at least one level of sink node and the at least one edge node are used for caching the live broadcast files and setting the caching time of the cached live broadcast files according to the expiration time stamp;
and when the caching time of the cached live broadcast file arrives, the source station server, the at least one level of sink node and the at least one edge node carry out caching expiration marking on the live broadcast file so as to realize expiration of the live broadcast file at the same time.
2. The method of claim 1, wherein the generating an expiration time stamp for a live file further comprises:
And determining the expiration time stamp of the live file according to the live file production time and the live file playing time.
3. The method of claim 1 or 2, wherein the delivering live files and the expiration time stamps transparently to the sink node in the CDN network further comprises:
generating a response message carrying the live file, wherein a field value corresponding to a preset field of a response header of the response message is the expiration time stamp, and transmitting the response message to the sink node in the CDN.
4. A method according to any one of claims 1-3, wherein the method further comprises: the source station server updates the file name of the live file which is finished in production into a live file list of the index file, so that the user side sends a live file request to the at least one edge node according to the file name in the index file to acquire the corresponding live file.
5. The method of claim 4, wherein the method further comprises:
the at least one edge node receives an index file request sent by a user side, forwards the index file request to a source station server through the at least one level aggregation node, and forwards the index file to the user side through the at least one level aggregation node and the at least one edge node in response to the index file request by the source station server;
And the at least one edge node receives a live broadcast file request sent by the user side according to the file name contained in the index file, and forwards the live broadcast file request to a source station server through the at least one level aggregation node when the live broadcast file does not exist or the live broadcast file is out of date.
6. The method of any of claims 1-5, wherein the method further comprises: after receiving the live file request, the source station server establishes short links with the sink nodes in the CDN;
the transmitting the live file and the expiration time stamp to the sink node in the CDN network further includes:
transmitting the live file and the expiration time stamp to the sink node in the CDN through the short link;
the method further comprises the steps of: and the source station server breaks the short link after transmitting the live file and the expiration time stamp to the sink node in the CDN.
7. The method of any of claims 1-6, wherein the method further comprises: the source station server starts a time calibration service, acquires network time by using the time calibration service, and calibrates time information of the source station server according to the network time; and/or
The at least one stage of sink node starts a time calibration service, network time is obtained by using the time calibration service, and time information of the at least one stage of sink node is calibrated according to the network time; and/or
The at least one edge node starts a time calibration service, network time is acquired by using the time calibration service, and time information of the at least one edge node is calibrated according to the network time.
8. A live file buffering time synchronization system, comprising: the system comprises a source station server, at least one level of sink node and at least one edge node;
the source station server is suitable for receiving the live file request, generating an expiration time stamp for the live file, and transmitting the live file and the expiration time stamp to the sink node in the CDN;
the sink node is suitable for sending the live broadcast file and the expiration time stamp to a next-stage sink node and/or the at least one edge node; the at least one level of sink node and the at least one edge node are used for caching the live broadcast files and setting the caching time of the cached live broadcast files according to the expiration time stamp;
And the source station server, the at least one level of sink nodes and the at least one edge node are suitable for carrying out cache expiration marking on the live broadcast file when the cache time of the cached live broadcast file arrives so as to realize expiration of the live broadcast file at the same time.
9. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform an operation corresponding to the live file buffering time synchronization method according to any one of claims 1 to 7.
10. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the live file cache time synchronization method of any of claims 1-7.
CN202311741682.7A 2023-12-15 2023-12-15 Live file cache time synchronization method, system, computing device and storage medium Pending CN117714719A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311741682.7A CN117714719A (en) 2023-12-15 2023-12-15 Live file cache time synchronization method, system, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311741682.7A CN117714719A (en) 2023-12-15 2023-12-15 Live file cache time synchronization method, system, computing device and storage medium

Publications (1)

Publication Number Publication Date
CN117714719A true CN117714719A (en) 2024-03-15

Family

ID=90160320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311741682.7A Pending CN117714719A (en) 2023-12-15 2023-12-15 Live file cache time synchronization method, system, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN117714719A (en)

Similar Documents

Publication Publication Date Title
US10009659B2 (en) System and method for hybrid push-based streaming
US20180205976A1 (en) Method and apparatus of obtaining video fragment
US20130117413A1 (en) Content distribution device, content playback device, content distribution system, method for controlling a content distribution device, control program, and recording medium
JP6338709B2 (en) Streaming apparatus and method thereof, streaming service system using the same, and computer-readable recording medium (streaming apparatus and method thereof, streaming service system using the streaming medium and computer readable)
US9479607B2 (en) Content caching and delivering system with traffic of repetitively requested content reduced
JP2007529073A (en) Cache server network and content file delivery scheduling method
WO2019128800A1 (en) Content service implementation method and device, and content delivery network node
CN102055718B (en) Method, device and system for layering request content in http streaming system
US20140074961A1 (en) Efficiently Delivering Time-Shifted Media Content via Content Delivery Networks (CDNs)
US20110082943A1 (en) P2p network system and data transmitting and receiving method thereof
US10341035B2 (en) Method for continuously playing, on a client device, a content broadcast within a peer-to-peer network
US11184655B1 (en) System and method for intelligent delivery of segmented media streams
EP3039636A1 (en) Generating frame chunking for video fast starts
CN112312162A (en) Video server for transmitting video stream
CN113285947B (en) HLS live broadcast and multicast live broadcast connection method and device
CN111193684B (en) Real-time delivery method and server of media stream
CN111193686B (en) Media stream delivery method and server
CN115297095B (en) Back source processing method, device, computing equipment and storage medium
CN117714719A (en) Live file cache time synchronization method, system, computing device and storage medium
JP6538061B2 (en) Method of providing content portions of multimedia content to a client terminal and corresponding cache
De Schepper et al. Shared content addressing protocol (scap): Optimizing multimedia content distribution at the transport layer
US20140044127A1 (en) Distributed Web Object Identification for Web Caching
CN110545492B (en) Real-time delivery method and server of media stream
CN113891176A (en) HLS-based on-demand flow control method, device, equipment and storage medium
US20130103752A1 (en) Content distribution system, script generation device, terminal, content distribution method, and content distribution program

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