CN111935507A - Video switching method and device - Google Patents

Video switching method and device Download PDF

Info

Publication number
CN111935507A
CN111935507A CN202010836040.5A CN202010836040A CN111935507A CN 111935507 A CN111935507 A CN 111935507A CN 202010836040 A CN202010836040 A CN 202010836040A CN 111935507 A CN111935507 A CN 111935507A
Authority
CN
China
Prior art keywords
video
link
client
subsequent
stream
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
CN202010836040.5A
Other languages
Chinese (zh)
Inventor
崔英林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lianshang Network Technology Co Ltd
Original Assignee
Shanghai Lianshang Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN202010836040.5A priority Critical patent/CN111935507A/en
Publication of CN111935507A publication Critical patent/CN111935507A/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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • 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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23406Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving management of server-side video buffer
    • 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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23424Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement

Abstract

The embodiment of the application discloses a video switching method and video switching equipment. One embodiment of a video switching method includes: establishing a video link; transmitting the stream fragments of the current video to the client through a video link; caching at least part of stream fragments of a subsequent video of the current video, wherein the subsequent video is an unplayed video; responding to the received switching instruction of the subsequent video, and inserting the cached stream fragments of the subsequent video into the video link to be transmitted to the client. When the current video is played, the embodiment caches the subsequent video which is possibly played for the switching of the user; when the videos are switched, the same video link is multiplexed to transmit the videos, the video link does not need to be reestablished, the video link establishing time delay is saved, and therefore the effect of seamless video switching is achieved.

Description

