CN111225242A - Video playing disaster tolerance method and device and computer storage medium - Google Patents

Video playing disaster tolerance method and device and computer storage medium Download PDF

Info

Publication number
CN111225242A
CN111225242A CN202010052088.7A CN202010052088A CN111225242A CN 111225242 A CN111225242 A CN 111225242A CN 202010052088 A CN202010052088 A CN 202010052088A CN 111225242 A CN111225242 A CN 111225242A
Authority
CN
China
Prior art keywords
video
playing
server
connection
terminal
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
CN202010052088.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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN202010052088.7A priority Critical patent/CN111225242A/en
Publication of CN111225242A publication Critical patent/CN111225242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server

Abstract

The application discloses a video playing disaster recovery method and device and a computer storage medium, and belongs to the technical field of internet. The method comprises the following steps: sending a first video playing request to a first server, playing a target video according to a first video resource, sending a second video playing request to a second server when the target video playing is detected to be abnormal, receiving a second video resource of the target video sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource. Because the second server and the terminal are kept in playing connection in a long connection mode, when the terminal is abnormally played, connection does not need to be established, the second server can be directly switched and connected, the target video can be continuously played by using the second video resource returned by the second server, and therefore switching time and video playing delay time are shortened, and video playing smoothness is guaranteed.

Description

