CN109756756B - Video playing method and video playing device - Google Patents

Video playing method and video playing device Download PDF

Info

Publication number
CN109756756B
CN109756756B CN201711093470.7A CN201711093470A CN109756756B CN 109756756 B CN109756756 B CN 109756756B CN 201711093470 A CN201711093470 A CN 201711093470A CN 109756756 B CN109756756 B CN 109756756B
Authority
CN
China
Prior art keywords
video stream
playing
clients
node server
analog
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
CN201711093470.7A
Other languages
Chinese (zh)
Other versions
CN109756756A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711093470.7A priority Critical patent/CN109756756B/en
Publication of CN109756756A publication Critical patent/CN109756756A/en
Application granted granted Critical
Publication of CN109756756B publication Critical patent/CN109756756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a video playing method and a video playing device. The video playing method comprises the following steps: determining the number of clients acquiring a first video stream from a node server; when the number of the clients meets a preset condition, starting simulation playing at the node server; wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream. According to the video playing method and the video playing device provided by the embodiment of the invention, when the last client stops obtaining the first video stream from the node server, the analog playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the new audience can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the node server can timely respond when the audience is opened to watch the first video stream.

Description

Video playing method and video playing device
Technical Field
The present application relates to the field of information processing, and in particular, to a video playing method and a video playing apparatus.
Background
A CDN (Content Delivery Network) generally refers to a node server, which is an intelligent virtual Network formed by placing node servers at various places in a Network, so that a request of a user can be redirected to a service node closest to the user in real time according to Network traffic and comprehensive information such as connection of each node, load conditions, a distance to the user, response time, and the like, thereby solving a situation of internet Network congestion and improving a response speed of the user accessing a website. The node server network comprises edge nodes (node servers) and a live source station (central node). Fig. 1 is a schematic diagram of the relationship of a node server, a live source station and a user. Referring to fig. 1, a user connects a live source station and a node server, and when the user needs to upload data (for example, a video stream) as an uploader, the user can directly upload the data to the live source station, and when the user needs to watch the video as a viewer, the user obtains the video stream in the live source station through the node server.
In video transmission, a pull stream (down streaming) means that a user terminal pulls a video stream from a server to the client terminal for playing; push streaming (up streaming) refers to a broadcaster end pushing a locally acquired audio video stream to a media server.
In a live video scene, an uploader (i.e., a live video provider) pushes a video stream to a live center through a protocol such as RTMP, a viewer accesses the live center through a node server node nearby, and the node server node returns to the live center to pull the video stream to complete video playing.
Aiming at UGC (user original content) live webcast in the current mainstream video live broadcast scene, the method is characterized in that the anchor region is dispersed, the mobile live broadcast proportion is large, the variation of the number of watched people is large, the retention time is short, and the watching switching is very frequent. The live APP of mainstream broadcasts ten thousand anchor broadcasters at a rush hour simultaneously, spectator can frequently switch between many anchor broadcasters, excavates own interest point, results in the live dwell time of broadcast at every turn a lot, because RTMP is STREAMING, if edge node nobody watches, will cut off at once, can follow the live center again and pull stream when leading to next spectator to watch edge node, increase first broadcast time.
In order to solve this problem, various solutions are proposed in the prior art, such as buffering the last played key frame, modifying the timestamp of the buffered frame, dropping the buffered audio frame, and so on. However, these existing solutions do not really solve the problem of long start-up time.
Disclosure of Invention
In view of the foregoing problems, an embodiment of the present invention provides a video playing method and a video playing apparatus to solve the problems in the prior art.
In order to solve the above problem, an embodiment of the present application discloses a video stream pulling method, including:
determining the number of clients acquiring a first video stream from a node server;
when the number of the clients meets a preset condition, starting simulation playing at the node server;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
In an embodiment of the video playing method of the present invention, the method further includes:
detecting whether an acquisition request aiming at the first video stream exists;
and in the case that the acquisition request for the first video stream is not detected, ending the analog playing after the set time length of the analog playing.
In an embodiment of the video playing method of the present invention, the method further includes:
acquiring playing data of the first video stream, wherein the playing data comprises at least one of the number of the clients acquiring the first video stream and the average playing time corresponding to the number of the clients;
and determining the set time length of the analog playing according to the playing data.
In an embodiment of the video playing method of the present invention, the set duration of the analog playing is decreased as the number of the clients acquiring the first video stream within a specified time period increases.
In an embodiment of the video playing method of the present invention, the set duration of the analog playing increases with an increase of the average playing duration of the first video stream according to the obtaining.
In an embodiment of the video playing method of the present invention, the number of the clients acquiring the first video stream is: the total number of clients of the first video stream is obtained from the plurality of node servers.
In an embodiment of the video playing method of the present invention, the set duration of the analog playing is greater than 5 minutes and less than 30 minutes.
In an embodiment of the video playing method of the present invention, the step of starting the analog playing includes:
when detecting that a client stops pulling a first video stream from the node server, starting a timer to prolong the session between the client and the node server.
In an embodiment of the video playing method of the present invention, the method further includes:
in the case where the acquisition request for the first video stream is detected, the analog playback is ended.
In order to solve the above problem, an embodiment of the present application further discloses a video stream pulling apparatus, including:
the number determining module is used for determining the number of the clients for acquiring the first video stream from the node server;
the simulation playing starting module is used for starting simulation playing at the node server when the number of the clients meets a preset condition;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
In an embodiment of the video playing apparatus of the present invention, the apparatus further includes:
the detection module is used for detecting whether an acquisition request aiming at the first video stream exists;
and the first end module is used for ending the analog playing after the set time length of the analog playing under the condition that the acquisition request aiming at the first video stream is not detected.
In an embodiment of the video playing apparatus of the present invention, the apparatus further includes:
an obtaining module, configured to obtain playing data of the first video stream, where the playing data includes at least one of a number of clients that obtain the first video stream and an average playing duration corresponding to the number of the clients;
and the time length determining module is used for determining the set time length of the analog playing according to the playing data.
In an embodiment of the video playing apparatus of the present invention, the set duration of the analog playing decreases as the number of the clients acquiring the first video stream within a specified time period increases.
In an embodiment of the video playing apparatus of the present invention, the set duration of the analog playing increases with an increase of the average playing duration of the first video stream according to the obtaining.
In an embodiment of the video playing device of the present invention, the number of the clients acquiring the first video stream is: the total number of clients of the first video stream is obtained from the plurality of node servers.
In an embodiment of the video playing apparatus of the present invention, the set duration of the analog playing is greater than 5 minutes and less than 30 minutes.
In an embodiment of the video playing apparatus of the present invention, the analog playing starting module is configured to:
when detecting that a client stops pulling a first video stream from the node server, starting a timer to prolong the session between the client and the node server.
In an embodiment of the video playing apparatus of the present invention, the apparatus further includes:
and the second ending module is used for ending the analog playing under the condition that the acquisition request aiming at the first video stream is detected.
An embodiment of the present application further discloses a terminal device, including:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the terminal device to perform the above-described methods.
One embodiment of the present application also discloses one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause a terminal device to perform the above-described method.
As can be seen from the above, the embodiments of the present application include the following advantages:
according to the video playing method and the video playing device provided by the embodiment of the invention, when the last client stops obtaining the first video stream from the node server, the analog playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the new audience can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the node server can timely respond when the audience is opened to watch the first video stream.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a diagram illustrating the relationship of node servers, central servers, and users.
Fig. 2 is a flowchart of a video playing method according to a first embodiment of the present application.
Fig. 3 is a flowchart of a video playing method according to a second embodiment of the present application.
Fig. 4 is a block diagram of a video playback device according to a third embodiment of the present application.
Fig. 5 is a block diagram of a video playback device according to a third embodiment of the present application.
Fig. 6 schematically shows a block diagram of a terminal device for performing the method according to the invention; and
fig. 7 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be derived from the embodiments given herein by a person of ordinary skill in the art are intended to be within the scope of the present disclosure.
One of the core ideas of the present application is to provide a video playing method and a video playing apparatus, which avoid the problems of long response time and low efficiency caused by the need to repeatedly return to the central server to obtain a video stream after the node server and the central server are cut off by maintaining the video stream between the node server and the central server.
First embodiment
A first embodiment of the present invention provides a video playing method. Fig. 2 is a flowchart illustrating steps of a video playing method according to a first embodiment of the present invention. As shown in fig. 2, the video playing method according to the embodiment of the present invention may include the following steps:
s101, determining the number of clients acquiring a first video stream from a node server;
in this step, the viewer obtains the first video stream from the central server for viewing from the node server through the client.
As shown in fig. 1, a network environment may have a central server (live source station) and a plurality of node servers (CDN, edge node), where each node server is connected to a plurality of clients that access nearby, and the clients obtain a first video stream from the corresponding node server.
In this step, the node server has a session link pool for storing the play link. The node server may detect the number of links for acquiring the first video stream in the session link pool at a fixed frequency to determine the number of clients currently acquiring the first video stream from the node server.
The node server may determine whether there is a client currently acquiring the first video stream through the link information for the first video stream stored in the session link pool. The link information of the first video stream includes, for example, information of a start time, an end time, an IP of the viewer client, and the like of each viewer acquiring the first video stream.
S102, when the number of the clients meets a preset condition, starting simulation playing at the node server;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
In this step, after the video provider uploads the video stream, the client of the viewer may obtain the video stream from a central server (e.g., a live source station) through the node server for viewing. When the client of the viewer acquires the video stream from the central server through the node server for the first time, the central server needs to load and cache the video stream from the central server to the node server, and the time required for the process is usually long. When the same viewer or a different viewer acquires the video again through the same node server, the content of the video stream is cached in the node server, so the video stream can be acquired directly from the node server when the video stream is acquired again.
It should be noted that, after the client initiates a request for acquiring the first video stream from the corresponding node server, the node server requests the corresponding second video stream from the central server. The second video stream corresponds to the first video stream. In the foregoing and the following, the video stream acquired by the client from the node server is referred to as a first video stream, and the video stream corresponding to the first video stream acquired by the node server from the central server is referred to as a second video stream.
The association of the first video stream and the second video stream is illustrated, for example, by the following example: a second video stream in RTMP format in the central server. The video stream may be a live video file uploaded instantly by a certain anchor or pre-stored. When a user wants to watch the live video file, the user requests the node server to acquire the live program, after receiving the request, the node server requests the central server for a corresponding second video stream, and after the node server processes the second video stream, the node server generates a first video stream (for example, a video stream in an RTMP format or an FLV format) and sends the first video stream to a client of the user. The second video stream and the first video stream may have the same data encapsulation format with different contents, and are not described herein again.
As mentioned above, because of the streaming nature of the video stream in RTMP format, if no viewer gets the video stream from the node server, the stream will be cut off immediately. In a video scene where the number of people who view the video scene changes greatly, the remaining time is short, and the view switching is very frequent, the frequency of turning on and off the video stream by the viewer is very high, and therefore the possibility of the occurrence of video stream cutoff and reacquisition is very high. In order to avoid wasting resources, the execution subject (e.g., the node server) may set a periodic detection procedure to continuously detect whether there is a client that obtains the video stream through the node server for a specified first video stream. Whether an acquisition link exists for the first video stream is detected, for example, by the session link pool described above.
When it is detected that the preset condition is met, for example, when the node server finds that only one or two clients acquire the video stream from the node server in the scanning process, or the current last client finishes acquiring the video stream from the node server, it is considered that the preset condition is met, and the analog playing may be started.
In this step, initiating analog playback can be accomplished in a number of ways. In one method, a simulation acquisition program can be established in the node server, the simulation client acquires video streams from the node server, the node server and the central server are ensured not to be interrupted, and the simulation acquisition time can be set by a developer. In addition, a timer may be set, and the duration of a session between the client and the node server is extended by a set duration.
The set time length can be a fixed time length or an unfixed time length. For example, the developer may set the duration to 30 seconds, or the developer may set the set duration as a function of the captured features of the video stream based on the captured features. Alternatively, the developer may set the set duration to a random number within a certain time range. And are not limiting herein.
As can be seen from the above, the video playing method provided in the first embodiment of the present invention at least has the following technical effects:
in the video playing method provided by the embodiment of the invention, when a preset condition is met, for example, when the last client stops obtaining the first video stream from the node server, the simulated playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the client corresponding to a new viewer can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the client of the viewer can obtain the timely response of the node server when opening to watch the first video stream.
Second embodiment
A second embodiment of the present invention provides a video playing method. Fig. 3 is a flowchart illustrating a video playing method according to a second embodiment of the present invention. As shown in fig. 3, the video playing method according to the embodiment of the present invention includes the following steps:
s201, determining the number of clients acquiring a first video stream from a node server;
s202, when the number of the clients meets a preset condition, starting simulation playing at the node server;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
The steps S201 to S202 are the same as or similar to the steps S101 to S102 in the previous embodiment, and are not repeated herein. The present embodiment focuses on the differences from the previous embodiment.
In an embodiment of the video playing method of the present invention, in step S202, that is, when the number of the clients satisfies a preset condition, after the step of starting the simulation playing by the node server, the method further includes:
s205, detecting whether an acquisition request aiming at the first video stream exists;
in this step, the node server may detect whether there is a retrieval request initiated from the client to retrieve the first video stream after the analog play is initiated. For example, the node server may detect whether a link for acquiring the first video stream exists in the session link pool.
Alternatively, this step may be implemented in other ways. For example, when a client initiates a fetch request to a node server for a first video stream, a program in the node server may record this action of the client and record in a corresponding storage area for subsequent use.
S206, when the acquisition request for the first video stream is not detected, ending the analog play after the set duration of the analog play.
In this step, when the acquisition request for the first video stream is not detected, it may be considered that there is no other viewer who wishes to view the first video within the set time duration of the analog play, and the analog play may be ended in order to avoid further occupying resources. For example, the session between the client and the node server may be ended after a set duration, so that no more video stream is flowing between the client and the node server, thereby resulting in a flow break between the node server and the central server.
In an embodiment of the video playing method of the present invention, the method may further include:
s203, acquiring playing data of the first video stream, wherein the playing data comprises at least one of the number of clients acquiring the first video stream from each node server and the average playing time corresponding to the number of the clients;
in step S203, the playing data of the first video stream may be obtained, including one of the number of clients and the average playing time. The number of clients and the average playing time may be the number of clients and the average playing time that are connected to the same node server and that acquire the first video stream, or may be the number of clients and the average playing time that are connected to different node servers and that acquire the first video stream.
And S204, determining the set time length of the analog playing according to the playing data.
In step S204, in the step of ending the analog play after the set duration of the analog play, the set duration of the analog play is determined by the number of the clients acquiring the first video stream and/or the average play duration.
The developer can set the duration of the analog play. In the process of considering the set time length, the time length of the analog playing can be calculated by selecting the mode of saving most resources. In this embodiment, when the number of people watching the video is large, for example, greater than the first threshold, it may be considered that the number of people requesting the video stream per unit time is large, or the probability of requesting the video stream per unit time is high, so the time length of the analog playing may be set to be short, so that the client subsequently requesting the video stream can continue to play the video stream. When the average time to watch the video is long, the video may be considered as a video suitable for deep viewing (e.g., an episode, a movie, etc.), and the length of time for the analog play may be set to be long.
In this step, the start time, the end time, and the duration of the video acquisition by each viewer can be obtained from the historical play data of the video stream. The number of clients and/or the average playing time length of the video stream within a period of time can be obtained through the history acquisition information, and the time length of the simulation playing is calculated by using the history playing data.
The node server or the central server may have a prediction model in which a set time length for the analog play may be output after the number of clients and the average play time length are input. The predictive model may be a trained machine learning model, where the pre-trained samples include the number of clients per unit time, the average playing time, and the interval from the end of the last viewer to the next viewer requesting viewing. Using this information, the length of time for the analog play (i.e., how long it takes to wait for the next viewer) can be predicted.
In this step, initiating analog playback can be accomplished in a number of ways. In one method, a simulation acquisition program can be established in the node server, the simulation client pulls a stream from the node server, the node server and the central server are ensured not to be interrupted, and the simulation acquisition time can be set by a developer. In addition, a timer may be set, and the duration of a session between the client and the node server is extended by a set duration. The timer is a timer for the session.
In an embodiment of the video playing method of the present invention, the set duration of the analog playing is decreased as the number of the clients acquiring the first video stream increases, or the set duration of the analog playing is increased as the average playing duration of the first video stream increases.
The set time duration of the analog play may be inversely related to the number of clients acquiring the first video stream, and may be positively related to the average play time duration. It should be noted herein that the set time duration of the analog play may not be limited to be related to the number of clients acquiring the first video stream and the average play time duration in a proportional relationship, but may decrease as the number of clients acquiring the first video stream increases and/or increase as the viewing time duration increases in any form. The set duration of the analog play may be set by the developer to a range, for example, greater than 5 minutes and less than 30 minutes.
As described above, in step S203, the number of clients may be acquired from one node server, or may be acquired from a plurality of node servers. That is, only the number of clients acquiring the first video stream and/or the average playing time length of the current node server for the video stream in a specified time period may be counted, or the number of clients acquiring the first video stream and/or the average playing time length of the multiple node servers under the central server for the video stream in a specified time period may be counted. In the latter case, the "number of clients acquiring the first video stream" is: the total number of clients of the first video stream is obtained from the plurality of node servers. Therefore, the average playing time length corresponding to the number of the clients is the average value of the playing time lengths corresponding to the total number of the clients.
In an alternative embodiment, the method may further comprise the steps of:
s207, when the acquisition request for the video stream is detected, ending the analog play;
in this step, when it is detected that the node server receives an acquisition request for the video stream from the client, it indicates that there is a request from the client to start real playing, and it is meaningless to extend the time of pulling the stream through the simulated playing, so that the simulated playing can be ended and the real playing can be started.
In another embodiment, the analog playback may also be selected to be retained in case a fetch request for the video stream is detected. And will not be described in detail herein.
In summary, the video playing method provided by this embodiment has at least the following advantages:
according to the video playing method and the video playing device provided by the embodiment of the invention, when the last client stops obtaining the first video stream from the node server, the analog playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the new audience can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the node server can timely respond when the audience is opened to watch the first video stream.
In addition, the video playing method provided by the embodiment at least includes the following advantages:
in an optional embodiment of the present invention, the video playing method and the video playing apparatus provided in the embodiments of the present invention may determine the duration to be reserved according to the average watching duration and/or the average number of remaining persons, and particularly, for an existing live video stream, where there are situations of dispersed anchor regions, a large proportion of mobile live broadcasts, a large variation in the number of watching persons, a short duration, and a very frequent switching of watching, in this situation, the embodiments of the present invention set a mechanism for determining the duration to be reserved according to the average watching duration and/or the average number of remaining persons, thereby improving the efficiency of the server.
Third embodiment
A third embodiment of the present invention provides a video playing apparatus, as shown in fig. 4, the apparatus may include the following modules:
a number determining module 301, configured to determine the number of clients that obtain the first video stream from the node server;
a simulation playing starting module 302, configured to start simulation playing at the node server when the number of the clients meets a preset condition;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
In summary, the video playing apparatus provided in this embodiment has at least the following advantages:
according to the video playing method and the video playing device provided by the embodiment of the invention, when the last client stops obtaining the first video stream from the node server, the analog playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the new audience can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the node server can timely respond when the audience is opened to watch the first video stream.
Fourth embodiment
A fourth embodiment of the present invention provides a video playing apparatus, as shown in fig. 5, the apparatus may include the following modules:
a number determining module 401, configured to determine the number of clients that acquire the first video stream from the node server;
a simulation playing starting module 402, configured to start simulation playing at the node server when the number of the clients meets a preset condition;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, the second video stream corresponding to the first video stream.
In an optional embodiment of the video playback device of the present invention, the device further comprises:
a detecting module 405, configured to detect whether there is an acquisition request for the first video stream;
a first end module 406, configured to end the analog play after a set duration of the analog play if no acquisition request for the first video stream is detected.
In an optional embodiment of the video playback device of the present invention, the device further comprises:
an obtaining module 403, configured to obtain playing data of the first video stream, where the playing data includes at least one of the number of clients that obtain the first video stream and an average playing duration corresponding to the number of the clients;
and a duration determining module 404, configured to determine a set duration of the analog playing according to the playing data.
In an optional embodiment of the video playing apparatus of the present invention, the set duration of the analog playing decreases as the number of clients acquiring the first video stream within a specified time period increases.
In an optional embodiment of the video playing apparatus of the present invention, the set duration of the analog playing increases with an increase of the average playing duration of the first video stream according to the obtaining.
In an optional embodiment of the video playing apparatus of the present invention, the number of the clients acquiring the first video stream is: the total number of clients of the first video stream is obtained from the plurality of node servers.
In an optional embodiment of the video playing apparatus of the present invention, the set duration of the analog playing is greater than 5 minutes and less than 30 minutes.
In an optional embodiment of the video playing apparatus of the present invention, the analog playing starting module 402 is further configured to:
and when detecting that the client stops pulling the first video stream from the node server, starting a timer to prolong the session between the node server and the central server.
In an optional embodiment of the video playback device of the present invention, the device further comprises:
a second ending module 407, configured to end the analog playing if the acquisition request for the first video stream is detected.
In summary, the video playing apparatus provided in this embodiment has at least the following advantages:
according to the video playing method and the video playing device provided by the embodiment of the invention, when the last client stops obtaining the first video stream from the node server, the analog playing can be started, the time of the corresponding second video stream in the node server and the central server is prolonged, and the new audience can be immediately live broadcast after coming in, so that the node server does not need to obtain the video stream from the central server again, and the node server can timely respond when the audience is opened to watch the first video stream.
In addition, the video playing apparatus proposed in this embodiment at least includes the following advantages:
in an optional embodiment of the present invention, the video playing method and the video playing apparatus provided in the embodiments of the present invention may determine the duration to be reserved according to the average watching duration and/or the average number of remaining persons, and particularly, for an existing live video stream, where there are situations of dispersed anchor regions, a large proportion of mobile live broadcasts, a large variation in the number of watching persons, a short duration, and a very frequent switching of watching, in this situation, the embodiments of the present invention set a mechanism for determining the duration to be reserved according to the average watching duration and/or the average number of remaining persons, thereby improving the efficiency of the server.
For the apparatus embodiment, since it is basically similar to the method embodiment, it is described relatively simply, and for the relevant points, refer to the partial description of the method embodiment.
Fig. 6 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device may include an input device 90, a processor 91, an output device 92, a memory 93, and at least one communication bus 94. The communication bus 94 is used to enable communication connections between the elements. The memory 93 may comprise a high speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, in which various programs may be stored in the memory 93 for performing various processing functions and implementing the method steps of the present embodiment.
Alternatively, the processor 91 may be implemented by, for example, a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a controller, a microcontroller, a microprocessor, or other electronic components, and the processor 91 is coupled to the input device 90 and the output device 92 through a wired or wireless connection.
Alternatively, the input device 90 may include a variety of input devices, such as at least one of a user-oriented user interface, a device-oriented device interface, a software-programmable interface, a camera, and a sensor. Optionally, the device interface facing the device may be a wired interface for data transmission between devices, or may be a hardware plug-in interface (e.g., a USB interface, a serial port, etc.) for data transmission between devices; optionally, the user-facing user interface may be, for example, a user-facing control key, a voice input device for receiving voice input, and a touch sensing device (e.g., a touch screen with a touch sensing function, a touch pad, etc.) for receiving user touch input; optionally, the programmable interface of the software may be, for example, an entry for a user to edit or modify a program, such as an input pin interface or an input interface of a chip; optionally, the transceiver may be a radio frequency transceiver chip with a communication function, a baseband processing chip, a transceiver antenna, and the like. An audio input device such as a microphone may receive voice data. The output device 92 may include a display, a sound, or other output device.
In this embodiment, the processor of the terminal device includes a module for executing the functions of the modules of the data processing apparatus in each device, and specific functions and technical effects may refer to the foregoing embodiments, which are not described herein again.
Fig. 7 is a schematic diagram of a hardware structure of a terminal device according to another embodiment of the present application. FIG. 7 is a specific embodiment of the implementation of FIG. 6. As shown in fig. 7, the terminal device of the present embodiment includes a processor 101 and a memory 102.
The processor 101 executes the computer program codes stored in the memory 102 to implement the video playing method of fig. 2 to 3 in the above embodiments.
The memory 102 is configured to store various types of data to support operations at the terminal device. Examples of such data include instructions for any application or method operating on the terminal device, such as messages, pictures, videos, and so forth. The memory 102 may include a Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
Optionally, the processor 101 is provided in the processing assembly 100. The terminal device may further include: a communication component 103, a power component 104, a multimedia component 105, an audio component 106, an input/output interface 107 and/or a sensor component 108. The specific components included in the terminal device are set according to actual requirements, which is not limited in this embodiment.
The processing component 100 generally controls the overall operation of the terminal device. The processing component 100 may include one or more processors 101 to execute instructions to perform all or part of the steps of the methods of fig. 2-3 described above. Further, the processing component 100 can include one or more modules that facilitate interaction between the processing component 100 and other components. For example, the processing component 100 may include a multimedia module to facilitate interaction between the multimedia component 105 and the processing component 100.
The power supply component 104 provides power to the various components of the terminal device. The power components 104 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the terminal device.
The multimedia component 105 includes a display screen that provides an output interface between the terminal device and the user. In some embodiments, the display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the display screen includes a touch panel, the display screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 106 is configured to output and/or input audio signals. For example, the audio component 106 may include a Microphone (MIC) configured to receive external audio signals when the terminal device is in an operational mode, such as a voice recognition mode. The received audio signal may further be stored in the memory 102 or transmitted via the communication component 103. In some embodiments, the audio component 106 also includes a speaker for outputting audio signals.
The input/output interface 107 provides an interface between the processing component 100 and peripheral interface modules, which may be click wheels, buttons, etc. These buttons may include, but are not limited to: a volume button, a start button, and a lock button.
The sensor component 108 includes one or more sensors for providing various aspects of status assessment for the terminal device. For example, the sensor component 108 can detect the open/closed status of the terminal device, the relative positioning of the components, the presence or absence of user contact with the terminal device. The sensor assembly 108 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact, including detecting the distance between the user and the terminal device. In some embodiments, the sensor assembly 108 may also include a camera or the like.
The communication component 103 is configured to facilitate wired or wireless communication between the terminal device and other devices. The terminal device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In one embodiment, the terminal device may include a SIM card slot for inserting a SIM card therein, so that the terminal device can log on to a GPRS network and establish communication with the server via the internet.
From the above, the communication component 103, the audio component 106, the input/output interface 107 and the sensor component 108 involved in the embodiment of fig. 7 can be implemented as input devices in the embodiment of fig. 6.
An embodiment of the present application provides a terminal device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the terminal device to perform a method of video summary generation as described in one or more of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description is provided for a video playing method and a video playing apparatus, and specific examples are applied in this text to explain the principle and the implementation of the present application, and the description of the foregoing embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (20)

