CN110366047B - Video sharing method and device and computer readable storage medium - Google Patents

Video sharing method and device and computer readable storage medium Download PDF

Info

Publication number
CN110366047B
CN110366047B CN201910483031.XA CN201910483031A CN110366047B CN 110366047 B CN110366047 B CN 110366047B CN 201910483031 A CN201910483031 A CN 201910483031A CN 110366047 B CN110366047 B CN 110366047B
Authority
CN
China
Prior art keywords
terminal
terminals
video
sharing
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910483031.XA
Other languages
Chinese (zh)
Other versions
CN110366047A (en
Inventor
周志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910483031.XA priority Critical patent/CN110366047B/en
Publication of CN110366047A publication Critical patent/CN110366047A/en
Application granted granted Critical
Publication of CN110366047B publication Critical patent/CN110366047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4622Retrieving content or additional data from different sources, e.g. from a broadcast channel and the Internet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/632Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing using a connection between clients on a wide area network, e.g. setting up a peer-to-peer communication via Internet for retrieving video segments from the hard-disk of other client devices

Abstract

The embodiment of the application provides a video sharing method and device and a computer readable storage medium, wherein the method is applied to a system comprising a first terminal and a server, and comprises the following steps: the method comprises the steps that a first terminal obtains video cache information and a current live broadcast identification of a current live broadcast video in the first terminal, and sends the video cache information and the current live broadcast identification to a server; the server determines a plurality of second terminals according to the video cache information and the current live broadcast identification, acquires terminal types corresponding to the second terminals respectively, and sends terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the second terminals respectively; and the first terminal acquires the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screens the sharing terminals from the plurality of second terminals according to the sharing sequence, and shares videos through the sharing terminals.

Description

Video sharing method and device and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a video sharing method and apparatus, and a computer-readable storage medium.
Background
In the traditional file downloading service, a file to be downloaded is placed on a server, and a user can download the file to be downloaded to the local of a terminal by accessing the server. With the continuous development of internet technology, P2P (Peer To Peer) technology is becoming a mature technology for file exchange and download To relieve the processing pressure of servers.
In consideration of the fact that the live video has the advantage of stronger interactivity compared with information interaction modes such as characters and pictures, a large number of users are attracted, and in order to better watch the live video, the P2P technology can be applied to the sharing process of the live video. Because the number of people watching the live video is large, under the condition that the first terminal requests the second terminal from the server, the second terminal can provide the shared video for the first terminal, and can usually acquire the large number of second terminals, at the moment, the shared terminal is acquired from the second terminals, so that the first terminal and the shared terminal can share the video.
In the prior art, the second terminal can be sorted according to the sharing sequence according to the network types respectively corresponding to the first terminal and the second terminal and the attributions respectively corresponding to the first terminal and the second terminal, wherein the influence degree of the network type on the sorting result is higher than the influence degree of the attributions on the sorting result, so that the sharing terminal is obtained from the second terminal according to the sorting result, and the first terminal and the sharing terminal can share the video. For example, if the first terminal is R, the plurality of second terminals include Q1, Q2, and Q3, and R, Q1, and Q2 are all located in the local area network N, and Q3 is located in the public network P, the sharing order of Q1 and Q2 is prior to the sharing order of Q3, and if the attribution of R and Q1 is beijing and the attribution of Q2 is shanghai, the sharing order of Q1 is prior to the sharing order of Q2, and at this time, the sharing order of the plurality of second terminals is: q1, Q2, and Q3. However, the inventor finds that, in a research process, a terminal caching a live video may be of different terminal types, and usage behaviors of the different terminal types are different, for example, frequent foreground and background switching operations and progress dragging operations exist when the mobile terminal watches the live video, so that stability of the mobile terminal is poor, efficiency of downloading a shared video from the mobile terminal is low, and fewer foreground and background switching operations and progress dragging operations exist when a PC (personal computer) end watches the live video, so that stability of the PC end is good, and efficiency of downloading the shared video from the PC end is high. Therefore, in the prior art, the terminal type is not considered in the process of sequencing the sharing sequence, so that the sequencing result is inaccurate, and the efficiency of downloading the shared video from the sharing terminal is low.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a video sharing method and apparatus, and a computer-readable storage medium, so as to solve the problem in the prior art that the efficiency of downloading a shared video from a sharing terminal is low due to an inaccurate sharing sequence.
According to a first aspect of the embodiments of the present application, there is provided a video sharing method applied to a system including a first terminal and a server, including:
the first terminal acquires video cache information and a current live broadcast identification of a current live broadcast video in the first terminal and sends the video cache information and the current live broadcast identification to the server;
the server determines a plurality of second terminals according to the video cache information and the current live broadcast identification, acquires terminal types corresponding to the second terminals respectively, and sends terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the second terminals respectively;
and the first terminal acquires the sharing sequence of the second terminals according to the terminal types respectively corresponding to the second terminals, screens the sharing terminals from the second terminals according to the sharing sequence, and shares videos through the sharing terminals.
According to a second aspect of the embodiments of the present application, there is provided a video sharing method applied to a first terminal, the method including:
acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal;
sending the video caching information and the current live broadcast identification to a server;
receiving terminal information sent by the server, wherein the terminal information carries terminal types corresponding to a plurality of second terminals respectively; the second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification;
and acquiring the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screening the sharing terminals in the plurality of second terminals according to the sharing sequence, and sharing the video through the sharing terminals.
According to a third aspect of the embodiments of the present application, there is provided a video sharing method applied to a server, the method including:
receiving video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal;
determining a plurality of second terminals according to the video cache information and the current live broadcast identification;
acquiring terminal types respectively corresponding to the plurality of second terminals;
and sending terminal information to the first terminal, wherein the terminal information carries the terminal types respectively corresponding to the plurality of second terminals.
According to a fourth aspect of embodiments of the present application, there is provided a video sharing system, the system including a first terminal and a server;
the first terminal is used for acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal and sending the video cache information and the current live broadcast identifier to the server;
the server is used for determining a plurality of second terminals according to the video cache information and the current live broadcast identification, acquiring terminal types corresponding to the second terminals respectively, and sending terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the second terminals respectively;
the first terminal is further configured to obtain a sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screen a sharing terminal from the plurality of second terminals according to the sharing sequence, and share a video through the sharing terminal.
According to a fifth aspect of the embodiments of the present application, there is provided a video sharing apparatus applied to a first terminal, the apparatus including:
the live broadcast information acquisition module is used for acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal;
the live broadcast information sending module is used for sending the video cache information and the current live broadcast identification to a server;
the terminal information receiving module is used for receiving terminal information sent by the server, and the terminal information carries terminal types corresponding to the plurality of second terminals respectively; the second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification;
a sharing sequence acquiring module, configured to acquire a sharing sequence of the plurality of second terminals according to terminal types respectively corresponding to the plurality of second terminals;
a shared terminal obtaining module, configured to screen a shared terminal from the multiple second terminals according to the sharing order;
and the video sharing module is used for sharing videos through the sharing terminal.
According to a sixth aspect of the embodiments of the present application, there is provided a video sharing apparatus applied to a server, the apparatus including:
the live broadcast information receiving module is used for receiving video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal;
the terminal determining module is used for determining a plurality of second terminals according to the video cache information and the current live broadcast identification;
the terminal type acquisition module is used for acquiring the terminal types respectively corresponding to the plurality of second terminals;
and the terminal information sending module is used for sending terminal information to the first terminal, wherein the terminal information carries the terminal types respectively corresponding to the plurality of second terminals.
According to a seventh aspect of the embodiments of the present application, there is provided a video sharing apparatus, comprising a processor and a memory, wherein,
the processor executes the computer program code stored in the memory to implement the steps of the video sharing method described herein.
According to an eighth aspect of embodiments herein, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the video sharing method described herein.
The embodiment of the application has the following advantages: the first terminal acquires video cache information and a current live broadcast identification of a current live broadcast video in the first terminal and sends the video cache information and the current live broadcast identification to the server; the server determines a plurality of second terminals according to the video cache information and the current live broadcast identification, acquires terminal types corresponding to the second terminals respectively, and sends terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the second terminals respectively; and the first terminal acquires the sharing sequence of the second terminals according to the terminal types respectively corresponding to the second terminals, screens the sharing terminals from the second terminals according to the sharing sequence, and shares videos through the sharing terminals. Therefore, the second terminals can be sequenced based on the terminal types of the second terminals, so that the sharing sequence corresponding to the second terminal of the terminal type with higher downloading efficiency is forward, the sharing sequence corresponding to the second terminal of the terminal type with lower downloading efficiency is backward, the second terminal with the forward sharing sequence is used as the sharing terminal, the video downloading efficiency in the video sharing process can be improved, and the problem that the sequencing result is inaccurate and the video downloading efficiency is lower due to the fact that the sharing sequence is sequenced through the network type and the attribution place in the prior art is solved to a certain extent.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a video sharing method of the present application;
FIG. 2 is a flow chart of the steps of an alternative embodiment of a video sharing method of the present application;
FIG. 3 is a flow chart of the steps of an alternative embodiment of a video sharing method of the present application;
FIG. 4 is a flow chart of the steps of an alternative embodiment of a video sharing method of the present application;
FIG. 5 is a flow chart of the steps of an alternative embodiment of a video sharing method of the present application;
FIG. 6 is a block diagram of a video sharing system embodiment of the present application;
FIG. 7 is a block diagram of a video sharing apparatus according to an embodiment of the present application;
FIG. 8 is a block diagram of an alternative embodiment of a video sharing device of the present application;
FIG. 9 is a block diagram of an alternative embodiment of a video sharing device of the present application;
FIG. 10 is a block diagram of an alternative embodiment of a video sharing device of the present application;
FIG. 11 is a block diagram of an alternative embodiment of a video sharing device of the present application;
FIG. 12 is a block diagram of another embodiment of a video sharing apparatus of the present application;
FIG. 13 is a block diagram of an alternative embodiment of a video sharing device of the present application;
FIG. 14 is a block diagram of an alternative embodiment of a video sharing device of the present application;
fig. 15 is a schematic hardware structure diagram of a video sharing device according to an embodiment of the present disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The present application will be described in detail with reference to specific examples.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a video sharing method according to the present application is shown, and is applied to a system including a first terminal and a server, where the method specifically includes the following steps:
step 101, a first terminal acquires video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal.
In the embodiment of the present application, the first terminal includes, but is not limited to, a terminal capable of viewing a video, such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, and the like, and this application is not limited to this specifically.
The video caching information may include: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video.
And 102, the first terminal sends the video cache information and the current live broadcast identification to a server.
In a video sharing scene, a plurality of terminals send video cache information of different live videos, live identifiers of different live videos and terminal identifiers to a server, so that the server can establish a corresponding relation between the video cache information of the live videos sent by each terminal and the live identifiers of the live videos and the terminal identifiers to store the video cache information, the live identifiers of the live videos and the terminal identifiers. In a possible implementation manner, different live videos can be classified and stored according to the live identification, that is, an information storage file can be respectively established for each live video, a terminal list of a certain live video is stored in the information storage file, and the terminal list includes the corresponding relationship between the terminal identification and the video cache information of the live video.
In addition, the obtained second terminals need to be sequenced, so that when the plurality of terminals send the video cache information of different live videos, the live identifiers of the different live videos and the terminal identifiers to the server, the terminal information corresponding to the plurality of terminals respectively can be sent to the server, and the terminal information carries the terminal type. Considering that the wider the information coverage carried by the terminal information in the process of sorting the second terminal, the more accurate the obtained sharing sequence of the second terminal, it is obvious that the terminal information may also carry at least one of the network types corresponding to the plurality of terminals, the operators corresponding to the plurality of terminals, the attributions corresponding to the plurality of terminals, and the uplink bandwidths corresponding to the plurality of terminals. In this way, the server may store the terminal information corresponding to each of the plurality of terminals, so that the terminal information of the second terminal may be acquired in a subsequent step.
And 103, the server determines a plurality of second terminals according to the video cache information and the current live broadcast identification.
In this embodiment of the application, because video sharing needs to be performed on the same live video, and it is considered that the live progress of the live video can be adjusted, if a user may just start the live video, at this time, the user may watch the live video from the initial play moment of the live video, therefore, different terminals have differences in the play progress of the same live video, so that different terminals cache different cache video segments of the same live video, if the cache video segment of a certain terminal is not a shared video segment required by a first terminal, the first terminal cannot perform video sharing through the certain terminal, and thus it is clear that a second terminal in the application stores the shared video segment required by the first terminal.
In summary, according to the present application, a plurality of candidate terminals are first obtained according to a current live broadcast identifier, a first cache time period in which the plurality of candidate terminals cache a current live broadcast video is obtained, and then a plurality of second terminals are obtained from the plurality of candidate terminals according to the first cache time period and video cache information, where the candidate terminals may be terminals currently playing the current live broadcast video. Further, a second cache time period in which the first terminal caches the current live video may be obtained according to the video cache information, and the second terminal may be obtained according to the first cache time period and the second cache time period.
Exemplarily, in a case that the video caching information includes a latest downloading time of a current live video and a cached time length of the current live video, if the latest downloading time is 20 minutes and 10 seconds and the cached time length is 5 minutes, the second caching time period includes a time period between 15 minutes and 10 seconds and 20 minutes and 10 seconds; under the condition that the video caching information comprises the initial downloading time of the current live video and the cached time length of the current live video, if the initial downloading time is 10 minutes and 20 seconds and the cached time length is 7 minutes, the second caching time period comprises a time period between 10 minutes and 20 seconds and 17 minutes and 20 seconds; under the condition that the video cache information comprises the initial downloading time of the current live video and the latest downloading time of the current live video, if the initial downloading time is 30 minutes 8 seconds and the latest downloading time is 40 minutes 10 seconds, the second cache time period comprises a time period between 30 minutes 8 seconds and 40 minutes 10 seconds. It should be noted that the obtaining method of the first cache time period may refer to the obtaining method of the second cache time period, and details are not repeated, the foregoing examples are merely examples, and this application is not limited thereto.
And 104, the server acquires the terminal types respectively corresponding to the plurality of second terminals.
As can be seen from step 102, the server may store, in advance, terminal information corresponding to different terminals, so that in the embodiment of the present application, the stored terminal information corresponding to a plurality of second terminals may be obtained, where the terminal information carries terminal types corresponding to the plurality of second terminals, respectively.
And 105, the server sends terminal information to the first terminal, wherein the terminal information carries the terminal types respectively corresponding to the plurality of second terminals.
In this step, the terminal information may further carry at least one of a terminal type corresponding to each of the plurality of second terminals, a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals.
And 106, the first terminal acquires the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screens the sharing terminals from the plurality of second terminals according to the sharing sequence, and shares videos through the sharing terminals.
In this step, if the terminal information carries terminal types corresponding to the plurality of second terminals, the plurality of second terminals may be sorted according to a preset sharing priority order among different types of information included in the terminal types, so as to obtain a sharing order of the plurality of second terminals. Illustratively, if the terminal type includes different types of information: the system comprises a PC (personal computer) end, a TV (television) end, a router terminal and a mobile end, so that the preset sharing priority sequence from high to low can be respectively as follows: router terminal, PC end, TV end, mobile end. In addition, this application can also acquire idle terminal in advance, if this idle terminal includes idle PC end to control idle PC end buffer memory present live video, at this moment, the terminal type can include idle PC end, non-idle PC end, TV end, router terminal, removal end, and it can be respectively from high to low to predetermine sharing priority order: router terminal, idle PC terminal, non-idle PC terminal, TV terminal, mobile terminal.
If the terminal information further carries at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, an attribution corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals, the step obtains the sharing sequence of the plurality of second terminals according to at least one of the network type corresponding to each of the plurality of second terminals, the operator corresponding to each of the plurality of second terminals, the attribution corresponding to each of the plurality of second terminals, and the uplink bandwidth corresponding to each of the plurality of second terminals, which are carried by the terminal information, and the terminal type corresponding to each of the plurality of second terminals.
Further, the method includes the steps that first a first preset sharing priority sequence among different carried information is obtained; the carried information includes at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals; then, acquiring a second preset sharing priority sequence among different types of information included in each carried information; then, acquiring first carried information corresponding to the highest priority in the first preset sharing priority sequence; the plurality of second terminals are sequenced according to a second preset sharing priority order among different types of information included in the first carried information to obtain a first sequencing result; and taking the next priority corresponding to the highest priority as a priority to be sorted, taking the first sorting result as a sorting result to be processed, circularly executing the sorting step on the sorting result to be processed according to the sorting priority to be sorted until the next priority corresponding to the priority to be sorted is not included in the first preset sharing priority sequence, stopping executing the sorting step, and acquiring the sharing sequence of the plurality of second terminals according to the final sorting result. Wherein the sorting step comprises: and acquiring second terminal carried information corresponding to the priority to be sorted, sorting the sorting results to be processed according to a second preset sharing priority sequence among different types of information included in the second terminal carried information to obtain a second sorting result, judging whether a next priority corresponding to the priority to be sorted is included in the first preset sharing priority sequence, wherein the first preset sharing priority sequence includes a next priority corresponding to the priority to be sorted, taking the next priority corresponding to the priority to be sorted as an updated priority to be sorted, taking the second sorting result as an updated sorting result to be processed, and sorting the second terminals according to the terminal information to obtain the sharing sequence of the second terminals.
For example, if the terminal information carries network types corresponding to a plurality of second terminals, operators corresponding to the plurality of second terminals, attributions corresponding to the plurality of second terminals, and uplink bandwidths corresponding to the plurality of second terminals, and the terminal types corresponding to the plurality of second terminals, respectively, the first preset sharing priority order is, from high to low: network type, operator, home location, uplink bandwidth and terminal type; then, the different types of information that the network type includes are LAN, public network and intranet etc. because information transmission speed is very fast between the different terminals in the LAN, the public network is convenient for connect, and the intranet is difficult to connect, therefore, the second between the different types of information that the network type includes is preset sharing priority order from high to low and is respectively: local area network, public network and intranet; the different types of information included by the operators are China Unicom, China telecom, China Mobile, China radio and television, and the like, and the second preset sharing priority sequence among the different types of information included by the operators is as follows: the priority of a first operator type corresponding to a first terminal is higher than that of a second operator type, and the second operator type is an operator type except the first operator type in different types of information included by operators; the different types of information included in the attribution are different region positions, and the second preset sharing priority sequence among the different types of information included in the attribution is as follows: the priority of a first region position to which the first terminal belongs is higher than that of a second region position, and the second region position is a region position except the first region position in different types of information included in a home area; the second preset sharing priority order among different types of information included in the uplink bandwidth is as follows: the higher the uplink bandwidth is, the higher the priority of the uplink bandwidth is, and conversely, the smaller the uplink bandwidth is, the lower the priority of the uplink bandwidth is; the different types of information included by the terminal type are a PC terminal, a TV terminal, a router terminal and a mobile terminal, and thus, the second preset sharing priority sequence among the different types of information included by the terminal type is respectively from high to low: router terminal, PC end, TV end, remove the end, in addition, this application can also acquire idle terminal in advance, be idle PC end if idle terminal to through idle PC end cache current live broadcast video, this moment, the different grade type information that the terminal type includes is router terminal, idle PC end, non-idle PC end, TV end, remove the end, then the second between the different grade type information that the terminal type includes is predetermine sharing priority order from high to low and is respectively: the above examples are merely illustrative, and the present application is not limited thereto.
By adopting the method, the second terminals can be sequenced based on the terminal types of the second terminals, so that the sharing sequence corresponding to the second terminal with the higher downloading efficiency is earlier, and the sharing sequence corresponding to the second terminal with the lower downloading efficiency is later, so that the second terminal with the earlier sharing sequence is used as the sharing terminal, the video downloading efficiency in the video sharing process can be improved, and the problem of lower video downloading efficiency caused by inaccurate sequencing result due to network type and attribution ground sharing sequence sequencing in the prior art is solved to a certain extent.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a video sharing method according to the present application is shown, and applied to a first terminal, the method specifically includes the following steps:
step 201, video cache information and a current live broadcast identifier of a current live broadcast video in a first terminal are obtained.
In the embodiment of the present application, the first terminal includes, but is not limited to, a terminal capable of viewing a video, such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, and the like, and this application is not limited to this specifically.
The video caching information may include: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video.
Step 202, sending the video caching information and the current live broadcast identification to a server.
Step 203, receiving terminal information sent by a server, wherein the terminal information carries terminal types corresponding to a plurality of second terminals respectively; and the plurality of second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification.
Considering that the wider the information coverage carried by the terminal information in the process of sorting the second terminal, the more accurate the obtained sharing sequence of the second terminal, the terminal information in this step may further carry at least one of the network type corresponding to each of the second terminals, the operator corresponding to each of the second terminals, the home location corresponding to each of the second terminals, and the uplink bandwidth corresponding to each of the second terminals.
Step 204, obtaining the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screening the sharing terminals from the plurality of second terminals according to the sharing sequence, and sharing the video through the sharing terminals.
In this step, if the terminal information carries terminal types corresponding to the plurality of second terminals, the plurality of second terminals may be sorted according to a preset sharing priority order among different types of information included in the terminal types, so as to obtain a sharing order of the plurality of second terminals. Illustratively, if the terminal type includes different types of information: PC end, TV end, router terminal, mobile terminal, like this, it can be that from high to low to predetermine sharing priority order: router terminal, PC end, TV end, mobile end. In addition, this application can also acquire idle terminal in advance, if this idle terminal includes idle PC end to control idle PC end buffer memory present live video, at this moment, the terminal type can include idle PC end, non-idle PC end, TV end, router terminal, removal end, and it can be respectively from high to low to predetermine sharing priority order: router terminal, idle PC terminal, non-idle PC terminal, TV terminal, mobile terminal.
If the terminal information further carries at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, an attribution corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals, the step obtains the sharing sequence of the plurality of second terminals according to at least one of the network type corresponding to each of the plurality of second terminals, the operator corresponding to each of the plurality of second terminals, the attribution corresponding to each of the plurality of second terminals, and the uplink bandwidth corresponding to each of the plurality of second terminals, which are carried by the terminal information, and the terminal type corresponding to each of the plurality of second terminals.
Further, the method includes the steps that first a first preset sharing priority sequence among different carried information is obtained; the carried information includes at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals; then, acquiring a second preset sharing priority sequence among different types of information included in each carried information; then, acquiring first carried information corresponding to the highest priority in the first preset sharing priority sequence; the plurality of second terminals are sequenced according to a second preset sharing priority order among different types of information included in the first carried information to obtain a first sequencing result; and taking the next priority corresponding to the highest priority as a priority to be sorted, taking the first sorting result as a sorting result to be processed, circularly executing the sorting step on the sorting result to be processed according to the sorting priority to be sorted until the next priority corresponding to the priority to be sorted is not included in the first preset sharing priority sequence, stopping executing the sorting step, and acquiring the sharing sequence of the plurality of second terminals according to the final sorting result. Wherein the sorting step comprises: and acquiring second terminal carried information corresponding to the priority to be sorted, sorting the sorting results to be processed according to a second preset sharing priority sequence among different types of information included in the second terminal carried information to obtain a second sorting result, judging whether a next priority corresponding to the priority to be sorted is included in the first preset sharing priority sequence, wherein the first preset sharing priority sequence includes a next priority corresponding to the priority to be sorted, taking the next priority corresponding to the priority to be sorted as an updated priority to be sorted, taking the second sorting result as an updated sorting result to be processed, and sorting the second terminals according to the terminal information to obtain the sharing sequence of the second terminals.
For example, if the terminal information carries network types corresponding to a plurality of second terminals, operators corresponding to the plurality of second terminals, attributions corresponding to the plurality of second terminals, and uplink bandwidths corresponding to the plurality of second terminals, and the terminal types corresponding to the plurality of second terminals, respectively, the first preset sharing priority order is, from high to low: network type, operator, home location, uplink bandwidth and terminal type; then, the different types of information that the network type includes are LAN, public network and intranet etc. because information transmission speed is very fast between the different terminals in the LAN, the public network is convenient for connect, and the intranet is difficult to connect, therefore, the second between the different types of information that the network type includes is preset sharing priority order from high to low and is respectively: local area network, public network and intranet; the different types of information included by the operators are China Unicom, China telecom, China Mobile, China radio and television, and the like, and the second preset sharing priority sequence among the different types of information included by the operators is as follows: the priority of a first operator type corresponding to a first terminal is higher than that of a second operator type, and the second operator type is an operator type except the first operator type in different types of information included by operators; the different types of information included in the attribution are different region positions, and the second preset sharing priority sequence among the different types of information included in the attribution is as follows: the priority of a first region position to which the first terminal belongs is higher than that of a second region position, and the second region position is a region position except the first region position in different types of information included in a home area; the second preset sharing priority order among different types of information included in the uplink bandwidth is as follows: the higher the uplink bandwidth is, the higher the priority of the uplink bandwidth is, and conversely, the smaller the uplink bandwidth is, the lower the priority of the uplink bandwidth is; the different types of information included by the terminal type are a PC terminal, a TV terminal, a router terminal and a mobile terminal, and thus, the second preset sharing priority sequence among the different types of information included by the terminal type is respectively from high to low: router terminal, PC end, TV end, remove the end, in addition, this application can also acquire idle terminal in advance, be idle PC end if idle terminal to through idle PC end cache current live broadcast video, this moment, the different grade type information that the terminal type includes is router terminal, idle PC end, non-idle PC end, TV end, remove the end, then the second between the different grade type information that the terminal type includes is predetermine sharing priority order from high to low and is respectively: the above examples are merely illustrative, and the present application is not limited thereto.
By adopting the method, the second terminals can be sequenced based on the terminal types of the second terminals, so that the sharing sequence corresponding to the second terminal with the higher downloading efficiency is earlier, and the sharing sequence corresponding to the second terminal with the lower downloading efficiency is later, so that the second terminal with the earlier sharing sequence is used as the sharing terminal, the video downloading efficiency in the video sharing process can be improved, and the problem of lower video downloading efficiency caused by inaccurate sequencing result due to network type and attribution ground sharing sequence sequencing in the prior art is solved to a certain extent.
Referring to fig. 3, a flowchart illustrating steps of an embodiment of a video sharing method according to the present application is shown, and applied to a server, the method specifically includes the following steps:
step 301, receiving video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal.
The video caching information may include: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video. In an embodiment of the present application, the current live broadcast identifier may be used to uniquely represent the current live broadcast video.
Step 302, determining a plurality of second terminals according to the video cache information and the current live broadcast identification.
In this embodiment of the application, because video sharing needs to be performed on the same live video, and it is considered that the live progress of the live video can be adjusted, if a user may just start the live video, at this time, the user may watch the live video from the initial play moment of the live video, therefore, different terminals have differences in the play progress of the same live video, so that different terminals cache different cache video segments of the same live video, if the cache video segment of a certain terminal is not a shared video segment required by a first terminal, the first terminal cannot perform video sharing through the certain terminal, and thus it is clear that a second terminal in the application stores the shared video segment required by the first terminal.
In summary, according to the present application, a plurality of candidate terminals are first obtained according to a current live broadcast identifier, a first cache time period in which the plurality of candidate terminals cache a current live broadcast video is obtained, and then a plurality of second terminals are obtained from the plurality of candidate terminals according to the first cache time period and video cache information, where the candidate terminals may be terminals currently playing a part of video clips of the current live broadcast video. In a possible implementation manner, if the server stores different live videos in a classified manner according to the live identification, an information storage file can be respectively established for each live video, a terminal list of a certain live video is stored in the information storage file, the terminal list comprises the terminal identification and the video cache information of the live video, the target information storage file corresponding to the current live identification can be obtained, and the terminal corresponding to the terminal identification stored in the target information storage file is used as the candidate terminal.
Further, a second cache time period in which the first terminal caches the current live video may be obtained according to the video cache information, and the second terminal may be obtained according to the first cache time period and the second cache time period.
Exemplarily, in a case that the video caching information includes a latest downloading time of a current live video and a cached time length of the current live video, if the latest downloading time is 20 minutes and 10 seconds and the cached time length is 5 minutes, the second caching time period includes a time period between 15 minutes and 10 seconds and 20 minutes and 10 seconds; under the condition that the video caching information comprises the initial downloading time of the current live video and the cached time length of the current live video, if the initial downloading time is 10 minutes and 20 seconds and the cached time length is 7 minutes, the second caching time period comprises a time period between 10 minutes and 20 seconds and 17 minutes and 20 seconds; under the condition that the video cache information comprises the initial downloading time of the current live video and the latest downloading time of the current live video, if the initial downloading time is 30 minutes 8 seconds and the latest downloading time is 40 minutes 10 seconds, the second cache time period comprises a time period between 30 minutes 8 seconds and 40 minutes 10 seconds. It should be noted that the obtaining method of the first cache time period may refer to the obtaining method of the second cache time period, and details are not repeated, the foregoing examples are merely examples, and this application is not limited thereto.
Step 303, obtaining the terminal types respectively corresponding to the plurality of second terminals.
As can be seen from step 102, the server may store, in advance, terminal information corresponding to different terminals, so that in the embodiment of the present application, the stored terminal information corresponding to a plurality of second terminals may be obtained, where the terminal information carries terminal types corresponding to the plurality of second terminals, respectively.
And step 304, sending terminal information to the first terminal, wherein the terminal information carries the terminal types respectively corresponding to the plurality of second terminals.
The terminal information may further carry at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals.
For different terminals, the video downloading efficiency is different, and therefore, the first terminal can sort the second terminals through the terminal information sent by the server to obtain the sharing sequence of each second terminal, so that the first terminal can screen the sharing terminals from the plurality of second terminals according to the sharing sequence and share videos through the sharing terminals.
By adopting the method, the second terminals can be sequenced based on the terminal types of the second terminals, so that the sharing sequence corresponding to the second terminal with the higher downloading efficiency is earlier, and the sharing sequence corresponding to the second terminal with the lower downloading efficiency is later, so that the second terminal with the earlier sharing sequence is used as the sharing terminal, the video downloading efficiency in the video sharing process can be improved, and the problem of lower video downloading efficiency caused by inaccurate sequencing result due to network type and attribution ground sharing sequence sequencing in the prior art is solved to a certain extent.
Referring to fig. 4, a flowchart illustrating steps of an embodiment of a video sharing method according to the present application is shown, which may specifically include the following steps:
step 401, a first terminal obtains video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal.
In the embodiment of the present application, the first terminal includes, but is not limited to, a terminal capable of viewing a video, such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, and the like, and this application is not limited to this specifically.
Wherein the current live broadcast identification can be used for uniquely representing the current live broadcast video; the video buffering information may include: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video.
Step 402, the first terminal sends video caching information and a current live broadcast identifier to a server.
And step 403, the server acquires a plurality of candidate terminals according to the current live broadcast identifier.
The candidate terminals in this step may be terminals that play the current live video at the current time.
The video cache information of different live videos, the live identification of the different live videos and the terminal identification are sent to the server by the plurality of terminals, so that the server can establish a corresponding relation between the video cache information of the live videos sent by each terminal and the live identification of the live videos and the terminal identification for storage, and therefore the step can obtain the terminal identification corresponding to the current live identification based on the stored corresponding relation, and the terminal of the terminal identification corresponding to the current live identification is determined to be the candidate terminal. In a possible implementation manner, if the server stores different live videos in a classified manner according to the live identification, an information storage file can be respectively established for each live video, a terminal list of a certain live video is stored in the information storage file, and the terminal list includes a terminal identification and a corresponding relationship between video cache information of the live video, then the step can acquire a target information storage file corresponding to the current live identification, and take a terminal corresponding to the terminal identification stored in the target information storage file as the candidate terminal.
In step 404, the server obtains a first caching time period for caching the current live video by the plurality of candidate terminals.
As can be seen from step 102, the multiple terminals send video cache information of different live videos, live identifiers of different live videos, and terminal identifiers to the server, so that the server can establish a corresponding relationship between the video cache information of the live video sent by each terminal and the live identifiers of the live videos and the terminal identifiers for storage, and therefore, in this step, the stored video cache information of multiple candidate terminals can be obtained, and the first cache time period can be obtained according to the video cache information of the multiple candidate terminals, and the specific process can refer to the obtaining process of the second cache time period in step 103, and is not repeated.
Step 405, the server acquires a plurality of second terminals from the plurality of candidate terminals according to the first cache time period and the video cache information.
In this step, the second terminal may be acquired by any one of the following methods:
in the first mode, a second cache time period for caching the current live video by the first terminal can be obtained according to the video cache information; and then determining that the candidate terminal corresponding to the first cache time period is the second terminal under the condition that the first cache time period and the second cache time period have overlapping time periods and the overlapping time periods include the latest downloading time.
Illustratively, in a case that the second buffering time period includes a time period between 30 minutes 8 seconds and 40 minutes 10 seconds, according to the watching habit of the user, after the user watches the video clip corresponding to the second buffering time period, the user continues to watch the video clip after 40 minutes 10 seconds, therefore, if the first buffering time period corresponding to the candidate terminal includes a time period between 10 minutes 8 seconds and 20 minutes 10 seconds, the candidate terminal is not the second terminal because the buffered video clip corresponding to the first buffering time period is not the shared video clip required by the first terminal, and if the first buffering time period corresponding to the candidate terminal includes a time period between 30 minutes 8 seconds and 35 minutes 10 seconds, the candidate terminal is not the second terminal because the buffered video clip corresponding to the first buffering time period is the video clip already buffered by the first terminal, if the first buffer time period corresponding to the candidate terminal includes a time period between 35 minutes 40 seconds and 45 minutes 10 seconds, the candidate terminal is the second terminal, and the above example is only an example, and the present application is not limited thereto.
In a second mode, if the number of the second terminals obtained in the above-described mode is small, the number of the shared video clips provided for the first terminal is small, so that the sharing efficiency of the second terminal is low. In order to solve the problem, in a possible implementation manner, it is considered that a time for a user having a part of the second terminals to watch the current live video is short, and therefore, a first cache time period corresponding to the part of the second terminals is short, so that a video sharing requirement of the first terminal cannot be met by a part of shared video segments of the second terminals at the current moment.
In summary, when the plurality of terminals send the video cache information of different live videos, the live identifiers of different live videos and the terminal identifiers to the server, the server can also send the pre-caching durations respectively corresponding to the plurality of terminals, so that the server can establish a corresponding relationship between the video cache information of the live videos sent by each terminal and the live identifiers, the pre-caching durations and the terminal identifiers of the live videos to store the video cache information, the live identifiers, the pre-caching durations and the terminal identifiers. Therefore, the method and the device for obtaining the video caching time can obtain the pre-caching time lengths corresponding to the candidate terminals based on the established corresponding relation, and obtain the second terminals from the candidate terminals according to the first caching time period, the video caching information and the pre-caching time lengths.
Further, first, according to the first caching period and the video caching information, a plurality of third terminals are obtained from a plurality of candidate terminals (the third terminals are terminals storing the shared video segments required by the first terminal at the current time), and the specific process is similar to the obtaining process of the second terminal in the first mode and is not repeated; then, under the condition that the number of the terminals of the third terminal is smaller than or equal to a preset value, acquiring a plurality of fourth terminals from the terminals to be screened according to the pre-caching duration, the first caching time period and the video caching information; the terminal to be screened is a terminal except the third terminal in the candidate terminals; then, the third terminal and the fourth terminal are treated as a plurality of second terminals.
The obtaining of the plurality of fourth terminals from the terminal to be screened according to the pre-caching duration, the first caching period and the video caching information may include: acquiring a third cache time period in which the current live video is cached in advance by the terminal to be screened according to the preset cache time period and the first cache time period, namely, taking the downloading starting time of the first cache time period as the downloading starting time of the third cache time period, wherein the time length between the latest downloading time of the third cache time period and the downloading starting time of the third cache time period is the preset cache time length; and acquiring the fourth terminal according to the third caching time period and the video caching information, wherein the specific process is similar to the acquiring process of the second terminal in the first mode, and is not repeated.
And step 406, the server sends terminal information to the first terminal, wherein the terminal information carries the terminal types respectively corresponding to the plurality of second terminals.
As can be seen from step 102, the server may store the terminal information of different terminals in advance, and therefore, in the embodiment of the present application, the stored terminal information corresponding to a plurality of second terminals may be obtained, so as to send the terminal information to the server. In this step, the terminal information may further carry at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals.
Step 407, the first terminal obtains the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals.
In this step, if the terminal information carries terminal types corresponding to the plurality of second terminals, the plurality of second terminals may be sorted according to a preset sharing priority order among different types of information included in the terminal types, so as to obtain a sharing order of the plurality of second terminals. Illustratively, if the terminal type includes different types of information: PC end, TV end, router terminal, mobile terminal, like this, it can be that from high to low to predetermine sharing priority order: router terminal, PC end, TV end, mobile end. In addition, this application can also acquire idle terminal in advance, if this idle terminal includes idle PC end to control idle PC end buffer memory present live video, at this moment, the terminal type can include idle PC end, non-idle PC end, TV end, router terminal, removal end, and it can be respectively from high to low to predetermine sharing priority order: router terminal, idle PC terminal, non-idle PC terminal, TV terminal, mobile terminal.
If the terminal information further carries at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, an attribution corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals, the step obtains the sharing sequence of the plurality of second terminals according to at least one of the network type corresponding to each of the plurality of second terminals, the operator corresponding to each of the plurality of second terminals, the attribution corresponding to each of the plurality of second terminals, and the uplink bandwidth corresponding to each of the plurality of second terminals, which are carried by the terminal information, and the terminal type corresponding to each of the plurality of second terminals.
Further, the method includes the steps that first a first preset sharing priority sequence among different carried information is obtained; the carried information includes at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals; then, acquiring a second preset sharing priority sequence among different types of information included in each carried information; then, acquiring first carried information corresponding to the highest priority in the first preset sharing priority sequence; the plurality of second terminals are sequenced according to a second preset sharing priority order among different types of information included in the first carried information to obtain a first sequencing result; and taking the next priority corresponding to the highest priority as a priority to be sorted, taking the first sorting result as a sorting result to be processed, circularly executing the sorting step on the sorting result to be processed according to the sorting priority to be sorted until the next priority corresponding to the priority to be sorted is not included in the first preset sharing priority sequence, stopping executing the sorting step, and acquiring the sharing sequence of the plurality of second terminals according to the final sorting result. Wherein the sorting step comprises: and acquiring second terminal carried information corresponding to the priority to be sorted, sorting the sorting results to be processed according to a second preset sharing priority sequence among different types of information included in the second terminal carried information to obtain a second sorting result, judging whether a next priority corresponding to the priority to be sorted is included in the first preset sharing priority sequence, wherein the first preset sharing priority sequence includes a next priority corresponding to the priority to be sorted, taking the next priority corresponding to the priority to be sorted as an updated priority to be sorted, taking the second sorting result as an updated sorting result to be processed, and sorting the second terminals according to the terminal information to obtain the sharing sequence of the second terminals.
For example, if the terminal information carries network types corresponding to a plurality of second terminals, operators corresponding to the plurality of second terminals, attributions corresponding to the plurality of second terminals, and uplink bandwidths corresponding to the plurality of second terminals, and the terminal types corresponding to the plurality of second terminals, respectively, the first preset sharing priority order is, from high to low: network type, operator, home location, uplink bandwidth and terminal type; then, the different types of information that the network type includes are LAN, public network and intranet etc. because information transmission speed is very fast between the different terminals in the LAN, the public network is convenient for connect, and the intranet is difficult to connect, therefore, the second between the different types of information that the network type includes is preset sharing priority order from high to low and is respectively: local area network, public network and intranet; the different types of information included by the operators are China Unicom, China telecom, China Mobile, China radio and television, and the like, and the second preset sharing priority sequence among the different types of information included by the operators is as follows: the priority of a first operator type corresponding to a first terminal is higher than that of a second operator type, and the second operator type is an operator type except the first operator type in different types of information included by operators; the different types of information included in the attribution are different region positions, and the second preset sharing priority sequence among the different types of information included in the attribution is as follows: the priority of a first region position to which the first terminal belongs is higher than that of a second region position, and the second region position is a region position except the first region position in different types of information included in a home area; the second preset sharing priority order among different types of information included in the uplink bandwidth is as follows: the higher the uplink bandwidth is, the higher the priority of the uplink bandwidth is, and conversely, the smaller the uplink bandwidth is, the lower the priority of the uplink bandwidth is; the different types of information included by the terminal type are a PC terminal, a TV terminal, a router terminal and a mobile terminal, and thus, the second preset sharing priority sequence among the different types of information included by the terminal type is respectively from high to low: router terminal, PC end, TV end, remove the end, in addition, this application can also acquire idle terminal in advance, be idle PC end if idle terminal to through idle PC end cache current live broadcast video, this moment, the different grade type information that the terminal type includes is router terminal, idle PC end, non-idle PC end, TV end, remove the end, then the second between the different grade type information that the terminal type includes is predetermine sharing priority order from high to low and is respectively: the above examples are merely illustrative, and the present application is not limited thereto.
And step 408, the first terminal screens shared terminals from the plurality of second terminals according to the sharing sequence, and performs video sharing through the shared terminals.
If the sharing sequence of the second terminal is more advanced, the video downloading efficiency of the second terminal is higher; and if the sharing sequence of the second terminal is more backward, the video downloading efficiency of the second terminal is lower. Therefore, the sharing terminal with higher video downloading efficiency can be obtained, so that the video downloading efficiency is higher, and the watching experience of a user is improved. Illustratively, if the plurality of second terminals include a1, a2, A3, …, An, n is a positive integer, and the sharing sequence of the plurality of second terminals sequentially includes from front to back: a1 > a2 > A3 > a4 > … > An, then a1 to a40 may be taken as the shared terminals in the case where the preset number of shared terminals is 40.
In addition, considering that the video downloading efficiency between terminals in the same local area network is greater than that between terminals in different local area networks, the method and the device can acquire a third terminal which is the same local area network as the first terminal from the shared terminal; then setting the window width of the transmission window of the third terminal as a first width, and setting the window width of the transmission window of the fourth terminal as a second width; the first width is greater than the second width; the fourth terminal is a terminal except the third terminal in the shared terminal; and then video sharing is carried out with the third terminal through the transmission window with the first width, and video sharing is carried out with the fourth terminal through the transmission window with the second width. Therefore, the transmission rate of the third terminal can be faster, and the video downloading efficiency is improved.
It should be noted that, during the process of watching the current live video, a user of the first terminal may perform a progress dragging operation on the current live video, so that the first terminal needs to reacquire a new shared terminal, specifically, firstly, the progress dragging operation of the user on the current live video may be received, then new video cache information of the current live video may be obtained according to the progress dragging operation, and the new video cache information and the current live identification may be sent to the server, so that the server may obtain a new second terminal according to the new video cache information and the current live identification, and thus the first terminal may screen the second terminal to obtain a new second terminal. Therefore, a new shared terminal can be obtained in time according to the progress dragging operation of the user, and the video watching experience of the user is improved.
Therefore, the second terminals can be sequenced based on the terminal types of the second terminals, so that the sharing sequence corresponding to the second terminal of the terminal type with higher downloading efficiency is forward, the sharing sequence corresponding to the second terminal of the terminal type with lower downloading efficiency is backward, the second terminal with the forward sharing sequence is used as the sharing terminal, the video downloading efficiency in the video sharing process can be improved, and the problem that the sequencing result is inaccurate and the video downloading efficiency is lower due to the fact that the sharing sequence is sequenced through the network type and the attribution place in the prior art is solved to a certain extent.
Referring to fig. 5, a flowchart of steps of an embodiment of a video sharing method according to the present application is shown, where terminal information further carries terminal identifiers corresponding to a plurality of second terminals, respectively, and storage locations where the plurality of second terminals store a current live video, and after a sharing terminal is screened from the plurality of second terminals according to the sharing sequence and video sharing is performed through the sharing terminal in step 408, the method may further include the following steps:
step 409, responding to the switching of the application program corresponding to the current live video from the foreground to the background, and judging whether the number of the terminals of the second terminal is greater than or equal to a preset number threshold.
In this step, in the process that the application program runs in the foreground, there may be a problem that another application program needs to be switched to the foreground, such as receiving a phone call or viewing information, which results in the application program being switched from the foreground to the background. However, in the prior art, when the application program is switched from the background to the foreground, a new second terminal needs to be acquired again, which results in cumbersome operation, and in the present application, in consideration of the fact that when the number of terminals of the second terminal is large, and when the application program is switched from the background to the foreground, a part of the second terminals still exist to perform video sharing, so that video sharing is performed through the part of the second terminals, and the larger the number of the second terminals is, the larger the number of the part of the second terminals exists is, the smaller the number of the second terminals is, the smaller the number of the part of the second terminals exists is, so that, in order to enable a sufficient part of the second terminals to perform video sharing, this step needs to determine whether the number of terminals of the second terminal is greater than or equal to a preset number threshold, so that in a subsequent step, when the number of terminals of the second terminal is greater than or equal to the preset number threshold, there may be no need to reacquire a new shared terminal.
If the number of terminals of the second terminal is greater than or equal to the preset number threshold, executing step 410, step 412 and step 413;
in case the number of terminals of the second terminal is less than the preset number threshold, step 411 is performed.
Step 410, storing the terminal identification and the storage location.
In step 411, the terminal identifier and the storage location are not stored.
Due to the fact that the number of the second terminals is small, under the condition that the application program is switched from a background to a foreground, the number of the second terminals capable of performing video sharing is small, and therefore video sharing is not utilized, and under the condition, the terminal identification and the storage position do not need to be stored.
Step 412, in response to the application program switching from the background to the foreground, acquiring the switching duration of the first terminal.
The switching duration comprises a duration between a first time and a second time, the first time is the time for switching the application program for the first time, the second time is the time for switching the application program for the second time, the first time is to switch the application program from a foreground to a background, the second time is to switch the application program from the background to the foreground, and the first time and the second time are to switch for two times continuously.
The application considers that if the application program is switched from the foreground to the background for a long time, the user of the second terminal can carry out any progress dragging operation on the current live video and can stop watching the current live video, and the like, so that the cache video segment of the second terminal is changed, and the changed cache video segment is not the shared video segment required by the request terminal, therefore, the application needs to acquire the switching time length of the first terminal, judge whether the switching time length is less than or equal to the preset time length threshold value, so that under the condition of short-time switching, video sharing is continuously carried out with the shared terminal, and under the condition of long-time switching, a new shared terminal is acquired again.
And 413, under the condition that the switching duration is less than or equal to the preset duration threshold, continuing to share the video with the sharing terminal according to the stored terminal identifier and the storage position.
In the step, the cached video clip stored by the sharing terminal can be obtained according to the terminal identifier and the storage position, so that video sharing is realized. In addition, if there are a specified number of terminals in the shared terminals that cannot share the video, the video sharing method and the video sharing device can acquire the specified number of terminals from the specified terminals according to the sharing sequence to share the video, wherein the specified terminals are terminals other than the shared terminals in the second terminal.
It should be noted that, when the switching duration is greater than the preset duration threshold, a new sharing terminal needs to be obtained again, so that video sharing is performed based on the new sharing terminal.
Therefore, the problem that the application program is switched between the foreground and the background is considered, whether the new shared terminal needs to be obtained again or not is judged based on the number of the terminals of the shared terminal and the switching duration, and therefore the complex operation that the new shared terminal needs to be obtained again under the condition that the shared terminal can provide the shared video clip for the first terminal is avoided.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 6, a block diagram of an embodiment of a video sharing system 60 of the present application is shown, where the system 60 includes a first terminal 601 and a server 602;
the first terminal 601 is configured to acquire video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal, and send the video cache information and the current live broadcast identifier to the server;
the server 602 is configured to determine a plurality of second terminals according to the video cache information and the current live broadcast identifier, acquire terminal types corresponding to the plurality of second terminals, and send terminal information to the first terminal, where the terminal information carries the terminal types corresponding to the plurality of second terminals;
the first terminal 601 is further configured to obtain a sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screen a sharing terminal from the plurality of second terminals according to the sharing sequence, and share a video through the sharing terminal.
Referring to fig. 7, a block diagram of an embodiment of a video sharing apparatus 70 according to the present application is shown, and applied to a first terminal, the apparatus may specifically include the following modules:
a live broadcast information obtaining module 701, configured to obtain video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal;
a live broadcast information sending module 702, configured to send the video cache information and the current live broadcast identifier to a server;
a terminal information receiving module 703, configured to receive terminal information sent by the server, where the terminal information carries terminal types corresponding to multiple second terminals respectively; the second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification;
a sharing sequence obtaining module 704, configured to obtain a sharing sequence of the plurality of second terminals according to terminal types respectively corresponding to the plurality of second terminals;
a shared terminal obtaining module 705, configured to screen a shared terminal from the multiple second terminals according to the sharing order;
and a video sharing module 706, configured to perform video sharing through the sharing terminal.
Optionally, the terminal information further carries at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals;
the sharing sequence obtaining module 704 is configured to obtain a sharing sequence of the plurality of second terminals according to at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals, which are carried by the terminal information.
Referring to fig. 8, in an alternative embodiment of the present application, the apparatus further comprises:
a first pre-receiving sequence obtaining module 707, configured to obtain a first preset sharing priority sequence between different pieces of carried information; the carried information includes at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals;
a second preset sequence obtaining module 708, configured to obtain a second preset sharing priority sequence between different types of information included in each piece of carried information;
the sharing sequence acquiring module 704 is configured to acquire first carried information corresponding to a highest priority in the first preset sharing priority sequence; the plurality of second terminals are sequenced according to a second preset sharing priority order among different types of information included in the first carried information to obtain a first sequencing result; and taking the next priority corresponding to the highest priority as a priority to be sorted, taking the first sorting result as a sorting result to be processed, circularly executing the sorting step on the sorting result to be processed according to the sorting priority to be sorted until the next priority corresponding to the priority to be sorted is not included in the first preset sharing priority sequence, stopping executing the sorting step, and acquiring the sharing sequence of the plurality of second terminals according to the final sorting result.
Optionally, the video caching information includes: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video.
Referring to fig. 9, in an alternative embodiment of the present application, the video sharing module 706 includes:
a terminal obtaining submodule 7061, configured to obtain, from the shared terminal, a third terminal in the same local area network as the first terminal;
a width setting submodule 7062, configured to set the window width of the transmission window of the third terminal to a first width, and set the window width of the transmission window of the fourth terminal to a second width; the first width is greater than the second width; the fourth terminal is a terminal except the third terminal in the shared terminal;
and the video sharing submodule 7063 is configured to perform video sharing with the third terminal through the transmission window with the first width, and perform video sharing with the fourth terminal through the transmission window with the second width.
Referring to fig. 10, in an optional embodiment of the present application, the terminal information further carries terminal identifiers corresponding to the plurality of second terminals, and storage locations where the plurality of second terminals store the current live video; the apparatus 70 further comprises:
a determining module 709, configured to determine, in response to switching of an application program corresponding to the current live video from a foreground to a background, whether the number of terminals of the second terminal is greater than or equal to a preset number threshold;
a storing module 710, configured to store the terminal identifier and the storage location when the number of terminals of the second terminal is greater than or equal to the preset number threshold.
Referring to fig. 11, in an alternative embodiment of the present application, the apparatus 70 further comprises:
a switching duration obtaining module 711, configured to obtain a switching duration of the first terminal in response to the application being switched from the background to the foreground;
and a continuous sharing module 712, configured to perform video sharing with the sharing terminal according to the stored terminal identifier and the storage location when the switching duration is less than or equal to a preset duration threshold.
Referring to fig. 12, a block diagram of an embodiment of a video sharing apparatus 120 of the present application is shown, and is applied to a server, and specifically includes the following modules:
a live broadcast information receiving module 1201, configured to receive video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal;
a terminal determining module 1202, configured to determine a plurality of second terminals according to the video caching information and the current live broadcast identifier;
a terminal type obtaining module 1203, configured to obtain terminal types corresponding to the multiple second terminals, respectively;
a terminal information sending module 1204, configured to send terminal information to the first terminal, where the terminal information carries terminal types corresponding to the multiple second terminals, respectively.
Referring to fig. 13, in an optional embodiment of the present application, the terminal determining module 1202 includes:
a candidate terminal obtaining submodule 12021, configured to obtain multiple candidate terminals according to the current live broadcast identifier;
a cache time period obtaining submodule 12022, configured to obtain a first cache time period in which the plurality of candidate terminals cache the current live video;
the second terminal obtaining submodule 12023 is configured to obtain the plurality of second terminals from the plurality of candidate terminals according to the first caching period and the video caching information.
In an optional embodiment of the present application, the second terminal obtaining submodule 12023 is configured to obtain, according to the video caching information, a second caching time period in which the first terminal caches the current live video; and determining that the candidate terminal corresponding to the first cache time period is the second terminal under the condition that the first cache time period and the second cache time period have overlapped time periods and the latest downloading time is included in the overlapped time periods.
Referring to fig. 14, in an optional embodiment of the present application, the terminal determining module 1202 further includes:
a pre-caching duration obtaining submodule 12024, configured to obtain pre-caching durations corresponding to the multiple candidate terminals;
the second terminal obtaining submodule 12023 is configured to obtain a plurality of third terminals from the plurality of candidate terminals according to the first caching period and the video caching information; under the condition that the number of the terminals of the third terminal is smaller than or equal to a preset numerical value, acquiring a plurality of fourth terminals from the terminals to be screened according to the pre-caching duration, the first caching time period and the video caching information; the terminal to be screened is a terminal except the third terminal in the candidate terminals; and taking the third terminal and the fourth terminal as the plurality of second terminals.
In the embodiment of the present invention, the video sharing system provided in fig. 6 and the video sharing apparatus provided in fig. 7 to fig. 14 can implement each process in the method embodiments of fig. 1 to fig. 5, and are not repeated here to avoid repetition.
The present application further provides a non-volatile readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a terminal device, the one or more modules may cause the terminal device to execute instructions (instructions) of method steps in the present application.
Fig. 15 is a schematic hardware structure diagram of a video sharing device according to an embodiment of the present application. As shown in fig. 15, the video sharing apparatus of the present embodiment includes a processor 151 and a memory 152.
The processor 151 executes the computer program code stored in the memory 152 to implement the video sharing method of fig. 1 to 5 in the above embodiments.
The memory 152 is configured to store various types of words to support operations in the video sharing method. Examples of these words include instructions for any application or method operating on the video sharing device, such as messages, pictures, videos, and so forth. The memory 152 may include a Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
Optionally, the processor 151 is provided in the processing component 150. The video sharing apparatus may further include: a communication component 153, a power component 154, a multimedia component 155, an audio component 156, an input/output interface 157 and/or a sensor component 158. The specific components included in the video sharing apparatus are set according to actual requirements, which is not limited in this embodiment.
The processing component 150 generally controls the overall operation of the video sharing device. Processing components 150 may include one or more processors 151 to execute instructions to perform all or a portion of the steps of the methods described above with respect to fig. 1-5. Further, the processing component 150 may include one or more modules that facilitate interaction between the processing component 150 and other components. For example, the processing component 150 may include a multimedia module to facilitate interaction between the multimedia component 155 and the processing component 150.
The power component 154 provides power to the various components of the video sharing device. The power components 154 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the video sharing device.
The multimedia component 155 includes a display screen that provides an output interface between the video sharing device and the user. In some embodiments, the display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the display screen includes a touch panel, the display screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 156 is configured to output and/or input audio signals. For example, audio component 156 includes a Microphone (MIC). The received audio signal may further be stored in the memory 152 or transmitted via the communication component 153. In some embodiments, audio assembly 156 further includes a speaker for outputting audio signals.
The input/output interface 157 provides an interface between the processing component 150 and peripheral interface modules, which may be click wheels, buttons, etc. These buttons may include, but are not limited to: a volume button, a start button, and a lock button.
The sensor component 158 includes one or more sensors for providing various aspects of status assessment for the video sharing device. For example, the sensor component 158 may detect the open/closed status of the video sharing device, the relative positioning of the components, the presence or absence of user contact with the video sharing device. The sensor assembly 158 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. In some embodiments, the sensor assembly 158 may also include a camera or the like.
The communication component 153 is configured to facilitate wired or wireless communication between the video sharing apparatus and other devices. The video sharing device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
From the above, the communication component 153, the audio component 156, the input/output interface 157 and the sensor component 158 involved in the embodiment of fig. 15 can be implemented as input devices.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable word processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable word processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable word processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable word processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The video sharing method and apparatus and the computer readable storage medium provided by the present application are introduced in detail above, and a specific example is applied in the present application to illustrate the principles and embodiments of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. A video sharing method is applied to a system comprising a first terminal and a server, and the method comprises the following steps:
the first terminal acquires video cache information and a current live broadcast identification of a current live broadcast video in the first terminal and sends the video cache information and the current live broadcast identification to the server;
the server determines a plurality of second terminals according to the video cache information and the current live broadcast identification, acquires terminal types corresponding to the second terminals respectively, and sends terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the second terminals respectively, the terminal identifications corresponding to the second terminals respectively, and storage positions where the second terminals store the current live broadcast video;
the first terminal acquires the sharing sequence of the second terminals according to the terminal types respectively corresponding to the second terminals, screens the sharing terminals from the second terminals according to the sharing sequence, and shares videos through the sharing terminals;
the first terminal responds to the fact that the application program corresponding to the current live video is switched from a foreground to a background, and whether the number of terminals of the second terminal is larger than or equal to a preset number threshold value or not is judged; storing the terminal identification and the storage position under the condition that the number of the terminals of the second terminal is greater than or equal to the preset number threshold;
the terminal types include: PC end, TV end, router terminal, mobile end.
2. A video sharing method applied to a first terminal, the method comprising:
acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal;
sending the video caching information and the current live broadcast identification to a server;
receiving terminal information sent by the server, wherein the terminal information carries terminal types respectively corresponding to a plurality of second terminals, terminal identifications respectively corresponding to the plurality of second terminals, and storage positions where the plurality of second terminals store the current live video; the second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification;
acquiring a sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screening shared terminals in the plurality of second terminals according to the sharing sequence, and sharing videos through the shared terminals;
responding to the switching of the application program corresponding to the current live video from a foreground to a background, and judging whether the number of the terminals of the second terminal is larger than or equal to a preset number threshold value;
storing the terminal identification and the storage position under the condition that the number of the terminals of the second terminal is greater than or equal to the preset number threshold;
the terminal types include: PC end, TV end, router terminal, mobile end.
3. The method according to claim 2, wherein the terminal information further carries at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals;
the obtaining the sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals includes:
and acquiring the sharing sequence of the plurality of second terminals according to at least one of the network types respectively corresponding to the plurality of second terminals carried by the terminal information, the operators respectively corresponding to the plurality of second terminals, the attributions respectively corresponding to the plurality of second terminals, the uplink bandwidths respectively corresponding to the plurality of second terminals, and the terminal types respectively corresponding to the plurality of second terminals.
4. The method of claim 3, further comprising:
acquiring a first preset sharing priority sequence among different carried information; the carried information includes at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, an uplink bandwidth corresponding to each of the plurality of second terminals, and a terminal type corresponding to each of the plurality of second terminals;
acquiring a second preset sharing priority sequence among different types of information included in each carried information;
the acquiring, according to at least one of a network type corresponding to each of the plurality of second terminals, an operator corresponding to each of the plurality of second terminals, a home location corresponding to each of the plurality of second terminals, and an uplink bandwidth corresponding to each of the plurality of second terminals, which are carried by the terminal information, and a terminal type corresponding to each of the plurality of second terminals, a sharing sequence of the plurality of second terminals includes:
acquiring first carried information corresponding to the highest priority in the first preset sharing priority sequence;
the plurality of second terminals are sequenced according to a second preset sharing priority order among different types of information included in the first carried information to obtain a first sequencing result;
and taking the next priority corresponding to the highest priority as a priority to be sorted, taking the first sorting result as a sorting result to be processed, circularly executing the sorting step on the sorting result to be processed according to the sorting priority to be sorted until the next priority corresponding to the priority to be sorted is not included in the first preset sharing priority sequence, stopping executing the sorting step, and acquiring the sharing sequence of the plurality of second terminals according to the final sorting result.
5. The method of claim 2, wherein the video buffering information comprises: the latest downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the cached time length of the current live video; or the initial downloading time of the current live video and the latest downloading time of the current live video.
6. The method according to claim 2, wherein the video sharing through the sharing terminal comprises:
acquiring a third terminal which is in the same local area network as the first terminal from the shared terminal;
setting the window width of the transmission window of the third terminal as a first width, and setting the window width of the transmission window of the fourth terminal as a second width; the first width is greater than the second width; the fourth terminal is a terminal except the third terminal in the shared terminal;
and performing video sharing with the third terminal through the transmission window with the first width, and performing video sharing with the fourth terminal through the transmission window with the second width.
7. The method of claim 2, further comprising, after said storing said terminal identification and said storage location:
responding to the application program to be switched from a background to a foreground, and acquiring the switching duration of the first terminal;
and under the condition that the switching time length is less than or equal to a preset time length threshold value, continuously carrying out video sharing with the sharing terminal according to the stored terminal identification and the storage position.
8. A video sharing method applied to a server, the method comprising:
receiving video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal;
determining a plurality of second terminals according to the video cache information and the current live broadcast identification, wherein the determining comprises the following steps: acquiring a plurality of candidate terminals according to the current live broadcast identification; acquiring a first caching time period for caching the current live video by the candidate terminals; acquiring pre-caching durations corresponding to the candidate terminals; acquiring a plurality of third terminals from the plurality of candidate terminals according to the first caching time period and the video caching information; under the condition that the number of the terminals of the third terminal is smaller than or equal to a preset numerical value, acquiring a plurality of fourth terminals from the terminals to be screened according to the pre-caching duration, the first caching time period and the video caching information; the terminal to be screened is a terminal except the third terminal in the candidate terminals; taking the third terminal and the fourth terminal as the plurality of second terminals;
acquiring terminal types respectively corresponding to the plurality of second terminals;
sending terminal information to the first terminal, wherein the terminal information carries terminal types corresponding to the plurality of second terminals respectively; the terminal types include: PC end, TV end, router terminal, mobile end.
9. The method according to claim 8, wherein the obtaining the plurality of second terminals from the plurality of candidate terminals according to the first buffering period and the video buffering information further comprises:
acquiring a second caching time period for caching the current live video by the first terminal according to the video caching information;
and determining that the candidate terminal corresponding to the first cache time period is the second terminal under the condition that the first cache time period and the second cache time period have an overlapping time period and the overlapping time period comprises the latest downloading time.
10. A video sharing system, characterized in that the system comprises a first terminal and a server;
the first terminal is used for acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal and sending the video cache information and the current live broadcast identifier to the server;
the server is used for determining a plurality of second terminals according to the video cache information and the current live broadcast identification, acquiring terminal types corresponding to the plurality of second terminals respectively, and sending terminal information to the first terminal, wherein the terminal information carries the terminal types corresponding to the plurality of second terminals respectively, the terminal identifications corresponding to the plurality of second terminals respectively, and storage positions where the plurality of second terminals store the current live broadcast video;
the first terminal is further configured to obtain a sharing sequence of the plurality of second terminals according to the terminal types respectively corresponding to the plurality of second terminals, screen a sharing terminal from the plurality of second terminals according to the sharing sequence, and share a video through the sharing terminal;
the first terminal responds to the fact that the application program corresponding to the current live video is switched from a foreground to a background, and whether the number of terminals of the second terminal is larger than or equal to a preset number threshold value or not is judged; storing the terminal identification and the storage position under the condition that the number of the terminals of the second terminal is greater than or equal to the preset number threshold;
the terminal types include: PC end, TV end, router terminal, mobile end.
11. A video sharing apparatus applied to a first terminal, the apparatus comprising:
the live broadcast information acquisition module is used for acquiring video cache information and a current live broadcast identifier of a current live broadcast video in the first terminal;
the live broadcast information sending module is used for sending the video cache information and the current live broadcast identification to a server;
a terminal information receiving module, configured to receive terminal information sent by the server, where the terminal information carries terminal types corresponding to multiple second terminals, terminal identifiers corresponding to the multiple second terminals, and storage locations where the multiple second terminals store the current live video; the second terminals are terminals determined by the server according to the video cache information and the current live broadcast identification;
a sharing sequence acquiring module, configured to acquire a sharing sequence of the plurality of second terminals according to terminal types respectively corresponding to the plurality of second terminals;
a shared terminal obtaining module, configured to screen a shared terminal from the multiple second terminals according to the sharing order;
the video sharing module is used for sharing videos through the sharing terminal;
the device is further used for responding to the switching of the application program corresponding to the current live video from a foreground to a background and judging whether the terminal number of the second terminal is larger than or equal to a preset number threshold value or not; storing the terminal identification and the storage position under the condition that the number of the terminals of the second terminal is greater than or equal to the preset number threshold;
the terminal types include: PC end, TV end, router terminal, mobile end.
12. A video sharing apparatus applied to a server, the apparatus comprising:
the live broadcast information receiving module is used for receiving video cache information and a current live broadcast identifier of a current live broadcast video sent by a first terminal;
the terminal determining module is used for determining a plurality of second terminals according to the video cache information and the current live broadcast identification;
the terminal type acquisition module is used for acquiring the terminal types respectively corresponding to the plurality of second terminals;
a terminal information sending module, configured to send terminal information to the first terminal, where the terminal information carries terminal types corresponding to the plurality of second terminals, respectively; the terminal types include: PC end, TV end, router terminal, mobile end;
the terminal determining module is specifically configured to obtain a plurality of candidate terminals according to the current live broadcast identifier; acquiring a first caching time period for caching the current live video by the candidate terminals; acquiring pre-caching durations corresponding to the candidate terminals; acquiring a plurality of third terminals from the plurality of candidate terminals according to the first caching time period and the video caching information; under the condition that the number of the terminals of the third terminal is smaller than or equal to a preset numerical value, acquiring a plurality of fourth terminals from the terminals to be screened according to the pre-caching duration, the first caching time period and the video caching information; the terminal to be screened is a terminal except the third terminal in the candidate terminals; and taking the third terminal and the fourth terminal as the plurality of second terminals.
13. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the video sharing method according to claim 1; or implementing a video sharing method as claimed in any one of claims 2 to 7; or implementing the steps of the video sharing method according to any of claims 8 to 9.
CN201910483031.XA 2019-06-04 2019-06-04 Video sharing method and device and computer readable storage medium Active CN110366047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910483031.XA CN110366047B (en) 2019-06-04 2019-06-04 Video sharing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910483031.XA CN110366047B (en) 2019-06-04 2019-06-04 Video sharing method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110366047A CN110366047A (en) 2019-10-22
CN110366047B true CN110366047B (en) 2022-02-11

Family

ID=68215473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910483031.XA Active CN110366047B (en) 2019-06-04 2019-06-04 Video sharing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110366047B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104741B (en) * 2020-09-21 2024-02-02 北京指掌易科技有限公司 Resource sharing method, device and system and gateway controller
CN112468829B (en) * 2020-11-11 2022-11-01 上海连尚网络科技有限公司 Sharing method of cache video, electronic device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1505526A1 (en) * 2003-08-07 2005-02-09 ABB Technology FLB Aktiebolag Peer-to-peer computing system
CN101562804A (en) * 2009-05-12 2009-10-21 中兴通讯股份有限公司 Region management server system based on mobile P2P and deploying method thereof
CN104023055A (en) * 2014-05-30 2014-09-03 北京金山网络科技有限公司 Video sharing method and system, and terminal device
CN104660656A (en) * 2013-11-25 2015-05-27 乐视网信息技术(北京)股份有限公司 P2P connecting method, server, terminal and communication system
CN106162371A (en) * 2015-03-30 2016-11-23 中科云网科技集团股份有限公司 Method, intelligent router and the mobile terminal that download limit, video limit is play

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588468B (en) * 2008-05-20 2013-08-07 华为技术有限公司 Medium playing method, medium playing device and medium playing system based on P2P

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1505526A1 (en) * 2003-08-07 2005-02-09 ABB Technology FLB Aktiebolag Peer-to-peer computing system
CN101562804A (en) * 2009-05-12 2009-10-21 中兴通讯股份有限公司 Region management server system based on mobile P2P and deploying method thereof
CN104660656A (en) * 2013-11-25 2015-05-27 乐视网信息技术(北京)股份有限公司 P2P connecting method, server, terminal and communication system
CN104023055A (en) * 2014-05-30 2014-09-03 北京金山网络科技有限公司 Video sharing method and system, and terminal device
CN106162371A (en) * 2015-03-30 2016-11-23 中科云网科技集团股份有限公司 Method, intelligent router and the mobile terminal that download limit, video limit is play

Also Published As

Publication number Publication date
CN110366047A (en) 2019-10-22

Similar Documents

Publication Publication Date Title
KR101652676B1 (en) System and apparatus for power efficient delivery of social network updates to a receiver device in a broadcast network
KR101933290B1 (en) Method, device and system for application updating
CN102546608B (en) For synchronously playing the method for media information, device, equipment and system
US8527648B2 (en) Systems, methods, and computer program products for optimizing content distribution in data networks
CN105656664A (en) Information display method and device
JP2016522477A (en) Group creation method, group withdrawal method, apparatus, program, and recording medium
US9756373B2 (en) Content streaming and broadcasting
CN107105323B (en) Video pushing method and device
CN113365087B (en) Video data processing method and device, electronic equipment and storage medium
CN110366047B (en) Video sharing method and device and computer readable storage medium
CN110769395B (en) Traffic-free service synchronization method and device
CN105100906A (en) Play control method and play control device
CN104601675A (en) Server load balancing method and device
US20220286740A1 (en) Method and apparatus for video playing
CN111385349B (en) Communication processing method, communication processing device, terminal, server and storage medium
CN113141513B (en) Live stream pulling method and device, electronic equipment and storage medium
CN113190777A (en) Data updating method and device, electronic equipment, storage medium and product
CN110620956A (en) Live broadcast virtual resource notification method and device, electronic equipment and storage medium
CN113365099B (en) Bullet screen issuing method, bullet screen receiving method, bullet screen issuing device, electronic equipment and storage medium
CN112616053B (en) Transcoding method and device for live video and electronic equipment
CN105827513B (en) Video information sharing method, device and equipment
CN107273125B (en) Method and system for remotely switching screen modes
CN114272600A (en) Control right switching system, method, device, equipment and storage medium
CN115225649A (en) Data synchronization method and device and electronic equipment
CN114172964B (en) Scheduling method, device, communication equipment and storage medium of content distribution network

Legal Events

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