Video playing disaster tolerance method and device and computer storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for video playback disaster recovery, and a computer storage medium.
Background
With the development of internet technology, users can learn various information by watching videos. In the process of playing the video, because a server providing playing resources for the terminal may have a playing fault, which causes the video playing of the terminal to be abnormal, and the playing fault cannot be predicted in advance, the terminal needs to perform disaster recovery processing when playing the video.
In the related art, for a target video to be played, before the target video is played, a terminal may first obtain a plurality of play addresses of the target video, then send a connection request to a first server pointed by a first play address based on the first play address in the plurality of play addresses to establish a play connection with the first server, and obtain a video resource of the target video from the first server through the play connection with the first server, and play the target video according to the obtained video resource. The first play address may be any one of a plurality of play addresses. In the process of playing the target video, when the target video is abnormally played due to the abnormality of the first server or interruption of playing connection between the first server and the first server, and the like, the terminal may try to send a connection request to a second server pointed by a second playing address based on the second playing address in the plurality of playing addresses so as to establish playing connection with the second server, where the second playing address is any one of the plurality of playing addresses except the first playing address. If the playing connection with the second server is successfully established, the video resource of the target video can be acquired from the second server through the established playing connection, so that the target video can be continuously played according to the acquired video resource. If the playing connection with the second server is not successfully established, the playing connection with other servers based on other playing addresses needs to be continuously tried to be established so as to continuously play the target video and realize the disaster recovery processing of video playing.
When the playing of the terminal is abnormal, the terminal needs to try to establish the playing connection with other servers first, the video playing can be continued after the playing connection is successfully established, and under the condition that the playing connection cannot be established successfully once, the connection request needs to be sent for many times, so that the video playing delay time is long, and the video playing is easy to be blocked and the like.
Disclosure of Invention
The embodiment of the application provides a video playing disaster recovery method, a video playing disaster recovery device and a computer storage medium, which can be used for solving the problems that the process of switching playing connection takes longer time and video playing is easy to be blocked when video playing is abnormal in the related technology. The technical scheme is as follows:
in a first aspect, a video playing disaster recovery method is provided, which is applied to a terminal, and the method includes:
sending a first video playing request to a first server through a playing connection with the first server, wherein the first video playing request carries a target video identifier;
receiving a first video resource of a target video sent by the first server based on the first video playing request, and playing the target video according to the first video resource;
when the target video playing is detected to be abnormal, sending a second video playing request to a second server through playing connection with the second server, wherein the second video playing request carries the target video identifier, the second server is any one of at least one server which is in playing connection with the terminal in a long connection mode, and the at least one server is a server which is in one-to-one correspondence with at least one playing address of the target video;
and receiving a second video resource of the target video sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource.
Optionally, before sending the first video playing request to the first server, the method includes:
acquiring a plurality of playing addresses of a target video, wherein the playing addresses correspond to a plurality of servers one to one, the first server is any one of the servers, and the at least one server is the other server except the first server in the servers;
respectively sending connection requests to the plurality of servers based on the plurality of playing addresses so as to establish playing connection with the plurality of servers;
after sending the first video playing request to the first server through the playing connection with the first server, the method further includes:
and maintaining the playing connection with the at least one server by means of a long connection.
Optionally, after sending the connection request to the plurality of servers respectively based on the plurality of broadcast addresses, the method further includes:
determining a server which establishes a play connection with the terminal first from the plurality of servers;
and determining a server which establishes playing connection with the terminal in the plurality of servers as the first server.
Optionally, the second video playing request further carries an abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played, and the second video resource is a video resource after the abnormal playing time point;
the continuing to play the target video according to the second video resource includes:
and according to the second video resource, continuously playing the target video by taking the abnormal playing time point as a starting point.
In a second aspect, a video playing disaster recovery method is provided, which is applied to a server, and the method includes:
receiving a connection request sent by a terminal based on a play address of a target video;
establishing a playing connection with the terminal based on the connection request;
through a long connection mode, the playing connection with the terminal is kept;
and if a second video playing request sent by the terminal through the playing connection is received, sending a second video resource of the target video to the terminal based on the second video playing request so that the terminal continues to play the target video based on the second video resource, wherein the second video playing request carries a target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
Optionally, the second video playing request further carries the abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played;
the sending the second video resource of the target video to the terminal based on the second video playing request comprises:
acquiring video resources of the target video according to the target video identifier;
according to the abnormal playing time point, determining video resources behind the abnormal playing time point from the video resources of the target video to obtain the second video resources;
and sending the second video resource to the terminal so that the terminal continues to play the target video based on the second video resource by taking the abnormal playing time point as a starting point.
In a third aspect, a video playing disaster recovery device is provided, which is applied to a terminal, and the device includes:
the first sending module is used for sending a first video playing request to a first server through a playing connection with the first server, wherein the first video playing request carries a target video identifier;
a first receiving module, configured to receive a first video resource of a target video sent by the first server based on the first video playing request, and play the target video according to the first video resource;
a second sending module, configured to send, when it is detected that the target video is abnormally played, a second video playing request to a second server through a playing connection with the second server, where the second video playing request carries the target video identifier, the second server is any one of at least one server that maintains playing connection with the terminal in a long connection manner, and the at least one server is a server that corresponds to at least one playing address of the target video one to one;
and the second receiving module is used for receiving a second video resource of the target video, which is sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource.
Optionally, the apparatus further comprises:
an obtaining module, configured to obtain multiple play addresses of a target video, where the multiple play addresses correspond to multiple servers in a one-to-one manner, a first server is any one of the multiple servers, and at least one server is another server of the multiple servers except the first server;
a third sending module, configured to send connection requests to the servers respectively based on the multiple playing addresses, so as to establish playing connection with the servers;
and the connection maintaining module is used for maintaining the playing connection with the at least one server in a long connection mode.
Optionally, the apparatus further comprises:
a first determining module, configured to determine, from the plurality of servers, a server that establishes a play connection with the terminal first;
a second determining module, configured to determine, as the first server, a server that establishes a play connection with the terminal first among the servers.
Optionally, the second video playing request further carries an abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played, and the second video resource is a video resource after the abnormal playing time point;
the second receiving module includes:
and the playing sub-module is used for continuing to play the target video by taking the abnormal playing time point as a starting point according to the second video resource.
In a fourth aspect, a video playing disaster recovery device is provided, which is applied to a server, and the device includes:
the receiving module is used for receiving a connection request sent by the terminal based on the playing address of the target video;
a connection establishing module, configured to establish a play connection with the terminal based on the connection request;
the connection maintaining module is used for maintaining the playing connection with the terminal in a long connection mode;
and the sending module is used for sending a second video resource of the target video to the terminal based on a second video playing request if the second video playing request sent by the terminal through the playing connection is received, so that the terminal continues to play the target video based on the second video resource, the second video playing request carries a target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
Optionally, the second video playing request further carries the abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played;
the sending module comprises:
the obtaining submodule is used for obtaining the video resource of the target video according to the target video identification;
the determining submodule is used for determining video resources behind the abnormal playing time point from the video resources of the target video according to the abnormal playing time point to obtain the second video resources;
and the sending submodule is used for sending the second video resource to the terminal so that the terminal can continue to play the target video based on the second video resource by taking the abnormal playing time point as a starting point.
In a fifth aspect, a video playing disaster recovery system is provided, where the system includes a terminal, a first server, and at least one second server;
the terminal is configured to implement the steps of any one of the methods described in the first aspect above;
the second server is configured to implement the steps of any one of the methods described in the second aspect above.
In a sixth aspect, a terminal is provided, which includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any one of the methods provided by the first aspect above.
In a seventh aspect, a server is provided, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of any one of the methods provided by the second aspect above.
In an eighth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium has stored thereon instructions, which when executed by a processor, implement the steps of any one of the methods provided in the first aspect.
In a ninth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium has stored thereon instructions, which when executed by a processor, implement the steps of any one of the methods provided in the second aspect above.
A tenth aspect provides a computer program product for implementing the above video playback disaster recovery method when the computer program product is executed.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, it is not necessary to send a request for establishing a playing connection to another server first, and the video is continuously played after the playing connection is successfully established, but the terminal can be directly switched and connected to another server, and the target video is continuously played by using the video resources returned by the other server, so that the switching time of the server and the delay time of the video playing are shortened, and the smoothness of the video playing is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a video playback disaster recovery system according to an embodiment of the present application;
fig. 2 is a schematic diagram of another video playback disaster recovery system according to an embodiment of the present application;
fig. 3 is a flowchart of a method for video playback disaster recovery according to an embodiment of the present application;
fig. 4 is a flowchart of another method for video playback disaster recovery according to an embodiment of the present application;
fig. 5 is a flowchart of another method for video playback disaster recovery according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a video playback disaster recovery device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another video playback disaster recovery device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Before explaining the embodiments of the present application in detail, an application scenario of the embodiments of the present application will be described. With the development of internet technology, users can learn various information by watching videos. In the video playing process, in order to ensure good watching experience of a user, disaster recovery processing must be done in advance in the video playing process. That is, when the video is abnormally played, the video needs to be switched to other playing addresses to obtain the video resource through the other playing addresses, so as to realize the continuous playing of the video. Because a certain time is needed to establish playing connection between the terminal and the server pointed by other playing addresses, the video playing is easy to be jammed and cannot be played smoothly. The application provides a video playing disaster recovery method which can shorten the delay time of video playing and reduce the occurrence of video playing blockage.
Next, an implementation environment related to the embodiments of the present application will be described.
Fig. 1 is a video playback disaster recovery system 100 according to an embodiment of the present application, where the system 100 includes a plurality of servers 101 and terminals 102. The terminal 102 and any one of the servers 101 may communicate via a wired or wireless connection. Any one of the terminals 102 may acquire a video resource of the target video from the server 101 to play the target video. The video resources of the target video are stored in the plurality of servers 101, and the video resources of the target video may be acquired from another server. Illustratively, the plurality of servers 101 are a plurality of servers corresponding to a plurality of play addresses of the target video one by one, that is, servers to which the plurality of play addresses point respectively.
The plurality of servers 101 may include a first server 1011 and at least one second server 1012. The first server 1011 is a server that provides video resources for the terminal 102 currently from among the plurality of servers 101, so that the terminal 102 performs video playing, that is, a server that sends video resources to the terminal 102 through a playing connection. The second server 1012 is a server that maintains a play connection with the terminal 102 by way of a long connection while the first server 1011 provides the terminal 102 with video resources. When the terminal 102 detects that the video playing is abnormal, it may directly switch to any second server 1012, and obtain the video resource through the playing connection maintained between the terminal and the second server 1012 to continue playing the video.
As an example, when the terminal 102 establishes a broadcast connection with a plurality of servers 101, the terminal may establish a short connection with a first server 1011 and a long connection with at least one second server 1012. The short connection means that when the playing connection between the terminal 102 and the first server 1011 is interrupted, the first server 1011 stops communicating with the terminal 102. The long connection means that the connection is not disconnected even if no video resource is transmitted during the connection maintenance period, the connection state is continuously maintained, and when the video playing abnormality is detected, the video resource can be directly transmitted based on the maintained connection. If the terminal 102 needs to acquire the video resource from the first server 1011 again, it needs to send a connection request to the first server 1011 first, and after establishing a play connection with the first server 1011, the terminal may acquire the video resource of the target video from the first server 1011 through the play connection with the first server 1011.
In addition, during the process of establishing the broadcast connection, the terminal 102 may also establish a long connection with the plurality of servers 101, that is, the broadcast connection between the terminal 102 and the first server 1011 and the at least one second server 1012 is maintained without interruption in a long connection manner. In the embodiment of the present application, the connection method adopted between the terminal 102 and the first server 1011 is not limited, and may be any of the above-mentioned short connection or long connection.
In the embodiment of the present application, each terminal 102 may be a mobile phone, a desktop computer, a notebook computer, and the like, and fig. 1 illustrates only 1 mobile phone by way of example, and does not limit the embodiment of the present application.
Fig. 2 is another video playback disaster recovery system according to an embodiment of the present application, where the system 200 includes an origin server 201, a plurality of transit servers 202, and a terminal 203. The terminal 203 and the relay server 202 are connected by a wired or wireless connection to communicate with each other, and the terminal 203 and the source server 201 may communicate with each other by a wired or wireless connection.
The source server 201 may receive the video resource uploaded by the user, and store the video resource, or send the video resource to the plurality of transit servers 202. When the relay server 202 receives the video playing request from the terminal 203, the relay server 202 issues the video resource of the target video to the terminal 203 based on the video playing request. If the video resource of the target video does not exist on the transit server 202, the transit server 202 may send a video resource acquisition request to the source server 201 to acquire the video resource of the target video from the source server 201 and send the video resource to the terminal 203. The terminal 203 may acquire the target video resource from any of the transit servers 202 to play the target video.
It should be noted that the transit servers 202 may include a first server 2021 and at least one second server 2022. Similarly, when the terminal 203 establishes a play connection with the plurality of transit servers 202, the terminal may establish a short connection with the first server 2021 and a long connection with at least one second server 2022, and the play connection is ensured to be uninterrupted in the process of playing the target video by the terminal in a long connection manner. The short connection means that when the playing connection between the terminal 203 and the first server 2021 is interrupted, the first server 2021 stops the communication with the terminal 203. If the terminal 203 needs to acquire the video resource from the first server 2021 again, it needs to send a connection request to the first server 2021 first, and after the playing connection is established with the first server 2021, the video resource of the target video may be continuously acquired from the first server 2021 through the playing connection with the first server 2021.
In addition, during the process of establishing the broadcast connection, the terminal 203 may also establish a long connection with the plurality of transit servers 202, that is, the broadcast connection between the terminal 203 and the first server 2021 and the at least one second server 2022 is maintained without interruption in a long connection manner. In the embodiment of the present application, the connection method adopted between the terminal 203 and the first server 2021 is not limited, and may be any of the above-mentioned short connection or long connection.
In the embodiment of the present application, each terminal 203 may be a mobile phone, a desktop computer, a notebook computer, and the like, and fig. 2 illustrates only 2 mobile phones by way of example, and does not limit the embodiment of the present application.
Fig. 3 is a flowchart of a method for video playback disaster recovery according to an embodiment of the present application, where the method is used for the terminal 102 in the video playback disaster recovery system 100 shown in fig. 1 or the terminal 203 in the video playback disaster recovery system 200 shown in fig. 2. Referring to fig. 3, the method comprises the steps of:
step 301: and sending a first video playing request to the first server through a playing connection with the first server, wherein the first video playing request carries the target video identifier.
Step 302: and receiving a first video resource of the target video sent by the first server based on the first video playing request, and playing the target video according to the first video resource.
Step 303: when the target video playing is detected to be abnormal, a second video playing request is sent to a second server through playing connection with the second server, the second video playing request carries a target video identifier, the second server is any one of at least one server which is in playing connection with the terminal in a long connection mode, and the at least one server is a server which is in one-to-one correspondence with at least one playing address of the target video.
Step 304: and receiving a second video resource of the target video sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource.
Optionally, before sending the first video playing request to the first server, the method includes:
acquiring a plurality of playing addresses of a target video, wherein the playing addresses correspond to a plurality of servers one to one, the first server is any one of the servers, and the at least one server is other servers except the first server;
respectively sending connection requests to the servers based on the playing addresses so as to establish playing connection with the servers;
after sending the first video playing request to the first server through the playing connection with the first server, the method further includes:
a play connection is maintained with the at least one server by means of a long connection.
Optionally, after the sending the connection request to the plurality of servers respectively based on the plurality of broadcast addresses, the method further includes:
determining a server which establishes a play connection with the terminal first from the plurality of servers;
and determining the server which establishes the playing connection with the terminal in the plurality of servers as the first server.
Optionally, the second video playing request further carries an abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played, and the second video resource is a video resource after the abnormal playing time point;
the continuing to play the target video according to the second video resource includes:
and according to the second video resource, continuing to play the target video by taking the abnormal playing time point as a starting point.
In the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, the terminal does not need to send a request for establishing a playing connection to other servers first, and continues to play the video after the playing connection is successfully established, but can be directly switched and connected to other servers, and the target video is continuously played by using the video resources returned by other servers, so that the switching time of the servers and the delay time of the video playing are shortened, the smoothness of the video playing is ensured, and the video watching experience of the user is improved.
All the above optional technical solutions can be combined arbitrarily to form an optional embodiment of the present application, and the present application embodiment is not described in detail again.
Fig. 4 is a flowchart of another method for video playback disaster recovery according to an embodiment of the present application, where the method is used for the server 101 in the video playback disaster recovery system 100 shown in fig. 1 or the transit server 202 in the video playback disaster recovery system 200 shown in fig. 2. Referring to fig. 4, the method includes the steps of:
step 401: and receiving a connection request sent by the terminal based on the play address of the target video.
Step 402: and establishing a playing connection with the terminal based on the connection request.
Step 403: and the playing connection with the terminal is maintained in a long connection mode.
Step 404: and if a second video playing request sent by the terminal through the playing connection is received, sending a second video resource of the target video to the terminal based on the second video playing request so that the terminal continues to play the target video based on the second video resource, wherein the second video playing request carries a target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
Optionally, the second video playing request further carries the abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played;
the sending the second video resource of the target video to the terminal based on the second video playing request includes:
acquiring video resources of the target video according to the target video identifier;
according to the abnormal playing time point, determining video resources behind the abnormal playing time point from the video resources of the target video to obtain the second video resources;
and sending the second video resource to the terminal so that the terminal continues to play the target video with the abnormal playing time point as a starting point based on the second video resource.
In the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, the terminal does not need to send a request for establishing a playing connection to other servers first, and continues to play the video after the playing connection is successfully established, but can be directly switched and connected to other servers, and the target video is continuously played by using the video resources returned by other servers, so that the switching time of the servers and the delay time of the video playing are shortened, the smoothness of the video playing is ensured, and the video watching experience of the user is improved.
All the above optional technical solutions can be combined arbitrarily to form an optional embodiment of the present application, and the present application embodiment is not described in detail again.
Fig. 5 is a flowchart of another video playing disaster recovery method according to an embodiment of the present application, where the method is used in the video playing disaster recovery system 100 shown in fig. 1 or the video playing disaster recovery system 200 shown in fig. 2. Referring to fig. 5, the method includes the steps of:
step 501: the terminal acquires a plurality of playing addresses of the target video, and the plurality of playing addresses correspond to the plurality of servers one to one.
The target video is a video to be played by the terminal. The plurality of broadcast addresses are different, and different broadcast addresses point to different servers. Each of the plurality of servers may store a video resource of the target video, or may obtain a video resource of the target video from a source server of the target video.
When the terminal determines that the target video needs to be played, a plurality of playing addresses of the target video can be obtained first, so that the target video can be played through the plurality of playing addresses.
Step 502: and the terminal respectively sends connection requests to the servers based on the plurality of playing addresses so as to establish playing connection with the servers.
The connection request is used for requesting to establish playing connection with a corresponding server. The terminal may send a connection request to the server to which each play address points to request to establish a play connection with the corresponding server.
Step 503: and the plurality of servers establish playing connection with the terminal based on the connection request.
In an embodiment of the present application, the plurality of servers includes a first server and at least one second server. The first server is a server that determines to provide the video resource of the target video to the terminal, such as a server that determines to initially send the video resource of the target video to the terminal, and the first server may be any one of a plurality of servers. When the terminal is abnormal in playing, the terminal needs to be switched to the second server to acquire the video resource of the target video from the second server.
For the plurality of servers, the response time of different servers to the connection request may be different, so that in order to facilitate a user to acquire the video resource of the target video as fast as possible and to play the target video fast, when the connection is established, the first server may be determined according to the response speed of the server.
For example, a server that establishes a broadcast connection with the terminal first is determined from among the plurality of servers, and the server that establishes a broadcast connection with the terminal first is determined as the first server.
In addition, after the connection with the terminal is established, the communication quality between different servers and the terminal may also be different, so that in order to facilitate the user to keep smooth playing for a long time, the first server may be determined according to the communication quality between the server and the terminal when the connection is established.
For example, one server having the best communication quality with the terminal is determined from the plurality of servers, and the server having the best communication quality is determined as the first server.
As an example, after the first server is determined, the first server may establish a long connection with the terminal or may establish a short connection, which is not limited in this application. For example, a short connection is established between the first server and the terminal, and a long connection is established between the at least one second server and the terminal.
It should be noted that the short connection means that when both communication parties have data interaction, a connection is established, and after the data transmission is completed, the connection is disconnected, that is, only one service is transmitted in each connection, so that the data processing speed is high, and different services adopt different connections, thereby facilitating service differentiation. The long connection means that a plurality of data packets can be continuously transmitted on one connection, and during the connection holding period, if no data packet is transmitted, the connection is not disconnected, the connection state is continuously maintained, and when the data packet is detected to be transmitted, the data packet can be directly transmitted based on the maintained connection. The long connection is mostly used for communication with frequent operation and point-to-point, because each connection needs three-step handshake, and the process of establishing connection by three-step handshake needs a certain time, generally, the long connection mode can reduce the time consumed in the process of establishing connection, so that the service can be switched freely without interruption. For example: the connection between databases uses long connections, if frequent communication uses short connections, socket (a socket, an abstraction layer, through which an application can send or receive data, and can perform operations such as opening, reading, writing, and closing like files) errors may be caused, and frequent socket creation is also a waste of resources. However, HTTP (hypertext transfer protocol) services of websites generally use short links, because long links consume certain resources and have a large amount of concurrency for the service end.
The long connection can keep a long-time connection state, and the playing address of the playing video can be conveniently switched back and forth. The short connection may increase the data transmission speed and the selection of the long connection and the short connection may be determined by the terminal or the server.
After the first server is connected with the terminal, the terminal sends a first video playing request to the first server through a playing connection between the terminal and the first server so as to request the first server to issue a target video for playing.
Step 504: the terminal sends a first video playing request to the first server through a playing connection between the terminal and the first server, and keeps the playing connection between the terminal and at least one second server through a long connection mode, wherein the first video playing request carries a target video identifier.
The target video identifier is used to uniquely identify the target video, and may be a name or an ID (Identity Document) of the target video. The first video playing request is used for requesting the first server to acquire the video resource of the target video and returning the acquired video resource to the terminal.
It should be noted that, after establishing connection with the first server, the terminal may immediately send a first video playing request to the first server; or after the playing connection is established with the first server, in the process of establishing long connection with the second server, sending a first video playing request to the first server; the method may further include sending the first video playing request to the first server after the connection is established with the first server and the at least one second server, where the triggering time for the terminal to send the first video playing request to the first server is not limited, and one of the above listed manners may be adopted.
Step 505: the first server sends a first video resource of the target video to the terminal based on the first video playing request.
After the first video playing request is sent to the first server in step 504, the first server may obtain the video resource of the target video according to the target video identifier after receiving the first video playing request, and send the obtained video resource to the terminal.
If the first server stores the video resource of the target video, the first server can directly acquire the video resource of the target video from the stored video resource according to the target video identifier. If the first server does not store the video resource of the target video, the first server may send a video resource acquisition request to a source server of the target video according to the target video identifier, so as to acquire the video resource of the target video from the source server. And the video resource acquisition request carries a target video identifier.
Wherein, at least one server is other servers except the first server in the plurality of servers. In a possible implementation manner, while the first server establishes a connection with the terminal, or after the first server establishes a connection with the terminal, the playing connection with the at least one server is maintained in a long connection manner, and the triggering time for establishing the long connection is not limited in the present application.
It should be noted that, for a second server in the at least one server, the second server may receive a connection request sent by the terminal based on the play address of the target video, and establish a play connection with the terminal based on the connection request; and the playing connection with the terminal is maintained in a long connection mode. Wherein the second server is any one of the at least one server.
The method for maintaining the play connection of the long connection is not limited, and the effect of uninterrupted connection in the long connection can be realized. As an example, a long connection may be maintained in the form of a heartbeat, which is a particular implementation of a long connection. That is, the terminal sends a connection instruction to the second server every preset time period, and the connection instruction may be a self-defined instruction. And after receiving the connection instruction, the second server sends response information of the connection instruction to the terminal, and the connection between the second server and the terminal is kept uninterrupted in a manner similar to 'heartbeat'.
Step 506: the terminal receives a first video playing resource sent by the first server, and plays the target video according to the first video playing resource.
In a possible implementation manner, after receiving the video playing resource, the terminal may directly play the target video according to the first video resource, or may buffer the first video resource first and then play the target video according to the buffered first video resource, which is not limited in this application.
Step 507: and when the target video playing is detected to be abnormal, sending a second video playing request to the second server through playing connection with the second server, wherein the second video playing request carries the target video identifier.
The second video playing request is used for requesting the second server to acquire a second video resource of the target video and sending the second video resource to the terminal.
It should be noted that the playback abnormality may include a playback interruption and a situation where the data in the buffer area is empty, for example, the detection of the playback abnormality of the target video may include the following two possibilities:
1) in the process that the terminal plays the target video according to the first video resource, when the target video stops playing or the continuous pause time length is greater than or equal to the pause time length threshold value, it is determined that the target video is abnormal to play.
The card pause time threshold may be preset by the terminal or the server, and may be, for example, 3 minutes or 5 minutes.
2) In the process that the terminal firstly caches the first video playing resource and then plays the target video according to the cached first video resource, if the data of the cache region is detected to be empty, namely, the cache region has no video resource, the target video playing is determined to be abnormal.
It should be noted that, when the data in the buffer area is empty, there is no video resource to be played subsequently, and further subsequent video playing may be interrupted.
It should be further noted that, in the embodiment of the present application, the description is only given by taking an example that the terminal sends the second video playing request to one second server and acquires the video resource from the second server, but in other implementation manners, the terminal may also send the second video playing request to at least one second server when detecting that the target video playing is abnormal, and then receive the second video resource sent by the second server that responds to the second video playing request first. And in the process of transmitting the second video resource between the terminal and the second server, the terminal does not transmit the second video resource in the playing connection between the terminal and other second servers. That is, the terminal receives only the second video asset from one second server.
In addition, in order to facilitate the user to continue watching the target video from the abnormal playing time point, unnecessary data transmission between the second server and the terminal is reduced, and the second video playing request can also carry the abnormal playing time point. The abnormal playing time point is the playing time point when the target video is abnormally played, so as to request the second server to send the video resource after the playing time point to the terminal. Correspondingly, the second video resource is a video resource after the abnormal playing time point in the target video.
Step 508: and the second server sends a second video resource of the target video to the terminal based on the second video playing request.
For a second server which keeps playing connection with the terminal in a long connection mode, if a second video playing request sent by the terminal through the playing connection is received, a second video resource of the target video is sent to the terminal based on the second video playing request, so that the terminal continues to play the target video based on the second video resource.
In a possible implementation manner, when any one of the at least one second server receives the second video playing request, the second server may determine a second video resource of the target video based on the target video identifier carried in the second video playing request, and send the second video resource to the terminal, so that the terminal plays the target video based on the second video resource.
In addition, unnecessary data transmission between the second server and the terminal is also reduced in order to facilitate the user to continue watching the target video from a point in time when the playback is abnormal. As an example, when the second video playing request may also carry an abnormal playing time point, based on the second video playing request, the implementation process of sending the second video resource of the target video to the terminal is as follows: and acquiring video resources of the target video according to the target video identifier, determining video resources after the abnormal playing time point from the video resources of the target video according to the abnormal playing time point to obtain a second video resource, and sending the second video resource to the terminal.
Step 509: and the terminal receives the second video resource sent by the second server and continues to play the target video according to the second video resource.
In a possible implementation manner, after receiving the second video resource, the terminal continues to play the target video with the abnormal play time point as a starting point according to the second video resource.
It should be noted that, because the established playing connection between the terminal and the at least one second server is maintained without interruption in a long connection manner, when the terminal continues to play the target video according to the second video resource, if it detects that the playing is abnormal, the steps 507-509 are executed in a loop to ensure that the target video playing of the terminal is not interrupted.
In the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, the terminal does not need to send a request for establishing a playing connection to other servers first, and continues to play the video after the playing connection is successfully established, but can be directly switched and connected to other servers, and the target video is continuously played by using the video resources returned by other servers, so that the switching time of the servers and the delay time of the video playing are shortened, the smoothness of the video playing is ensured, and the video watching experience of the user is improved.
Fig. 6 is a schematic structural diagram of a video playback disaster recovery apparatus according to an embodiment of the present application, where the apparatus 600 is applied to a terminal, and may include:
the first sending module 601 is configured to send a first video playing request to a first server through a playing connection with the first server, where the first video playing request carries a target video identifier;
a first receiving module 602, configured to receive a first video resource of a target video sent by a first server based on a first video playing request, and play the target video according to the first video resource;
a second sending module 603, configured to send, when it is detected that the target video is abnormally played, a second video playing request to a second server through a playing connection with the second server, where the second video playing request carries a target video identifier, the second server is any one of at least one server that maintains playing connection with the terminal in a long connection manner, and the at least one server is a server that corresponds to at least one playing address of the target video one to one;
the second receiving module 604 is configured to receive a second video resource of the target video, which is sent by the second server based on the second video playing request, and continue to play the target video according to the second video resource.
Optionally, the apparatus further comprises:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of playing addresses of a target video, the playing addresses correspond to a plurality of servers one to one, a first server is any one of the servers, and at least one server is other than the first server in the servers;
the third sending module is used for respectively sending a sending connection request to the plurality of servers based on the plurality of playing addresses so as to establish playing connection with the plurality of servers;
and the connection maintaining module is used for maintaining the playing connection with at least one server in a long connection mode.
Optionally, the apparatus further comprises:
the first determining module is used for determining a server which establishes playing connection with the terminal firstly from a plurality of servers;
and the second determining module is used for determining the server which establishes the playing connection with the terminal in the plurality of servers as the first server.
Optionally, the second video playing request further carries an abnormal playing time point, where the abnormal playing time point is a playing time point when the target video is abnormally played, and the second video resource is a video resource after the abnormal playing time point;
a second receiving module comprising:
and the playing sub-module is used for continuously playing the target video by taking the abnormal playing time point as a starting point according to the second video resource.
In the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, the terminal does not need to send a request for establishing a playing connection to other servers first, and continues to play the video after the playing connection is successfully established, but can be directly switched and connected to other servers, and the target video is continuously played by using the video resources returned by other servers, so that the switching time of the servers and the delay time of the video playing are shortened, the smoothness of the video playing is ensured, and the video watching experience of the user is improved.
It should be noted that: in the video playing disaster recovery device provided in the above embodiment, when the target video continues to be played, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the video playing disaster recovery device and the video playing disaster recovery method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 7 is a schematic structural diagram of a video playback disaster recovery apparatus according to an embodiment of the present application, where the apparatus 700 is applied to a server, and may include:
a receiving module 701, configured to receive a connection request sent by a terminal based on a play address of a target video;
a connection establishing module 702, configured to establish a play connection with the terminal based on the connection request;
a connection maintaining module 703, configured to maintain a playing connection with the terminal in a long connection manner;
a sending module 704, configured to send, based on a second video playing request, a second video resource of the target video to the terminal if the second video playing request sent by the terminal through the playing connection is received, so that the terminal continues to play the target video based on the second video resource, where the second video playing request carries the target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
Optionally, the second video playing request further carries an abnormal playing time point, where the abnormal playing time point is a playing time point when the target video playing is abnormal;
a sending module 704, comprising:
the acquisition submodule is used for acquiring video resources of the target video according to the target video identification;
the determining submodule is used for determining video resources behind the abnormal playing time point from the video resources of the target video according to the abnormal playing time point to obtain second video resources;
and the sending submodule is used for sending the second video resource to the terminal so that the terminal can continue to play the target video based on the second video resource by taking the abnormal playing time point as a starting point.
In the embodiment of the application, when the terminal plays the target video based on the video resource returned by the first server, the terminal can also keep playing connection with other servers corresponding to the playing address of the target video in a long connection mode, so that when the target video is detected to be abnormally played, the terminal can directly send the video playing request to other servers through the kept playing connection without establishing playing connection with other servers, and the target video is continuously played by using the video resource returned by other servers. That is, when the terminal has an abnormal playing condition, the terminal does not need to send a request for establishing a playing connection to other servers first, and continues to play the video after the playing connection is successfully established, but can be directly switched and connected to other servers, and the target video is continuously played by using the video resources returned by other servers, so that the switching time of the servers and the delay time of the video playing are shortened, the smoothness of the video playing is ensured, and the video watching experience of the user is improved.
It should be noted that: in the video playing disaster recovery device provided in the above embodiment, when the target video continues to be played, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the video playing disaster recovery device and the video playing disaster recovery method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 8 is a block diagram of a terminal 800 according to an embodiment of the present application. The terminal 800 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio La11er III, motion video Experts compression standard Audio layer 3), an MP4 player (Moving Picture Experts Group Audio La11er IV, motion video Experts compression standard Audio layer 4), a notebook computer, or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 800 includes: a processor 801 and a memory 802.
The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate array 11), and a PLA (Programmable Logic array). The processor 801 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 802 is used to store at least one instruction for execution by the processor 801 to implement the video playback disaster recovery method provided by the method embodiments of the present application.
The display 803 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 803 is a touch display screen, the display screen 803 also has the ability to capture touch signals on or over the surface of the display screen 803. The touch signal may be input to the processor 801 as a control signal for processing. At this point, the display 803 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 803 may be one, providing the front panel of the terminal 800; in other embodiments, the display 803 can be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in still other embodiments, the display 803 may be a flexible display, disposed on a curved surface or on a folded surface of the terminal 800. Even more, the display 803 may be arranged in a non-rectangular irregular figure, i.e., a shaped screen. The display 803 can be made of LCD (liquid crystal display) 11, OLED (Organic Light-Emitting Diode) or other materials.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is not intended to be limiting of terminal 800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The embodiment of the present application further provides a non-transitory computer-readable storage medium, and when an instruction in the storage medium is executed by a processor of a terminal, the terminal is enabled to execute the video playing disaster recovery method according to the above embodiment.
The embodiment of the present application further provides a computer program product containing instructions, which when run on a terminal, enables the terminal to execute the video playing disaster recovery method provided by the foregoing embodiment.
Fig. 9 is a schematic structural diagram of a server 900 according to an embodiment of the present application, where the server 900 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 901 and one or more memories 902, where the memory 902 stores at least one instruction, and the at least one instruction is loaded and executed by the processors 901 to implement the video playback disaster recovery method provided by the foregoing method embodiments. Certainly, the server 900 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 900 may also include other components for implementing device functions, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium is further provided, and the computer-readable storage medium stores instructions that when executed by a processor implement the video playback disaster recovery method.
In an exemplary embodiment, a computer program product is also provided, which, when executed, is configured to implement the video playback disaster recovery method described above.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A video playing disaster recovery method is applied to a terminal, and the method comprises the following steps:
sending a first video playing request to a first server through a playing connection with the first server, wherein the first video playing request carries a target video identifier;
receiving a first video resource of a target video sent by the first server based on the first video playing request, and playing the target video according to the first video resource;
when the target video playing is detected to be abnormal, sending a second video playing request to a second server through playing connection with the second server, wherein the second video playing request carries the target video identifier, the second server is any one of at least one server which is in playing connection with the terminal in a long connection mode, and the at least one server is a server which is in one-to-one correspondence with at least one playing address of the target video;
and receiving a second video resource of the target video sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource.
2. The method of claim 1, wherein prior to sending the first video playback request to the first server, comprising:
acquiring a plurality of playing addresses of a target video, wherein the playing addresses correspond to a plurality of servers one to one, the first server is any one of the servers, and the at least one server is the other server except the first server in the servers;
respectively sending connection requests to the plurality of servers based on the plurality of playing addresses so as to establish playing connection with the plurality of servers;
after sending the first video playing request to the first server through the playing connection with the first server, the method further includes:
and maintaining the playing connection with the at least one server by means of a long connection.
3. The method of claim 2, wherein after sending connection requests to the plurality of servers based on the plurality of broadcast addresses, respectively, further comprising:
determining a server which establishes a play connection with the terminal first from the plurality of servers;
and determining a server which establishes playing connection with the terminal in the plurality of servers as the first server.
4. The method according to claim 1, wherein the second video playing request further carries an abnormal playing time point, the abnormal playing time point is a playing time point when the target video playing is abnormal, and the second video resource is a video resource after the abnormal playing time point;
the continuing to play the target video according to the second video resource includes:
and according to the second video resource, continuously playing the target video by taking the abnormal playing time point as a starting point.
5. A video playing disaster recovery method is applied to a server, and the method comprises the following steps:
receiving a connection request sent by a terminal based on a play address of a target video;
establishing a playing connection with the terminal based on the connection request;
through a long connection mode, the playing connection with the terminal is kept;
and if a second video playing request sent by the terminal through the playing connection is received, sending a second video resource of the target video to the terminal based on the second video playing request so that the terminal continues to play the target video based on the second video resource, wherein the second video playing request carries a target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
6. The method according to claim 5, wherein the second video playing request further carries the abnormal playing time point, and the abnormal playing time point is a playing time point when the target video playing is abnormal;
the sending the second video resource of the target video to the terminal based on the second video playing request comprises:
acquiring video resources of the target video according to the target video identifier;
according to the abnormal playing time point, determining video resources behind the abnormal playing time point from the video resources of the target video to obtain the second video resources;
and sending the second video resource to the terminal so that the terminal continues to play the target video based on the second video resource by taking the abnormal playing time point as a starting point.
7. A video playing disaster recovery device is applied to a terminal, and the device comprises:
the first sending module is used for sending a first video playing request to a first server through a playing connection with the first server, wherein the first video playing request carries a target video identifier;
a first receiving module, configured to receive a first video resource of a target video sent by the first server based on the first video playing request, and play the target video according to the first video resource;
a second sending module, configured to send, when it is detected that the target video is abnormally played, a second video playing request to a second server through a playing connection with the second server, where the second video playing request carries the target video identifier, the second server is any one of at least one server that maintains playing connection with the terminal in a long connection manner, and the at least one server is a server that corresponds to at least one playing address of the target video one to one;
and the second receiving module is used for receiving a second video resource of the target video, which is sent by the second server based on the second video playing request, and continuing to play the target video according to the second video resource.
8. A video playback disaster recovery apparatus, applied to a server, the apparatus comprising:
the receiving module is used for receiving a connection request sent by the terminal based on the playing address of the target video;
a connection establishing module, configured to establish a play connection with the terminal based on the connection request;
the connection maintaining module is used for maintaining the playing connection with the terminal in a long connection mode;
and the sending module is used for sending a second video resource of the target video to the terminal based on a second video playing request if the second video playing request sent by the terminal through the playing connection is received, so that the terminal continues to play the target video based on the second video resource, the second video playing request carries a target video identifier, and the second video playing request is sent by the terminal when the target video playing abnormality is detected.
9. A video playing disaster recovery system is characterized by comprising a terminal, a first server and at least one second server;
the terminal is used for realizing the method of any one of claims 1 to 4;
the second server is configured to implement the method of any one of claims 5 to 6.
10. A terminal, characterized in that the terminal comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of the method of any of the above claims 1 to 4.
11. A server, characterized in that the server comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the steps of the method of any of the above claims 5 to 6.
12. A computer-readable storage medium having stored thereon instructions which, when executed by a processor, carry out the method of any of claims 1-4 or the method of any of claims 5-6.
CN202010052088.7A 2020-01-17 2020-01-17 Video playing disaster tolerance method and device and computer storage medium Pending CN111225242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010052088.7A CN111225242A (en) 2020-01-17 2020-01-17 Video playing disaster tolerance method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010052088.7A CN111225242A (en) 2020-01-17 2020-01-17 Video playing disaster tolerance method and device and computer storage medium