1. A video playback method, comprising:
determining the number of clients acquiring a first video stream from a node server;
when the number of the clients meets a preset condition, starting simulation playing at the node server;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, and the second video stream corresponds to the first video stream;
the preset conditions include: the number of the clients acquiring the first video stream from the node server is two or less.
2. The method of claim 1, further comprising:
detecting whether an acquisition request aiming at the first video stream exists;
and in the case that the acquisition request for the first video stream is not detected, ending the analog playing after the set time length of the analog playing.
3. The method of claim 2, further comprising:
acquiring playing data of the first video stream, wherein the playing data comprises at least one of the number of the clients acquiring the first video stream and the average playing time corresponding to the number of the clients;
and determining the set time length of the analog playing according to the playing data.
4. The method of claim 3, wherein the set duration of the analog playback decreases as the number of clients that obtain the first video stream increases within a specified time period.
5. The method of claim 3, wherein the set duration of the analog playing increases as the average playing duration of the first video stream increases according to the obtaining.
6. The method of claim 3,
the number of the clients acquiring the first video stream is as follows: the total number of clients of the first video stream is obtained from the plurality of node servers.
7. The method of claim 2, wherein the set duration of the analog playback is greater than 5 minutes and less than 30 minutes.
8. The method of claim 1, wherein the step of initiating analog playback comprises:
when detecting that a client stops pulling a first video stream from the node server, starting a timer to prolong the session between the client and the node server.
9. The method of claim 1, further comprising:
in the case where the acquisition request for the first video stream is detected, the analog playback is ended.
10. A video playback apparatus, comprising:
the number determining module is used for determining the number of the clients for acquiring the first video stream from the node server;
the simulation playing starting module is used for starting simulation playing at the node server when the number of the clients meets a preset condition;
wherein the simulated play is used for maintaining a second video stream of the node server and a central server, and the second video stream corresponds to the first video stream;
the preset conditions include: the number of the clients acquiring the first video stream from the node server is two or less.
11. The apparatus of claim 10, further comprising:
the detection module is used for detecting whether an acquisition request aiming at the first video stream exists;
and the first end module is used for ending the analog playing after the set time length of the analog playing under the condition that the acquisition request aiming at the first video stream is not detected.
12. The apparatus of claim 11, further comprising:
an obtaining module, configured to obtain playing data of the first video stream, where the playing data includes at least one of a number of clients that obtain the first video stream and an average playing duration corresponding to the number of the clients;
and the time length determining module is used for determining the set time length of the analog playing according to the playing data.
13. The apparatus of claim 12, wherein the set duration of the analog playback decreases as the number of clients that obtain the first video stream increases within a specified time period.
14. The apparatus of claim 12, wherein the set duration of the analog playback increases as an average playback duration of the first video stream increases according to the obtaining.
15. The apparatus of claim 12, wherein the number of clients acquiring the first video stream is: the total number of clients of the first video stream is obtained from the plurality of node servers.
16. The apparatus of claim 11, wherein the set duration of the analog playback is greater than 5 minutes and less than 30 minutes.
17. The apparatus of claim 10, wherein the analog play start module is configured to:
and when detecting that the client stops pulling the first video stream from the node server, starting a timer to prolong the session between the node server and the central server.
18. The apparatus of claim 10, further comprising:
and the second ending module is used for ending the analog playing under the condition that the acquisition request aiming at the first video stream is detected.
19. A terminal device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the terminal device to perform the method of one or more of claims 1-9.
20. One or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause a terminal device to perform the method of one or more of claims 1-9.
CN201711093470.7A 2017-11-08 2017-11-08 Video playing method and video playing device Active CN109756756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711093470.7A CN109756756B (en) 2017-11-08 2017-11-08 Video playing method and video playing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711093470.7A CN109756756B (en) 2017-11-08 2017-11-08 Video playing method and video playing device