Video switching method and device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a video switching method and video switching equipment.
Background
With the rapid development of the internet, the functions supported by the video applications are more and more diverse, such as a live broadcast function, an on-demand broadcast function, and the like. And further attract more and more users to watch videos, and the watching time is longer and longer. When using the on-demand function, the user typically switches the video by turning the page up and down. Because different video sources of the video application are stored in different playing addresses, a video link needs to be reestablished each time a video is switched. This process is time consuming and perceptible to the user, resulting in a stuck phenomenon.
Disclosure of Invention
The embodiment of the application provides a video switching method and video switching equipment.
In a first aspect, an embodiment of the present application provides a video switching method, including: establishing a video link; transmitting the stream fragments of the current video to the client through a video link; caching at least part of stream fragments of a subsequent video of the current video, wherein the subsequent video is an unplayed video; responding to the received switching instruction of the subsequent video, and inserting the cached stream fragments of the subsequent video into the video link to be transmitted to the client.
In some embodiments, the method further comprises: and in response to receiving a switching instruction of a previous video of the current video, inserting a stream slice of the previous video into the video link and transmitting the stream slice to the client, wherein the previous video is a played video.
In some embodiments, when the video link is established, the method further comprises: and establishing a control link, wherein the control link is used for transmitting a client instruction, and the client instruction comprises a switching instruction, a pause instruction or a play instruction.
In some embodiments, the control link is established by the client or the player of the client.
In some embodiments, before transmitting the stream slice of the current video to the client over the video link, further comprising: establishing a first connection with a content distribution network server; obtaining a current video from a content delivery network server based on a first connection; and segmenting the current video to obtain stream segments of the current video.
In some embodiments, caching at least a portion of the stream slices of the video subsequent to the current video comprises: establishing a second connection with the content distribution server; obtaining at least part of data of a subsequent video from the content distribution network server based on the second connection; and slicing at least part of data to obtain at least part of stream slices of the subsequent video.
In some embodiments, when inserting the cached stream slice of the subsequent video into the video link for transmission to the client, the method further comprises: the stream fragments of the remaining portion of data of the subsequent video continue to be cached.
In some embodiments, the method further comprises: and clearing the stream fragments of the cached video with the storage time exceeding the preset time.
In a second aspect, an embodiment of the present application provides a video switching apparatus, including: a first establishing unit configured to establish a video link; a first transmission unit configured to transmit a stream slice of a current video to a client over a video link; the first caching unit is configured to cache at least part of stream fragments of a subsequent video of the current video, wherein the subsequent video is an unplayed video; and the second transmission unit is configured to respond to the received switching instruction of the subsequent video and insert the cached stream fragments of the subsequent video into the video link to transmit to the client.
In some embodiments, the apparatus further comprises: and a third transmission unit configured to insert a stream slice of a previous video into the video link for transmission to the client in response to receiving a switching instruction of the previous video of the current video, wherein the previous video is a played video.
In some embodiments, the apparatus further comprises: a second establishing unit configured to establish a control link, wherein the control link is used for transmitting a client instruction, and the client instruction comprises a switching instruction, a pause instruction or a play instruction.
In some embodiments, the control link is established by the client or the player of the client.
In some embodiments, the apparatus further comprises: a fourth establishing unit configured to establish a first connection with the content distribution network server; a first acquisition unit configured to acquire a current video from a content distribution network server based on a first connection; and the first slicing unit is configured to slice the current video to obtain stream slices of the current video.
In some embodiments, the first cache unit is further configured to: establishing a second connection with the content distribution server; obtaining at least part of data of a subsequent video from the content distribution network server based on the second connection; and slicing at least part of data to obtain at least part of stream slices of the subsequent video.
In some embodiments, the apparatus further comprises: and the second caching unit is configured to continue caching the stream fragments of the remaining part of the data of the subsequent video.
In some embodiments, the apparatus further comprises: and the clearing unit is configured to clear the stream fragments of the cached video with the storage time exceeding the preset time.
In a third aspect, an embodiment of the present application provides a computer device, including: one or more processors; a storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the video switching method and the video switching equipment, a video link is established at first; then transmitting the stream fragments of the current video to the client through a video link, and caching at least part of stream fragments of the subsequent video of the current video; and finally, inserting the cached stream fragments of the subsequent videos into a video link and transmitting the cached stream fragments to the client under the condition of receiving a switching instruction of the subsequent videos. When the current video is played, caching the subsequent video which is possibly played for switching by a user; when the videos are switched, the same video link is multiplexed to transmit the videos, the video link does not need to be reestablished, the video link establishing time delay is saved, and therefore the effect of seamless video switching is achieved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture to which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a video switching method according to the present application;
FIG. 3 is a diagram of an application scenario in which the video switching method of FIG. 2 may be implemented;
FIG. 4 is a flow diagram of yet another embodiment of a video switching method according to the present application;
FIG. 5 is a diagram of an application scenario in which the video switching method of FIG. 4 may be implemented;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing the computer device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the video switching method of the present application may be applied.
As shown in fig. 1, devices 101, 102 and network 103 may be included in system architecture 100. Network 103 is the medium used to provide communication links between devices 101, 102. Network 103 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The devices 101, 102 may be hardware devices or software that support network connectivity to provide various network services. When the device is hardware, it can be a variety of electronic devices including, but not limited to, smart phones, tablets, laptop portable computers, desktop computers, servers, and the like. In this case, the hardware device may be implemented as a distributed device group including a plurality of devices, or may be implemented as a single device. When the device is software, the software can be installed in the electronic devices listed above. At this time, as software, it may be implemented as a plurality of software or software modules for providing a distributed service, for example, or as a single software or software module. And is not particularly limited herein.
In practice, a device may provide a respective network service by installing a respective client application or server application. After the device has installed the client application, it may be embodied as a client in network communications. Accordingly, after the server application is installed, it may be embodied as a server in network communications.
As an example, in fig. 1, device 101 is embodied as a client and device 102 is embodied as a server. For example, the device 101 may be a client of a video-class application, and the device 102 may be a server of the video-class application.
It should be noted that the video switching method provided in the embodiment of the present application may be executed by the device 102.
It should be understood that the number of networks and devices in fig. 1 is merely illustrative. There may be any number of networks and devices, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a video switching method according to the present application is shown. The video switching method comprises the following steps:
step 201, a video link is established.
In this embodiment, a server of a video-class application (e.g., device 102 shown in fig. 1) may establish a video link.
Typically, a video is transmitted between a client of a video-class application (e.g., device 101 shown in fig. 1) and a server of the video-class application over a video link. When a user opens a video application on a client to select video playing, a video link can be established. The establishment of the video link is similar to HTTP (Hyper Text Transfer Protocol) establishment or TCP (Transmission Control Protocol) handshake, and there is a certain time consumption.
Step 202, transmitting the stream slice of the current video to the client through the video link.
In this embodiment, the server side of the video application may transmit the stream fragments of the current video to the client side of the video application through the video link.
Here, the video link may be used to transmit stream slices of the current video. The current video may be a video selected for play by a video-class application on the open client. Because the current video can be played in a fragmentation mode basically, the service end of the video application transmits the stream fragments of the current video to the client.
In some embodiments, if the current video is cached at the server of the video application, the current video may be fragmented, and stream fragments of the current video are sequentially transmitted to the client of the video application through the video link. The granularity of the fragments can be adjusted by a server of the video application according to actual conditions.
It should be understood that, if the server of the video application does not cache the current video, the current video may be obtained from the server storing the current video, and then the current video may be fragmented.
Step 203, buffering at least part of the stream fragments of the video subsequent to the current video.
In this embodiment, in the process of playing the current video by the client of the video application, the user may switch to play the subsequent video of the current video, for example, switch to play the subsequent video by turning up and down pages or sliding left and right. In order to save time consumption for acquiring a subsequent video, a server of the video application may pre-cache at least part of stream fragments of the subsequent video in the process of playing the current video. The subsequent video may be an unplayed video, such as the next M (M is a positive integer) pieces of video of the current video.
And step 204, responding to the received switching instruction of the subsequent video, and inserting the cached stream slice of the subsequent video into the video link to be transmitted to the client.
In this embodiment, if the user performs the switching operation of the subsequent video, the client of the video application sends a switching instruction of the subsequent video to the server of the video application. When receiving a switching instruction of a subsequent video, the server of the video application can insert the cached stream slice of the subsequent video into the video link and transmit the video link to the client. The switching instruction of the subsequent video may include an identifier of the subsequent video. Here, the video link is not re-established for the subsequent video, but the video link of the current video is directly multiplexed, and the cached stream slice of the subsequent video is directly inserted into the video link of the current video.
In some embodiments, during the playing of the current video by the client of the video-class application, the user may also switch to playing the previous video of the current video, for example, by flipping up and down or sliding left and right. If the user performs the switching operation of the previous video, the client of the video application sends a switching instruction of the previous video to the server of the video application. Upon receiving a switch instruction of a previous video, the server of the video class application may insert a stream slice of the previous video into the video link for transmission to the client. The previous video may be a played video, such as the top N (N is a positive integer) pieces of video of the current video. The previous video is usually cached in the server of the video-like application when it is played for the first time. The switching instruction of the previous video may include an identification of the previous video. Here, the video link is not re-established for the previous video, but the video link of the current video is directly multiplexed, and the stream slice of the previous video is directly inserted into the video link of the current video.
In some embodiments, because interface control exists in the video playing process, when a video link is established, the server of the video application may also establish a full-life control link, and get through the interaction between the client of the video application and the server of the video application, so as to transmit various client instructions, including but not limited to a switch instruction, a pause instruction, a play instruction, and the like. It should be noted that the control link may be established by both the client and the player of the client, and is not limited in particular here.
The video switching method provided by the embodiment of the application comprises the steps of firstly establishing a video link; then transmitting the stream fragments of the current video to the client through a video link, and caching at least part of stream fragments of the subsequent video of the current video; and finally, inserting the cached stream fragments of the subsequent videos into a video link and transmitting the cached stream fragments to the client under the condition of receiving a switching instruction of the subsequent videos. When the current video is played, caching the subsequent video which is possibly played for switching by a user; when the videos are switched, the same video link is multiplexed to transmit the videos, the video link does not need to be reestablished, the video link establishing time delay is saved, and therefore the effect of seamless video switching is achieved.
For ease of understanding, fig. 3 shows an application scenario diagram in which the video switching method of fig. 2 may be implemented. As shown in fig. 3, when the video class application on the client, on which the user opens the video class application, selects video 1 to play, a video link and a control link are established between the client and the server. The method comprises the steps of obtaining a video 1 from a CDN (Content Delivery Network) server, fragmenting the video 1, and transmitting the stream fragmentation of the video 1 to a client through a video link. Video 2 and video 3 are the next two videos of video 1, and the user may switch playback. The client may obtain video 2 and video 3 from the CDN server and slice video 2 and video 3. If the user executes the switching operation of the video 2, the client sends a switching instruction of the video 2 to the server through the control link. When receiving the switching instruction of the video 2, the server may insert the stream slice of the video 2 into the video link and transmit the stream slice to the client.
With further reference to fig. 4, shown is a flow 400 that is yet another embodiment of a video switching method according to the present application. The video switching method comprises the following steps:
step 401, a video link is established.
In this embodiment, the specific operation of step 401 has been described in detail in step 201 in the embodiment shown in fig. 2, and is not described herein again.
Step 402, a first connection is established with a content distribution network server.
In this embodiment, since the current video is generally stored in the CDN server so as to save cost and is not substantially changed in a future period of time, the server of the video application may establish a first connection with the CDN server to obtain the current video. Wherein the first connection may be used to transmit the current video.
Step 403, the current video is obtained from the content distribution network server based on the first connection.
In this embodiment, the CDN server may transmit the current video to the server of the video application through the first connection.
And step 404, segmenting the current video to obtain stream segments of the current video.
In this embodiment, the server of the video application may fragment the current video to obtain stream fragments of the current video. The granularity of the fragments can be adjusted by a server of the video application according to actual conditions.
Step 405, transmitting the stream slice of the current video to the client through the video link.
In this embodiment, the specific operation of step 405 has been described in detail in step 202 in the embodiment shown in fig. 2, and is not described herein again.
Step 406, a second connection is established with the content distribution server.
In this embodiment, the server of the video application may establish a second connection with the CDN server to obtain a subsequent video of the current video. Wherein the second connection may be used to transmit subsequent video.
Typically, a second connection may be used to transmit a subsequent video. The number of the cached subsequent videos can be adjusted by a server of the video application according to the actual situation.
Step 407, at least part of the data of the subsequent video is obtained from the content distribution network server based on the second connection.
In this embodiment, the CDN server may transmit at least part of data of the subsequent video to the server of the video application through the second connection. In general, a server of a video-class application may pull a portion of data of a subsequent video from a CDN server.
And step 408, fragmenting at least part of the data to obtain at least part of stream fragments of the subsequent video.
In this embodiment, the execution main body may slice at least part of the data to obtain at least part of stream slices of a subsequent video. The granularity of the fragments can be adjusted by the video application according to the actual situation.
Step 409, responding to the received switching instruction of the subsequent video, inserting the cached stream slice of the subsequent video into the video link, and transmitting the video link to the client.
In this embodiment, the specific operation of step 409 has been described in detail in step 204 in the embodiment shown in fig. 2, and is not described herein again.
And step 410, continuing to cache the stream fragments of the remaining data of the subsequent video.
In this embodiment, in the playing process of the subsequent video, the server of the video application may continue to cache the stream fragments of the remaining data of the subsequent video. Specifically, the service end of the video application may obtain remaining data of the subsequent video from the CDN server based on the second connection, and fragment the remaining data to obtain stream fragments of the remaining data.
In some embodiments, buffer cleaning after video switching is completed may be performed as appropriate. Since most users have the habit of switching to play the previous video, the stream fragments of the cached video can be retained for a period of time, and when the storage time exceeds the preset time, the stream fragments of the cached video are cleaned.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the video switching method in this embodiment adds a video acquisition step and a video slicing step. Therefore, the video in the scheme described in this embodiment is stored in the CDN server, which saves cost. The server side of the video application adjusts the fragment granularity and the number of the cached videos according to the actual situation, so that the flexibility is higher.
For ease of understanding, fig. 5 shows an application scenario diagram in which the video switching method of fig. 4 may be implemented. As shown in fig. 5, when a user opens a video application on a client of the video application to select video 1 for playing, a video link and a control link are established between the client and a server, and a first connection is established between the server and a CDN server. The CDN server sends the video 1 to the server through the first connection. The server divides the video 1 to obtain a stream Slice 1 of the video 1, and the Slice 1 is sequentially transmitted to the client through the video link. Video 2 and video 3 are the next two videos of video 1, and the user may switch playback. And establishing a second connection between the server and the CDN server. The CDN server sends part of the data of the video 2 to the server via this second connection. And the server partitions the video 2 to obtain a stream partition Slice 2 of the video 2. Similarly, a second connection is established again between the server and the CDN server. The CDN server sends part of the data of the video 3 to the server via this second connection. And the server partitions the video 3 to obtain a stream partition Slice 3 of the video 3. If the user executes the switching operation of the video 2, the client sends a switching instruction of the video 2 to the server through the control link. When receiving the switching instruction of the video 2, the server can insert the Slice 2 into the video link and transmit the video link to the client, and simultaneously stop the transmission of the Slice 1.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing a computing device (e.g., device 102 shown in FIG. 1) of embodiments of the present application is shown. The computer device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or electronic device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first establishing unit, a first transmitting unit, a first buffering unit, and a second transmitting unit. Where the names of these units do not constitute a limitation of the unit itself in this case, for example, the first establishing unit may also be described as "the unit establishing the video link".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the computer device described in the above embodiments; or may exist separately and not be incorporated into the computer device. The computer readable medium carries one or more programs which, when executed by the computing device, cause the computing device to: establishing a video link; transmitting the stream fragments of the current video to the client through a video link; caching at least part of stream fragments of a subsequent video of the current video, wherein the subsequent video is an unplayed video; responding to the received switching instruction of the subsequent video, and inserting the cached stream fragments of the subsequent video into the video link to be transmitted to the client.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A video switching method, comprising:
establishing a video link;
transmitting the stream fragments of the current video to the client through the video link;
caching at least part of stream fragments of a subsequent video of the current video, wherein the subsequent video is an unplayed video;
responding to the received switching instruction of the subsequent video, and inserting the cached stream slice of the subsequent video into the video link to be transmitted to the client.
2. The method of claim 1, wherein the method further comprises:
in response to receiving a switch instruction of a previous video of the current video, inserting a stream slice of the previous video into the video link and transmitting the stream slice to the client, wherein the previous video is a played video.
3. The method according to claim 1 or 2, wherein, when establishing the video link, further comprising:
and establishing a control link, wherein the control link is used for transmitting a client instruction, and the client instruction comprises a switching instruction, a pause instruction or a play instruction.
4. The method of claim 3, wherein the control link is established by the client or a player of the client.
5. The method of claim 1 or 2, wherein prior to said transmitting the stream fragments of the current video over the video link to the client, further comprising:
establishing a first connection with a content distribution network server;
obtaining the current video from the content delivery network server based on the first connection;
and carrying out fragmentation on the current video to obtain stream fragments of the current video.
6. The method of claim 5, wherein the caching of at least a partial stream slice of a video subsequent to the current video comprises:
establishing a second connection with the content distribution server;
obtaining at least part of data of the subsequent video from the content distribution network server based on the second connection;
and slicing the at least part of data to obtain at least part of stream slices of the subsequent video.
7. The method of claim 6, wherein, when said inserting the cached stream slice of the subsequent video into the video link for transmission to the client, further comprising:
continuing to cache the stream fragments of the remaining portion of data of the subsequent video.
8. The method according to claim 1 or 2, wherein the method further comprises:
and clearing the stream fragments of the cached video with the storage time exceeding the preset time.
9. A computer device, comprising:
one or more processors;
a storage device on which one or more programs are stored;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202010836040.5A 2020-08-19 2020-08-19 Video switching method and device Pending CN111935507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010836040.5A CN111935507A (en) 2020-08-19 2020-08-19 Video switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010836040.5A CN111935507A (en) 2020-08-19 2020-08-19 Video switching method and device