Publications (1)

Publication Number Publication Date
CN111225242A true CN111225242A (en) 2020-06-02

Family

ID=70829636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010052088.7A Pending CN111225242A (en) 2020-01-17 2020-01-17 Video playing disaster tolerance method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN111225242A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911335A (en) * 2021-02-03 2021-06-04 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN113242403A (en) * 2021-03-31 2021-08-10 普天和平科技有限公司 Server and video playing system

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005606A (en) * 2006-12-31 2007-07-25 华为技术有限公司 Method and device for reducing medium playing delay
CN101068339A (en) * 2007-06-01 2007-11-07 华为技术有限公司 Method, server and user end for realizing video frequency requested program broadcasting-like services
CN103686430A (en) * 2013-12-24 2014-03-26 中国联合网络通信集团有限公司 Video file acquisition method and device
CN104244448A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Method and system for reducing data transmission delay
CN104270472A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system
CN105024860A (en) * 2015-07-23 2015-11-04 上海斐讯数据通信技术有限公司 Remote communication control method and system
CN106658184A (en) * 2015-11-02 2017-05-10 中兴通讯股份有限公司 Live video playing disaster tolerance method and device
CN107395686A (en) * 2017-06-28 2017-11-24 甘棠软件系统(上海)有限公司 The method, apparatus and system of the long connection of switching
CN107689878A (en) * 2016-08-04 2018-02-13 创盛视联数码科技(北京)有限公司 TCP length connection SiteServer LBSs based on name scheduling
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
US20180248905A1 (en) * 2017-02-24 2018-08-30 Ciena Corporation Systems and methods to detect abnormal behavior in networks
US20180307773A1 (en) * 2015-12-30 2018-10-25 Alibaba Group Holding Limited Short link processing to improve service efficiency
CN109561137A (en) * 2018-11-14 2019-04-02 广州虎牙信息科技有限公司 Establish method, apparatus, terminal device and the medium of P2P network
CN110493353A (en) * 2019-09-05 2019-11-22 香港乐蜜有限公司 Communication means, device and server

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005606A (en) * 2006-12-31 2007-07-25 华为技术有限公司 Method and device for reducing medium playing delay
CN101068339A (en) * 2007-06-01 2007-11-07 华为技术有限公司 Method, server and user end for realizing video frequency requested program broadcasting-like services
CN104244448A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Method and system for reducing data transmission delay
CN103686430A (en) * 2013-12-24 2014-03-26 中国联合网络通信集团有限公司 Video file acquisition method and device
CN104270472A (en) * 2014-10-24 2015-01-07 杭州高达软件系统股份有限公司 Remote service invocation method, device and system
CN105024860A (en) * 2015-07-23 2015-11-04 上海斐讯数据通信技术有限公司 Remote communication control method and system
CN106658184A (en) * 2015-11-02 2017-05-10 中兴通讯股份有限公司 Live video playing disaster tolerance method and device
US20180307773A1 (en) * 2015-12-30 2018-10-25 Alibaba Group Holding Limited Short link processing to improve service efficiency
CN107689878A (en) * 2016-08-04 2018-02-13 创盛视联数码科技(北京)有限公司 TCP length connection SiteServer LBSs based on name scheduling
US20180248905A1 (en) * 2017-02-24 2018-08-30 Ciena Corporation Systems and methods to detect abnormal behavior in networks
CN107395686A (en) * 2017-06-28 2017-11-24 甘棠软件系统(上海)有限公司 The method, apparatus and system of the long connection of switching
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
CN109561137A (en) * 2018-11-14 2019-04-02 广州虎牙信息科技有限公司 Establish method, apparatus, terminal device and the medium of P2P network
CN110493353A (en) * 2019-09-05 2019-11-22 香港乐蜜有限公司 Communication means, device and server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911335A (en) * 2021-02-03 2021-06-04 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN112911335B (en) * 2021-02-03 2022-05-27 烽火通信科技股份有限公司 Service scheduling method based on video coding, video server and set top box
CN113242403A (en) * 2021-03-31 2021-08-10 普天和平科技有限公司 Server and video playing system