Publications (2)

Publication Number Publication Date
CN109756756A CN109756756A (en) 2019-05-14
CN109756756B true CN109756756B (en) 2021-10-22

Family

ID=66402159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711093470.7A Active CN109756756B (en) 2017-11-08 2017-11-08 Video playing method and video playing device

Country Status (1)

Country Link
CN (1) CN109756756B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437329B (en) * 2020-11-05 2024-01-26 上海幻电信息科技有限公司 Method, device and equipment for playing video and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309203A (en) * 2007-05-17 2008-11-19 中兴通讯股份有限公司 Network media service method
CN105516739A (en) * 2015-12-22 2016-04-20 腾讯科技(深圳)有限公司 Video live broadcasting method and system, transcoding server and webpage client
CN105872611A (en) * 2015-12-07 2016-08-17 乐视云计算有限公司 Pressure-bearing test method and device of cloud live broadcast system
CN106686396A (en) * 2016-12-30 2017-05-17 广州酷狗计算机科技有限公司 Method and system for switching broadcasting rooms
CN107241615A (en) * 2017-07-31 2017-10-10 合网络技术(北京)有限公司 Live pause method, system, live pause device and direct broadcast server

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6859840B2 (en) * 2001-01-29 2005-02-22 Kasenna, Inc. Prefix caching for media objects
CN102413379B (en) * 2011-11-29 2014-04-02 中国传媒大学 Starting delaying method for streaming media live broadcasting system
US10476926B2 (en) * 2015-06-12 2019-11-12 Telefonaktiebolaget Lm Ericsson (Publ) System and method for managing ABR bitrate delivery responsive to video buffer characteristics of a client
CN105656876A (en) * 2015-11-26 2016-06-08 乐视云计算有限公司 Live video play method, device and system
CN105897678A (en) * 2015-12-03 2016-08-24 乐视云计算有限公司 Network broadcast data processing method and device
CN105578211B (en) * 2015-12-16 2018-09-07 深圳市网心科技有限公司 Live streaming based on unlimited service node accelerates network interim card optimization method and system
CN105848011A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Video living broadcast method and device
CN107172015A (en) * 2017-04-25 2017-09-15 北京潘达互娱科技有限公司 Live video method for pushing and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309203A (en) * 2007-05-17 2008-11-19 中兴通讯股份有限公司 Network media service method
CN105872611A (en) * 2015-12-07 2016-08-17 乐视云计算有限公司 Pressure-bearing test method and device of cloud live broadcast system
CN105516739A (en) * 2015-12-22 2016-04-20 腾讯科技(深圳)有限公司 Video live broadcasting method and system, transcoding server and webpage client
CN106686396A (en) * 2016-12-30 2017-05-17 广州酷狗计算机科技有限公司 Method and system for switching broadcasting rooms
CN107241615A (en) * 2017-07-31 2017-10-10 合网络技术(北京)有限公司 Live pause method, system, live pause device and direct broadcast server