Publications (1)

Publication Number Publication Date
CN111935507A true CN111935507A (en) 2020-11-13

Family

ID=73304743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010836040.5A Pending CN111935507A (en) 2020-08-19 2020-08-19 Video switching method and device

Country Status (1)

Country Link
CN (1) CN111935507A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112969040A (en) * 2021-02-03 2021-06-15 合肥宏晶微电子科技股份有限公司 Method and device for realizing video matrix, electronic equipment and storage medium
CN116828237A (en) * 2023-06-08 2023-09-29 天翼爱音乐文化科技有限公司 Video playing method, video playing system, electronic device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047838A (en) * 2006-03-27 2007-10-03 中兴通讯股份有限公司 Method for reducing response time of direct broadcast band switchover
CN103702202A (en) * 2013-12-13 2014-04-02 乐视致新电子科技(天津)有限公司 Method and device for realizing fast playing during channel switching
WO2017035783A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Streaming media transmission and play method, and transmission and play device
CN107404666A (en) * 2016-05-18 2017-11-28 中兴通讯股份有限公司 Method for processing video frequency, apparatus and system
CN107547940A (en) * 2017-09-13 2018-01-05 广州酷狗计算机科技有限公司 Video playback processing method, equipment and computer-readable recording medium
CN109299144A (en) * 2018-08-22 2019-02-01 北京奇艺世纪科技有限公司 A kind of data processing method, device, system and application server
CN110809168A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Video live broadcast processing method and device, terminal and storage medium
CN110996134A (en) * 2019-12-23 2020-04-10 腾讯科技(深圳)有限公司 Video playing method, device and storage medium
CN111510789A (en) * 2019-01-30 2020-08-07 上海哔哩哔哩科技有限公司 Video playing method, system, computer equipment and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047838A (en) * 2006-03-27 2007-10-03 中兴通讯股份有限公司 Method for reducing response time of direct broadcast band switchover
CN103702202A (en) * 2013-12-13 2014-04-02 乐视致新电子科技(天津)有限公司 Method and device for realizing fast playing during channel switching
WO2017035783A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Streaming media transmission and play method, and transmission and play device
CN107404666A (en) * 2016-05-18 2017-11-28 中兴通讯股份有限公司 Method for processing video frequency, apparatus and system
CN107547940A (en) * 2017-09-13 2018-01-05 广州酷狗计算机科技有限公司 Video playback processing method, equipment and computer-readable recording medium
CN110809168A (en) * 2018-08-06 2020-02-18 中兴通讯股份有限公司 Video live broadcast processing method and device, terminal and storage medium
CN109299144A (en) * 2018-08-22 2019-02-01 北京奇艺世纪科技有限公司 A kind of data processing method, device, system and application server
CN111510789A (en) * 2019-01-30 2020-08-07 上海哔哩哔哩科技有限公司 Video playing method, system, computer equipment and computer readable storage medium
CN110996134A (en) * 2019-12-23 2020-04-10 腾讯科技(深圳)有限公司 Video playing method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112969040A (en) * 2021-02-03 2021-06-15 合肥宏晶微电子科技股份有限公司 Method and device for realizing video matrix, electronic equipment and storage medium
CN116828237A (en) * 2023-06-08 2023-09-29 天翼爱音乐文化科技有限公司 Video playing method, video playing system, electronic device and storage medium