Similar Documents

Publication Publication Date Title
US10643666B2 (en) Video play method and device, and computer storage medium
US20220053068A1 (en) Methods, apparatuses and computer storage media for applet state synchronization
CN108566561B (en) Video playing method, device and storage medium
KR102570799B1 (en) Presentation of computing environment on multiple devices
US20220368733A1 (en) Interaction method and apparatus, and electronic device
US20230007188A1 (en) Video source switching method, playing method, apparatus, device, and storage medium
CN112350981B (en) Method, device and system for switching communication protocol
CN113037929B (en) Information relay output method and device, electronic equipment and storage medium
CN106658064B (en) Virtual gift display method and device
CN109194972B (en) Live stream acquisition method and device, computer equipment and storage medium
CN107707972B (en) Data processing method, device and system for screen sharing and electronic equipment
US9401972B2 (en) Virtual file transmission system and method of transmitting virtual file thereof
US20220409999A1 (en) Rendering method and apparatus
US11962853B2 (en) Computing device upgrading system over a wireless network
US20230285854A1 (en) Live video-based interaction method and apparatus, device and storage medium
US20240089538A1 (en) Port-connected television upgrader device
CN111225242A (en) Video playing disaster tolerance method and device and computer storage medium
CN111918098A (en) Video processing method and device, electronic equipment, server and storage medium
US11838589B2 (en) Port-connected television upgrader device
CN114647390B (en) Enhanced screen sharing method and system and electronic equipment
US10901679B2 (en) Mirroring of screens
JP2020503634A (en) Personal homepage display method and apparatus, terminal, and server
CN112689172A (en) Program playing method and device, set top box and storage medium
CN112689012A (en) Cross-network proxy communication method and device
KR101380531B1 (en) Method and handset for providing fault tolerance and system thereof

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200602

RJ01 Rejection of invention patent application after publication