Also Published As

Publication number Publication date
CN109756756A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109413483B (en) Live content preview method, device, equipment and medium
US9344517B2 (en) Downloading and adaptive streaming of multimedia content to a device with cache assist
CN109474854B (en) Video playing method, playlist generating method and related equipment
WO2018000624A1 (en) Video playing control method and device
CN111641866B (en) Method, system, and medium for inserting auxiliary media items into a primary media stream
WO2015062521A1 (en) Code rate switching method and device for smart television
WO2015090095A1 (en) Information pushing method, device, and system
EP3193509B1 (en) Video advertisement filtering method, device and equipment
CN111405311B (en) Live program storage method and device, electronic equipment and storage medium
US20180262809A1 (en) Method and Device for switching Broadcast TV Program to on-demand Program
US10812875B2 (en) Method and apparatus for generating information associated with a lapsed presentation of media content
CN109803151B (en) Multimedia data stream switching method and device, storage medium and electronic device
CN107333147B (en) Video buffer control method, terminal and storage device
US20160294903A1 (en) Method and device for pushing resources to mobile communication terminal by smart television
WO2018205833A1 (en) Method and apparatus for transmitting music file information, storage medium, and electronic apparatus
CN108769816B (en) Video playing method, device and storage medium
US10116763B2 (en) Method for operating a cache arranged along a transmission path between client terminals and at least one server, and corresponding cache
US20140143670A1 (en) Video Playback Analytics Collection
WO2016090889A1 (en) Promotion information processing method, device and apparatus, and non-volatile computer storage medium
CN107690093B (en) Video playing method and device
CN113645481B (en) Video recording method, camera equipment, control terminal and video recording system
CA2939496A1 (en) Time-sensitive content manipulation in adaptive streaming buffer
CN103618962A (en) Control method and device for getting access to specific video application of smart television
WO2015188565A1 (en) Mobile terminal based iptv push video-on-demand method and device
WO2015035934A1 (en) Methods and systems for facilitating video preview sessions

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