Similar Documents

Publication Publication Date Title
KR102262982B1 (en) Method, apparatus and system for slicing live streaming
CN108965907B (en) Method, device and system for playing video
US9641584B2 (en) Method and arrangement for representation switching in HTTP streaming
CN108063769B (en) Method and device for realizing content service and content distribution network node
CN110933517B (en) Code rate switching method, client and computer readable storage medium
CN110661826B (en) Method for processing network request by proxy server side and proxy server
US10116713B2 (en) System and methods for content streaming with a content buffer
CN102918594A (en) Cache control for adaptive stream player
CN111935507A (en) Video switching method and device
CN110290398B (en) Video issuing method and device, storage medium and electronic equipment
WO2017166496A1 (en) Method and device for downloading video file, and method and device providing video file
CN111654711A (en) Video playing control method, video playing method and device
CN114040245B (en) Video playing method and device, computer storage medium and electronic equipment
US20170150206A1 (en) Online video player and its method
CN104602046B (en) A kind of information issuing method based on HLS protocol, equipment and system
CN104572964A (en) Zip file unzipping method and device
CN112235642B (en) Video data processing method, device, equipment and storage medium
CN113794942A (en) Method, apparatus, system, device and medium for switching view angle of free view angle video
US11195248B2 (en) Method and apparatus for processing pixel data of a video frame
CN112243136B (en) Content playing method, video storage method and device
CN115297095B (en) Back source processing method, device, computing equipment and storage medium
CN114979768A (en) Video caching method, device, equipment and storage medium
CN112437352B (en) Video merging and playing method and device
CN111625745B (en) Recommendation method, recommendation device, electronic equipment and computer readable medium
TW201501526A (en) Method for providing a content part of a multimedia content to a client terminal, corresponding cache

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

Application publication date: 20201113