WO2022111027A1 - Video acquisition method, electronic device, and storage medium - Google Patents

Video acquisition method, electronic device, and storage medium Download PDF

Info

Publication number
WO2022111027A1
WO2022111027A1 PCT/CN2021/120674 CN2021120674W WO2022111027A1 WO 2022111027 A1 WO2022111027 A1 WO 2022111027A1 CN 2021120674 W CN2021120674 W CN 2021120674W WO 2022111027 A1 WO2022111027 A1 WO 2022111027A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
service
node
terminal
server
Prior art date
Application number
PCT/CN2021/120674
Other languages
French (fr)
Chinese (zh)
Inventor
崔英林
Original Assignee
上海连尚网络科技有限公司
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 上海连尚网络科技有限公司 filed Critical 上海连尚网络科技有限公司
Publication of WO2022111027A1 publication Critical patent/WO2022111027A1/en

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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements

Definitions

  • the present application relates to Internet technologies, and in particular, to a video acquisition method, an electronic device, and a computer-readable storage medium.
  • CDN Content Delivery Network
  • Various aspects of the present application provide a video acquisition method, an electronic device, and a computer-readable storage medium, so as to save CDN service fees, improve the transmission speed and playback smoothness of video data, and thus improve user experience.
  • a video acquisition method comprising:
  • the video list includes: a video identifier of each video in at least one video and a plurality of video services that provide video services for each video. addresses of service nodes, the plurality of service nodes include at least one initial terminal node;
  • the acquisition request includes a video identifier of the target video, and the at least one video includes the target video;
  • the video data of the target video returned by the at least one initial terminal node is received, and the overlapping video data in the received video data of the target video is removed.
  • Another aspect of the present application provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the above aspect.
  • Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method provided in the above-mentioned aspect.
  • the video list after sending a video list acquisition request to a video server, and receiving a video list returned by the video server, the video list includes providing video services for each video in the video list. address of multiple service nodes, wherein the multiple service nodes include at least one initial terminal node; then, send an acquisition request of the target video to the at least one initial terminal node, and receive the target video returned by the at least one initial terminal node The video data, and then, remove the overlapping video data in the received video data of the target video, thereby obtaining the complete and non-overlapping video data of the target video, thereby realizing downloading the target video from the terminal or playing further
  • the target video avoids all video requests relying on CDN services, which will generate a certain amount of CDN service fees, and saves CDN service fees.
  • the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video, and the terminal with the video data of the video cached is incorporated into the service node to provide video services,
  • the terminals need to play the video, they can connect to this terminal to obtain the video data, thus bypassing the CDN service, preventing the terminal from accessing a certain CDN node centrally and affecting the transmission speed and playback smoothness of the video data, and improving the availability of the video service. , thereby improving the user experience.
  • FIG. 1 is a schematic flowchart of a video acquisition method provided by an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application.
  • FIG. 4 is a schematic diagram of a format of a data packet of video data in an embodiment of the application.
  • Fig. 5 is a schematic flowchart of data packet reception and deduplication corresponding to the embodiment shown in Fig. 4;
  • FIG. 6 is a block diagram of an exemplary video service system suitable for implementing embodiments of the present application.
  • FIG. 7 is a schematic flowchart of a video acquisition method provided by still another embodiment of the present application.
  • FIG. 8 is a block diagram of an exemplary computer system/server 12 suitable for use in implementing embodiments of the present application.
  • terminals involved in the embodiments of the present application may include but are not limited to mobile phones, personal digital assistants (Personal Digital Assistants, PDAs), wireless handheld devices, tablet computers (Tablet Computers), and personal computers (Personal Computers, PCs). ), MP3 players, MP4 players, wearable devices (eg, smart glasses, smart watches, smart bracelets, etc.), etc.
  • CDN is an intelligent virtual network based on the existing network. It relies on edge servers deployed in various places to distribute the content of the origin site to the nodes closest to the user, so that the user can obtain the desired content nearby and improve the response of user access. speed and success rate.
  • edge servers deployed in various places to distribute the content of the origin site to the nodes closest to the user, so that the user can obtain the desired content nearby and improve the response of user access. speed and success rate.
  • the CDN of each manufacturer exists in the form of distributed nodes. When a user requests to download a video, the server will randomly select an available CDN node in the CDN cluster for the user to use, so as to use the CDN node to the user. for video transmission.
  • FIG. 1 is a schematic flowchart of a video acquisition method provided by an embodiment of the present application, as shown in FIG. 1 .
  • the video list includes: a video identifier of each video in at least one video and addresses of multiple service nodes that provide video services for each video, and the multiple service nodes include at least one initial terminal node.
  • the video identification (ID) is used to uniquely identify a video, and the video ID may include the video's name, serial number, and the like.
  • At least one video in the video list may have a certain playing order, that is, the video identifier of the at least one video arranged in the playing order and the addresses of multiple service nodes that provide video services for each video respectively.
  • the video in this embodiment of the present application may be a video of any type and format, such as a long video or a short video.
  • a short video is also a short video or a small video, which is generally a short-length (for example, within 1 minute) video communication content that is broadcast on new Internet media.
  • short videos have the characteristics of fast output, wide influence and large number of participants, at present, short videos are gradually replacing text, pictures, and music, which is called the mainstream method of current media communication.
  • the acquisition request includes a video identifier of the target video, and the at least one video includes the target video.
  • the target video may be a video selected by the user from the video list, and in response to receiving the user's selection of a video from the video list and sending a play instruction, triggering The at least one initial terminal node sends an acquisition request for the target video.
  • the target video may also be triggered to send the target video to the at least one initial terminal node in response to the target video being played based on the current video to be played in the playback order in the video list. Get request for video.
  • execution bodies of 101 to 103 may be applications located in the terminal, or may also be functional units such as plug-ins or software development kits (Software Development Kit, SDK) in the application setting the terminal, or It may also be an application located in a network-side server, which is not particularly limited in this embodiment of the present application.
  • applications located in the terminal or may also be functional units such as plug-ins or software development kits (Software Development Kit, SDK) in the application setting the terminal, or It may also be an application located in a network-side server, which is not particularly limited in this embodiment of the present application.
  • the application may be a local program (nativeApp) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in this embodiment of the present application.
  • nativeApp native program
  • webApp web page program
  • the target video can be downloaded from the terminal or the target video can be further played, avoiding that all video requests depend on the CDN service, which will generate a certain CDN service fee, and save the CDN service fee.
  • the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video, and the terminal with the video data of the video cached is incorporated into the service node to provide video services,
  • the terminals need to play the video, they can connect to this terminal to obtain the video data, thus bypassing the CDN service, preventing the terminal from accessing a certain CDN node centrally and affecting the transmission speed and playback smoothness of the video data, and improving the availability of the video service. , thereby improving the user experience.
  • the at least one initial terminal node is m terminals determined by the video address server from the n terminals with video service capabilities as service nodes, then in 101, the video server is received.
  • the video address server may also determine m terminals from the n terminals with video service capabilities as the at least one initial terminal node.
  • m and n are integers greater than 0, respectively, and m is less than or equal to n.
  • the service capability information may include, for example, the bandwidth of the terminal, the number of currently connected terminals (that is, how many terminals are currently providing video services to), etc.
  • the video address server may be reported to the video address server by each terminal with video service capability, or the video The address server is obtained through interaction with each terminal with video service capability.
  • the video address server may select some terminals with better service capabilities as service nodes based on the service capability information of each of the n terminals with video service capabilities, and may also select some of the terminals in sequence or randomly.
  • the embodiment of the present application does not limit the specific selection method.
  • the video address server can select some terminals from the terminals with video service capabilities as service nodes to provide video services for the requester terminal that requests to obtain the video list this time, so that the video address server can evenly allocate and control The resource for the endpoint of the video service.
  • FIG. 2 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application. As shown in FIG. 2, after 102, it may further include:
  • the service completion request includes a video identifier of the target video.
  • the supplementary terminal node is a terminal selected by the video address server as a service node from among the terminals that have not been determined as a service node among the n terminals.
  • the acquisition request includes the video identifier of the target video.
  • the requester terminal that requests to obtain the video list this time can simultaneously receive at least one initial terminal node initially allocated by the video address server and the video data of the target video returned by the supplementary terminal node subsequently allocated based on the service completion request,
  • the requesting terminal can obtain the video data of the target video from more terminal nodes, which is beneficial to obtain the video data of the target video faster and more completely, thereby improving the playback fluency of the target video and improving the user's viewing experience.
  • the plurality of service nodes further include at least one CDN node, and the at least one CDN node may be specifically configured by the video address server based on the bandwidth, load, and relationship with this CDN node in the CDN cluster.
  • the location relationship between the requester terminals that request to obtain the video list this time is selected to provide video services for the requester terminal that requests to obtain the video list this time.
  • the requester terminal that requests to obtain the video list this time can also continue to monitor the reception of the video data, and responds that the number of data packets of the video data received within the preset time is less than the preset number. threshold value, continue to perform the operation of sending a service completion request to the video server, that is, re-execute the process of the embodiment shown in FIG. 2, and the video address server continues to select the terminal from the n terminals that have not been determined as the service node.
  • the requester terminal simultaneously requests the data request of the target video from the supplementary terminal node, until all the n terminals are selected as the requester terminal to obtain the service node of the target video, this
  • the address of the supplementary terminal node returned by the video server is empty
  • send the acquisition request of the target video to the CDN node wherein the The acquisition request includes the video identifier of the target video; and the video data of the target video returned by the CDN node is received.
  • a video service of a target video is provided through at least one initial terminal node.
  • a preset threshold it means that the The address of at least one initial terminal node is unavailable (inaccessible) or the service capability is poor.
  • priority is given to replenishing terminal nodes to provide video services until all terminal nodes that can provide this video service have been replenished and within a preset time. If the number of data packets of the video data received within is less than the preset threshold, the CDN node is scheduled to provide this video service, thereby ensuring the express delivery of the video data. Complete transfer.
  • the requester terminal that requests to obtain the video list this time maintains communication with the video server, and the video address server updates the physical number of n terminals with video service capabilities in real time.
  • the video address server updates the physical number of n terminals with video service capabilities in real time.
  • the requesting terminal may also receive an update from the video address server that has video services.
  • the address of the supplementary terminal node returned after the capable terminal, the supplementary terminal node is the terminal selected as the service node from the terminals that have not been determined as the service node from the updated t terminals with the video service capability, wherein, t is an integer greater than 0; at this time, stop executing the operation of receiving the video data of the target video returned by the CDN node, and start executing the acquisition request of sending the target video to the supplementary terminal node in 203 operation to simultaneously obtain the video data of the target video from the supplementary terminal node returned this time.
  • the requester terminal can be allocated a supplementary terminal node for providing this video service in time. To provide this video service, the requester terminal disconnects the CDN service to save CDN resources, thereby saving CDN resources while ensuring the video service capability.
  • the video list specifically includes: a video identifier of each video in at least one video, addresses and service capability information of n terminals having video service capabilities for each video.
  • the service capability information may include, for example, the bandwidth of the terminal, the number of currently connected terminals (that is, how many terminals are currently providing video services to), etc. It may be reported to the video address server by each terminal with video service capability, or the video The address server is obtained through interaction with each terminal with video service capability, and is provided to the video server by the video address server.
  • the method may further include: determining m terminals serving as the at least one initial terminal node from the n terminals.
  • some terminals with better service capabilities may be selected as service nodes based on the service capability information of each of the n terminals with video service capabilities, and some of the terminals may also be selected sequentially or randomly as service nodes.
  • the embodiments of the present application do not limit the specific selection method.
  • m and n are integers greater than 0, respectively, and m is less than or equal to n.
  • FIG. 3 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application. As shown in FIG. 3, after 102, it may further include:
  • a terminal In response to the number of data packets of the video data received within a preset time being less than a preset threshold, select a terminal as a service node from among the terminals that have not been determined as a service node in the n terminals, as a supplement. terminal node.
  • the acquisition request includes the video identifier of the target video.
  • this video service can be provided by at least one initial terminal node initially allocated by the video server, and when the number of data packets of the video data received within a preset time is less than a preset threshold, the request to obtain this time
  • the requester terminal of the video list can select supplementary terminals to provide this video service at the same time, so that the requester terminal can obtain the video data of the target video from more terminal nodes, which is beneficial to obtain the video data of the target video faster and more completely. , thereby improving the playback fluency of the target video and improving the user's viewing experience.
  • the plurality of service nodes further include at least one CDN node, and the at least one CDN node may be specifically configured by the video server based on the bandwidth, load, and correlation with the current CDN nodes in the CDN cluster.
  • the location relationship among the requester terminals that request to obtain the video list is selected to provide video services for the requester terminal that requests to obtain the video list this time.
  • the requester terminal that requests to obtain the video list this time can also continue to monitor the reception of the video data, in response to the number of data packets of the video data received within the preset time being less than the preset number. Threshold, continue to perform the operation of selecting the terminal as the service node as the supplementary terminal node from the terminals that have not been determined as the service node from the n terminals, that is, re-execute the process of the embodiment shown in FIG.
  • the requester terminal simultaneously requests the data request of the target video from the supplementary terminal node, until all the n terminals are selected as the service nodes for the requester terminal to obtain the target video, at this time, in response to the supplementary terminal not being obtained.
  • node send an acquisition request of the target video to the CDN node, wherein the acquisition request includes a video identifier of the target video; and receive the video data of the target video returned by the CDN node.
  • a video service of a target video is provided through at least one initial terminal node.
  • a preset threshold it means that the The address of at least one initial terminal node is unavailable (inaccessible) or the service capability is poor.
  • priority is given to replenishing terminal nodes to provide video services until all terminal nodes that can provide this video service have been replenished and within a preset time. If the number of data packets of the video data received within is less than the preset threshold, the CDN node is scheduled to provide this video service, thereby ensuring the express delivery of the video data. Complete transfer.
  • the requester terminal in response to not acquiring the supplementary terminal node, may also send a service completion request to the video server, where the service completion request includes the target video. , and receive the addresses of the updated t terminals with video service capabilities returned by the video server after the video address server updates the terminals with video service capabilities, where t is an integer greater than 0; Among the terminals that are not determined as service nodes among the t terminals, select the terminal as a service node as a supplementary terminal node; stop performing the operation of receiving the video data of the target video returned by the CDN node, and start executing The operation of sending the acquisition request of the target video to the supplemental terminal node in 302 is to simultaneously acquire the video data of the target video from the supplementary terminal node selected this time.
  • the video address server updates the terminal with video service capability, it can be provided to the requester terminal in time, so that the requester terminal can supplement the supplementary terminal node providing this video service in time.
  • the terminal nodes selected and allocated and selected provide the video service at the same time, and the requester terminal disconnects the CDN service to save CDN resources, thereby realizing the saving of CDN resources while ensuring the video service capability.
  • the video data of the target video is pre-divided into multiple video data segments according to a preset size before transmission, and each video data in the multiple video data segments is divided into multiple segments.
  • the segments are combined into one packet with an index assigned based on the sequence of each segment of video data in the target video. For the same video, it is divided into multiple video data segments according to the preset size, for example, every 1K is divided into one video data segment, and each video data segment is indexed at the same time, and the index and the corresponding video data segment are combined into one data segment.
  • the package to form the hair structure can be seen in Figure 4.
  • FIG. 4 it is a schematic diagram of a format of a data packet of video data in an embodiment of the present application.
  • Data represents the video data segments into which the target video is divided in the order of preset sizes, and 0, 1, .
  • the service node when transmitting video data, transmits the data packet obtained by combining the index and the corresponding video data segment as the smallest structure to the requester terminal.
  • This structure is different from the p2p video stream and cannot be played.
  • a preset encryption algorithm can be used to encrypt the data packet with the smallest structure.
  • the requesting terminal After receiving the data packet, the requesting terminal performs decryption processing according to the preset encryption algorithm to obtain the data packet, and extracts the video data segment. , thereby improving the security of data transmission.
  • the preset encryption algorithm may adopt any existing encryption algorithm, which will not be repeated in this embodiment of the present application.
  • the data packets of the video data of the target video returned by each terminal node in the at least one initial terminal node can be respectively received, and after adding the supplementary terminal node, the at least one initial terminal node and the supplementary terminal node are simultaneously returned.
  • the data packets of the video data of the target video and sequentially according to the index order, obtain the video data in a data packet where each index is located and store them in the buffer area of the terminal in sequence, and update the video data in the buffer area corresponding to the largest index value; discard other data packets with an index equal to the maximum index value, and data packets with an index smaller than the maximum index value.
  • FIG. 5 it is a schematic flowchart of data packet reception and deduplication corresponding to the embodiment shown in FIG. 4 .
  • the requesting terminal can obtain video data in a corresponding data packet in order of index and place it in the buffer area of the terminal where it is located, and at the same time update the video data in the current buffer area.
  • the maximum index value for example, first read the video data in the data packet with index 0 and place it in the buffer area of the terminal in order, update the maximum index value corresponding to the video data in the buffer area to 0, and then read the index value of index 1.
  • the video data in the data packet is placed in sequence after the video data corresponding to index 0 in the buffer area of the terminal where it is located, and the maximum value of the index corresponding to the video data in the buffer area is updated to 1, ..., and so on, read the data of index i
  • the video data in the package is placed in sequence after the video data corresponding to index i-1 in the buffer area of the terminal where it is located, and the maximum value of the index corresponding to the video data in the update buffer area is i, where i is an integer greater than 1; then , if a data packet with an index less than or equal to the maximum value of the index is received, since the video data in the data packet is already stored in the buffer area, in order to avoid overlapping and storing the same video data, all the data will be discarded.
  • the video data in the buffer area can also be stored.
  • the data is in turn sent to the player for playback.
  • the terminal user can determine whether the terminal provides video services.
  • video service options such as a "video service” switch button, can be set in the video APP that implements this embodiment. The user can choose to turn on or turn off the video service by operating the video service option. Since video services are provided to transmit video data, traffic will be generated on the terminal, and it is up to the terminal users to decide whether to provide video services. After the terminal starts the video service, the terminal's address will be reported to the video server as the video service address, so as to be added to the video address server. Since whether a terminal provides a video service is dynamically changed, the terminal needs to immediately notify the video server to update the addresses of multiple service nodes that provide the video service when turning on and off the video service.
  • it may further include: in response to receiving an instruction to start a video service sent by a user, acquiring the address of the terminal where it is located and a list of available video resources, where the list of available video resources includes at least one available video. according to the preset period, or in response to receiving the video data of a video, for example, after receiving the video data of the target video, report the address of the terminal where it is located and the list of available video resources to the video server, and the video server forwards it to a video address server, so that the video address server updates the address of the at least one available video service node, and adds the address of the terminal where it is located to the address of the at least one available video service node.
  • the terminal after the terminal starts the video service, it can report the address of the terminal and the list of available video resources to the video server, so that the video address server can include the terminal in the service node of the video in the list of available video resources, which is the service node of other terminals.
  • a video service that provides videos in the list of available video resources.
  • it may further include: in response to detecting that the video data of the available video is deleted in the available video resource list, reporting the address of the terminal where it is located and the invalid available video resource to the video server.
  • a list, the list of invalid available video resources includes available videos whose video data is deleted in the list of available video resources, and is forwarded by the video server to the video address server, so that the video address server has more addresses of the service nodes of the invalid available videos , delete the address of the terminal where the terminal is located from the address of the service node of the unavailable video.
  • the terminal After the terminal starts the video service, if it detects that the video data of the available video in the previously reported available video resource list is deleted, it reports the address of the terminal and the list of invalid available video resources to the video server in time, so that the video address
  • the server removes the terminal from the service nodes of the video in the available video resource list, so as to avoid being subsequently assigned to other terminals to provide video services of the video in the available video resource list and affecting the service effect.
  • FIG. 6 is a block diagram of an exemplary video service system suitable for implementing the embodiments of the present application.
  • the video service system includes a video server (ie, a CDN server) 601 , a video list server 602 and a video address server 603.
  • the video server 601 is used to manage and schedule CDN nodes and provide video services for the terminal.
  • the terminal can access the video server 601, send a video list acquisition request, and request to acquire the video list; the video list server 602 is used to generate a video list and send it to the video server
  • the video address server 603 is used to cache the addresses of all terminal nodes that provide video services for each video, and the video server 601 can obtain the addresses of the terminal nodes that provide video services for each video from the video address server 603, At the same time, the address of the terminal node that can provide the video service, and the list of available resources or the list of invalid available resources can be forwarded to the video address server 603 .
  • FIG. 7 is a schematic flowchart of a video acquisition method provided by still another embodiment of the present application, as shown in FIG. 7 .
  • the requester terminal sends a video list acquisition request to a video server.
  • the video server forwards the video list acquisition request to the video list server, and receives the recommended video list returned by the video list server.
  • the recommended video list includes video identifiers of videos recommended by the video list server, where the video identifiers are used to uniquely identify a video, and the video ID may include the name, serial number, and the like of the video.
  • the videos in the video recommendation list may have a certain playback order, that is, they may be video identifiers of multiple videos arranged in the playback order.
  • the video server requests the video address server for a playback address of the video in the recommended video list.
  • the video address server respectively determines the terminal nodes of each video in the recommended video list, and returns the recommended video list after adding the addresses of the terminal nodes to the video server.
  • the video address server determines the terminal node of each video in the recommended video list, it can obtain n number of available video resources including the video according to the address of the terminal and the list of available video resources reported by the terminal that opened the video service before.
  • the terminal is used as a terminal with the current video service capability, and m terminals are selected as service nodes, that is, m terminal nodes are obtained.
  • the video server adds the address of at least one CDN node to the recommended video list after adding the address of the terminal node, obtains the video list, and returns it to the requester terminal.
  • the video list includes: a video identifier of each video in the recommended video list, addresses of multiple service nodes that provide video services for each video, and addresses of n terminals with video service capabilities, the The plurality of service nodes include at least one CDN node and at least one initial termination node.
  • the addresses of all CDN nodes are stored in the video server, and the video server can select at least the A CDN node that provides video services for the requester terminal that requests to obtain the video list this time.
  • the requester terminal establishes connections with m terminal nodes, sends an acquisition request of the target video to the m terminal nodes, and divides a buffer for receiving video data in its own storage space.
  • the acquisition request includes a video identifier of the target video, and the at least one video includes the target video.
  • the requester terminal receives the video data of the target video returned by m terminal nodes, and removes the overlapping video data in the video data of the received target video, and places the complete, non-overlapping video data of the target video in the buffer area. .
  • the overlapping video data in the received video data of the target video can be removed by the method of the above-mentioned embodiments of the present application, and the complete, non-overlapping video data of the target video can be placed in the buffer, which will not be repeated here.
  • a terminal is selected from the remaining n-m terminals as a service node, and operations 706-707 are repeated.
  • n-m is less than or equal to 0, the CDN node is included in the video server, provides video data, sends a request for obtaining the target video to the CDN node, and receives the video data of the target video returned by the CDN node. For details, see The foregoing embodiments are not repeated here.
  • the requester terminal communicates with the video server regularly, and updates the addresses of n terminals with video service capabilities in real time. If n-m is greater than 0 after a certain period of time, that is, a new terminal with video service capabilities is added, and can be disconnected. CDN service, release CDN resources in time, and perform operations 706-707 again.
  • the requester terminal sends the video data in the buffer area to the player for playback.
  • the technical solutions of the present application can be applied to video applications in any device such as a terminal and a video server.
  • the target video can be downloaded from the terminal or the target video can be further played, avoiding that all video requests depend on CDN services and certain CDN service fees will be generated, Save on CDN service fees.
  • the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video to cache the video data of the video.
  • the terminal is included in the service node to provide video services. When other terminals need to play the video, they can connect to this terminal to obtain video data, thereby bypassing the CDN service and avoiding the centralized access of the terminal to a CDN node to affect the transmission speed and speed of video data. Playback fluency increases the usability of video services, thereby improving user experience.
  • Figure 8 shows a block diagram of an exemplary computer system/server 12 suitable for use in implementing embodiments of the present application.
  • the computer system/server 12 shown in FIG. 8 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present application.
  • computer system/server 12 takes the form of a general purpose computing device.
  • Components of computer system/server 12 may include, but are not limited to, one or more processors or processing units 16, storage or system memory 28, and a bus 18 connecting various system components including system memory 28 and processing unit 16.
  • Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
  • these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
  • Computer system/server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer system/server 12, including both volatile and non-volatile media, removable and non-removable media.
  • System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 .
  • Computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
  • storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive”).
  • a disk drive may be provided for reading and writing to removable non-volatile magnetic disks (eg "floppy disks"), as well as removable non-volatile optical disks (eg CD-ROM, DVD-ROM) or other optical media) to read and write optical drives.
  • each drive may be connected to bus 18 through one or more data media interfaces.
  • System memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
  • a program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other Program modules and program data, each or some combination of these examples may include an implementation of a network environment.
  • Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
  • the computer system/server 12 may also communicate with one or more external devices 14 (eg, keyboard, pointing device, display 24, etc.), and may also communicate with one or more devices that enable a user to interact with the computer system/server 12, and/or with any device (eg, network card, modem, etc.) that enables the computer system/server 12 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 44 . Also, the computer system/server 12 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 20 . As shown in FIG.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • network adapter 20 communicates with other modules of computer system/server 12 via bus 18 .
  • bus 18 It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with computer system/server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, Tape drives and data backup storage systems, etc.
  • the processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , for example, implementing the method provided by any of the embodiments corresponding to FIG. 1 to FIG. 7 .
  • Another embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method provided by any of the embodiments corresponding to FIG. 1 to FIG. 7 . .
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).
  • LAN local area network
  • WAN wide area network
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or page components may be combined. Either it can be integrated into another system, or some features can be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
  • the above-mentioned integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium, and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute parts of the methods described in the various embodiments of the present application step.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

Provided are a video acquisition method, an electronic device, and a computer-readable storage medium. The method in the present application comprises: sending a video list acquisition request to a video server, and receiving a video list returned by the video server, wherein the video list comprises addresses of multiple service nodes providing video service for each video, and the multiple service nodes comprise at least one initial terminal node; then, sending an acquisition request for a target video to the at least one initial terminal node; receiving video data of the target video returned by the at least one initial terminal node, and removing duplicated video data in the received video data of the target video, so as to download the target video from a terminal or further play the target video, thereby saving CDN service costs, avoiding impact on transmission speed and video data playback fluency due to concentrated access to a certain CDN node by the terminal , improving video service availability, and improving the user experience.

Description

视频获取方法、电子设备及存储介质Video acquisition method, electronic device and storage medium
本申请是以CN申请号为202011341280.4,申请日为2020.11.25的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。This application is based on the application with CN application number of 202011341280.4 and the filing date of 2020.11.25, and claims its priority. The disclosure content of this CN application is hereby incorporated into this application as a whole.
技术领域technical field
本申请涉及互联网技术,尤其涉及一种视频获取方法、电子设备及计算机可读存储介质。The present application relates to Internet technologies, and in particular, to a video acquisition method, an electronic device, and a computer-readable storage medium.
背景技术Background technique
近几年,随着音视频技术、自媒体技术和互联网技术的快速发展,以及智能手机、平板电脑等智能终端在人们的日常生活中日益普及,使得越来越多的人可以随手拍摄短视频,社交平台的交流和更新由原来的文字传播渐渐转变为短视频传播。In recent years, with the rapid development of audio and video technology, self-media technology and Internet technology, and the increasing popularity of smart terminals such as smartphones and tablet computers in people's daily lives, more and more people can shoot short videos at will. , the communication and update of social platforms has gradually changed from the original text communication to short video communication.
内容分发网络(Content Delivery Network,CDN)是一种现有网络基础之上的智能虚拟网络,其依靠部署在各地的边缘服务器,将源站内容分发至最接近用户的节点,使用户可以就近获取所需内容,提高用户访问的响应速度和成功率。Content Delivery Network (CDN) is an intelligent virtual network based on the existing network. It relies on edge servers deployed in various places to distribute the content of the source site to the nodes closest to the user, so that the user can obtain it nearby. Required content to improve the responsiveness and success rate of user access.
现在技术中,用户通过终端观看或者下载短视频时,向CDN服务器获取视频列表,然后解析该视频列表获取视频播放地址,其中的视频播放地址一般是CDN节点的地址,进而从CDN节点请求视频数据。由于所有视频请求都依赖CDN服务,会产生一定的CDN服务费用;另外,可能由于终端集中访问某一CDN节点影响视频数据的传输速度和播放流畅性,从而影响用户体验。In the current technology, when a user watches or downloads a short video through a terminal, he obtains a video list from the CDN server, and then parses the video list to obtain the video playback address, where the video playback address is generally the address of the CDN node, and then requests the video data from the CDN node. . Since all video requests rely on CDN services, certain CDN service fees will be incurred; in addition, the transmission speed and playback fluency of video data may be affected by the centralized access of terminals to a CDN node, thereby affecting user experience.
发明内容SUMMARY OF THE INVENTION
本申请的多个方面提供一种视频获取方法、电子设备及计算机可读存储介质,以节省CDN服务费用,提升视频数据的传输速度和播放流畅性,从而改善用户体验。Various aspects of the present application provide a video acquisition method, an electronic device, and a computer-readable storage medium, so as to save CDN service fees, improve the transmission speed and playback smoothness of video data, and thus improve user experience.
本申请的一方面,提供一种视频获取方法,包括:In one aspect of the present application, a video acquisition method is provided, comprising:
向视频服务器发送视频列表获取请求,并接收所述视频服务器返回的视频列表;其中,所述视频列表包括:至少一个视频中每个视频的视频标识和为所述每个视频提供视频服务的多个服务节点的地址,所述多个服务节点包括至少一个初始终端节点;Send a video list acquisition request to a video server, and receive a video list returned by the video server; wherein, the video list includes: a video identifier of each video in at least one video and a plurality of video services that provide video services for each video. addresses of service nodes, the plurality of service nodes include at least one initial terminal node;
向所述至少一个初始终端节点发送目标视频的获取请求;其中,所述获取请求中包括目标视频的视频标识,所述至少一个视频包括所述目标视频;Send an acquisition request of the target video to the at least one initial terminal node; wherein, the acquisition request includes a video identifier of the target video, and the at least one video includes the target video;
接收所述至少一个初始终端节点返回的所述目标视频的视频数据,并去除接收到的所述目标视频的视频数据中的重合视频数据。The video data of the target video returned by the at least one initial terminal node is received, and the overlapping video data in the received video data of the target video is removed.
本申请的另一方面,提供一种电子设备,所述电子设备包括:Another aspect of the present application provides an electronic device, the electronic device comprising:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,storage means for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述一方面所提供的方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the above aspect.
本申请的另一方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述一方面所提供的方法。Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method provided in the above-mentioned aspect.
由上述技术方案可知,在本申请实施例中,通过向视频服务器发送视频列表获取请求后,并接收所述视频服务器返回的视频列表,所述视频列表包括为视频列表中每个视频提供视频服务的多个服务节点的地址,其中的多个服务节点包括至少一个初始终端节点;然后,向所述至少一个初始终端节点发送目标视频的获取请求,接收所述至少一个初始终端节点返回的目标视频的视频数据,进而,去除接收到的所述目标视频的视频数据中的重合视频数据,从而得到所述目标视频的完整且不重合的视频数据,从而实现了从终端下载该目标视频或进一步播放该目标视频,避免了所有视频请求都依赖CDN服务、会产生一定的CDN服务费用,节省了CDN服务费用。It can be known from the above technical solutions that in the embodiment of the present application, after sending a video list acquisition request to a video server, and receiving a video list returned by the video server, the video list includes providing video services for each video in the video list. address of multiple service nodes, wherein the multiple service nodes include at least one initial terminal node; then, send an acquisition request of the target video to the at least one initial terminal node, and receive the target video returned by the at least one initial terminal node The video data, and then, remove the overlapping video data in the received video data of the target video, thereby obtaining the complete and non-overlapping video data of the target video, thereby realizing downloading the target video from the terminal or playing further The target video avoids all video requests relying on CDN services, which will generate a certain amount of CDN service fees, and saves CDN service fees.
另外,采用本申请所提供的技术方案,将终端中已经播放或者下载视频的视频数据作为缓存,利用终端作为视频的微型服务器,将缓存有视频的视频数据的终端纳入服务节点来提供视频服务,其他终端在需要播放该视频时,可以连接到这台终端获取视频数据,从而绕过CDN服务,可以避免终端集中访问某一CDN节点影响视频数据的传输速度和播放流畅性,提升了视频服务可用性,从而改善了用户体验。In addition, using the technical solution provided by the present application, the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video, and the terminal with the video data of the video cached is incorporated into the service node to provide video services, When other terminals need to play the video, they can connect to this terminal to obtain the video data, thus bypassing the CDN service, preventing the terminal from accessing a certain CDN node centrally and affecting the transmission speed and playback smoothness of the video data, and improving the availability of the video service. , thereby improving the user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这 些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that are required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are from the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本申请一实施例提供的视频获取方法的流程示意图;1 is a schematic flowchart of a video acquisition method provided by an embodiment of the present application;
图2为本申请另一实施例提供的视频获取方法的流程示意图;2 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application;
图3为本申请又一实施例提供的视频获取方法的流程示意图;3 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application;
图4为本申请实施例中视频数据的数据包的一个格式示意图;4 is a schematic diagram of a format of a data packet of video data in an embodiment of the application;
图5为图4所示实施例对应的数据包接收和去重的一个流程示意图;Fig. 5 is a schematic flowchart of data packet reception and deduplication corresponding to the embodiment shown in Fig. 4;
图6为适于用来实现本申请实施例的示例性视频服务系统的框图;6 is a block diagram of an exemplary video service system suitable for implementing embodiments of the present application;
图7为本申请再一实施例提供的视频获取方法的流程示意图;FIG. 7 is a schematic flowchart of a video acquisition method provided by still another embodiment of the present application;
图8为适于用来实现本申请实施方式的示例性计算机系统/服务器12的框图。FIG. 8 is a block diagram of an exemplary computer system/server 12 suitable for use in implementing embodiments of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的全部其它实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
需要说明的是,本申请实施例中所涉及的终端可以包括但不限于手机、个人数字助理(Personal Digital Assistant,PDA)、无线手持设备、平板电脑(Tablet Computer)、个人电脑(Personal Computer,PC)、MP3播放器、MP4播放器、可穿戴设备(例如,智能眼镜、智能手表、智能手环等)等。It should be noted that the terminals involved in the embodiments of the present application may include but are not limited to mobile phones, personal digital assistants (Personal Digital Assistants, PDAs), wireless handheld devices, tablet computers (Tablet Computers), and personal computers (Personal Computers, PCs). ), MP3 players, MP4 players, wearable devices (eg, smart glasses, smart watches, smart bracelets, etc.), etc.
另外,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。In addition, the term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, There are three cases of B alone. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship.
CDN是一种现有网络基础之上的智能虚拟网络,其依靠部署在各地的边缘服务器,将源站内容分发至最接近用户的节点,使用户可以就近获取所需内容,提高用户访问的响应速度和成功率。通常,各个厂商的CDN是以分布式节点的形式存在的,当某个用户请求下载视频时,服务器会在CDN集群中随机选择一个可用的CDN节点供用户进行使用,以通过该CDN节点对用户进行视频传输。CDN is an intelligent virtual network based on the existing network. It relies on edge servers deployed in various places to distribute the content of the origin site to the nodes closest to the user, so that the user can obtain the desired content nearby and improve the response of user access. speed and success rate. Usually, the CDN of each manufacturer exists in the form of distributed nodes. When a user requests to download a video, the server will randomly select an available CDN node in the CDN cluster for the user to use, so as to use the CDN node to the user. for video transmission.
现在技术中,用户通过终端观看或者下载短视频时,向CDN服务器获取视频列表,然后解析该视频列表获取视频播放地址,其中的视频播放地址一般是CDN节点的地址,进而从CDN节点请求视频数据。而随着短视频业务的迅速发展,向用户提供短视频制作和传播的各种应用程序(APP),例如抖音、火山、快手等,也如雨后春笋般出现,使得用户可以随时随地下载、观看短视频,带宽及转码需求的不断升高导致成本不断升高,由于所有视频请求都依赖CDN服务,现有的CDN调度系统需要依靠不计成本的加大带宽和CDN节点数量以满足需要。另外,可能由于终端集中访问某一CDN节点影响视频数据的传输速度和播放流畅性,从而影响用户体验。In the current technology, when a user watches or downloads a short video through a terminal, he obtains a video list from the CDN server, and then parses the video list to obtain the video playback address, where the video playback address is generally the address of the CDN node, and then requests the video data from the CDN node. . With the rapid development of short video business, various applications (APPs) that provide users with short video production and dissemination, such as Douyin, Volcano, Kuaishou, etc., have also sprung up, allowing users to download and watch anytime, anywhere. Short videos, increasing bandwidth and transcoding requirements lead to rising costs. Since all video requests rely on CDN services, the existing CDN scheduling system needs to increase bandwidth and the number of CDN nodes regardless of cost. In addition, the transmission speed and playback smoothness of the video data may be affected by the centralized access of a certain CDN node by the terminal, thereby affecting the user experience.
因此,亟需提供一种视频获取方法,以节省CDN服务费用,提升视频数据的传输速度和播放流畅性,从而改善用户体验。Therefore, there is an urgent need to provide a video acquisition method, so as to save the cost of CDN services, improve the transmission speed and playback smoothness of video data, and improve user experience.
图1为本申请一实施例提供的视频获取方法的流程示意图,如图1所示。FIG. 1 is a schematic flowchart of a video acquisition method provided by an embodiment of the present application, as shown in FIG. 1 .
101、向视频服务器发送视频列表获取请求,并接收所述视频服务器返回的视频列表。101. Send a video list acquisition request to a video server, and receive a video list returned by the video server.
其中,所述视频列表包括:至少一个视频中每个视频的视频标识和为所述每个视频提供视频服务的多个服务节点的地址,所述多个服务节点包括至少一个初始终端节点。其中的视频标识(ID)用于唯一标识一个视频,视频ID可以包括视频的名称、编号等。所述视频列表中的至少一个视频可以具有一定的播放顺序,即可以是按照播放顺序排列的至少一个视频的视频标识和分别为每个视频提供视频服务的多个服务节点的地址。The video list includes: a video identifier of each video in at least one video and addresses of multiple service nodes that provide video services for each video, and the multiple service nodes include at least one initial terminal node. The video identification (ID) is used to uniquely identify a video, and the video ID may include the video's name, serial number, and the like. At least one video in the video list may have a certain playing order, that is, the video identifier of the at least one video arranged in the playing order and the addresses of multiple service nodes that provide video services for each video respectively.
本申请实施例中的视频可以是任意类型、格式的视频,例如长视频或者短视频。其中,短视频也即短片视频或小视频,一般是在互联网新媒体上传播的时长较短(例如在1分钟以内)的视频传播内容。由于短视频具有产出速度快、影响范围广、参与人数多的特点,目前,短视频正逐步取代文本、图片、音乐,称为当下媒体传播的主流方式。The video in this embodiment of the present application may be a video of any type and format, such as a long video or a short video. Among them, a short video is also a short video or a small video, which is generally a short-length (for example, within 1 minute) video communication content that is broadcast on new Internet media. Because short videos have the characteristics of fast output, wide influence and large number of participants, at present, short videos are gradually replacing text, pictures, and music, which is called the mainstream method of current media communication.
102、向所述至少一个初始终端节点发送目标视频的获取请求。102. Send an acquisition request of the target video to the at least one initial terminal node.
其中,所述获取请求中包括目标视频的视频标识,所述至少一个视频包括所述目标视频。Wherein, the acquisition request includes a video identifier of the target video, and the at least one video includes the target video.
可选地,在其中一些实现方式中,所述目标视频可以是由用户从所述视频列表中选择的视频,响应于接收到用户从所述视频列表中选择视频并发送播放指令,触 发向所述至少一个初始终端节点发送目标视频的获取请求。Optionally, in some of these implementations, the target video may be a video selected by the user from the video list, and in response to receiving the user's selection of a video from the video list and sending a play instruction, triggering The at least one initial terminal node sends an acquisition request for the target video.
或者,在另一些实现方式中,所述目标视频也可以基于所述视频列表中的播放顺序即将播放的当前视频,响应于即将开始播放该目标视频,触发向所述至少一个初始终端节点发送目标视频的获取请求。Alternatively, in some other implementations, the target video may also be triggered to send the target video to the at least one initial terminal node in response to the target video being played based on the current video to be played in the playback order in the video list. Get request for video.
103、接收所述至少一个初始终端节点返回的所述目标视频的视频数据,并去除接收到的所述目标视频的视频数据中的重合视频数据。103. Receive the video data of the target video returned by the at least one initial terminal node, and remove the overlapping video data in the received video data of the target video.
需要说明的是,101~103的执行主体的部分或全部可以为位于终端的应用,或者还可以为设置终端的应用中的插件或软件开发工具包(Software Development Kit,SDK)等功能单元,或者还可以为位于网络侧服务器中的应用,本申请实施例对此不进行特别限定。It should be noted that some or all of the execution bodies of 101 to 103 may be applications located in the terminal, or may also be functional units such as plug-ins or software development kits (Software Development Kit, SDK) in the application setting the terminal, or It may also be an application located in a network-side server, which is not particularly limited in this embodiment of the present application.
可以理解的是,所述应用可以是安装在终端上的本地程序(nativeApp),或者还可以是终端上的浏览器的一个网页程序(webApp),本申请实施例对此不进行限定。It can be understood that the application may be a local program (nativeApp) installed on the terminal, or may also be a web page program (webApp) of a browser on the terminal, which is not limited in this embodiment of the present application.
这样,实现了从终端下载该目标视频或进一步播放该目标视频,避免了所有视频请求都依赖CDN服务、会产生一定的CDN服务费用,节省了CDN服务费用。In this way, the target video can be downloaded from the terminal or the target video can be further played, avoiding that all video requests depend on the CDN service, which will generate a certain CDN service fee, and save the CDN service fee.
另外,采用本申请所提供的技术方案,将终端中已经播放或者下载视频的视频数据作为缓存,利用终端作为视频的微型服务器,将缓存有视频的视频数据的终端纳入服务节点来提供视频服务,其他终端在需要播放该视频时,可以连接到这台终端获取视频数据,从而绕过CDN服务,可以避免终端集中访问某一CDN节点影响视频数据的传输速度和播放流畅性,提升了视频服务可用性,从而改善了用户体验。In addition, using the technical solution provided by the present application, the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video, and the terminal with the video data of the video cached is incorporated into the service node to provide video services, When other terminals need to play the video, they can connect to this terminal to obtain the video data, thus bypassing the CDN service, preventing the terminal from accessing a certain CDN node centrally and affecting the transmission speed and playback smoothness of the video data, and improving the availability of the video service. , thereby improving the user experience.
可选地,在其中一些实现方式中,所述至少一个初始终端节点为视频地址服务器从具有视频服务能力的n个终端中确定的、作为服务节点的m个终端,则在101中接收视频服务器返回的视频列表之前,还可以由视频地址服务器,基于具有视频服务能力的n个终端的地址和服务能力信息,从该具有视频服务能力的n个终端中确定m个终端作为所述至少一个初始终端节点。其中,m、n分别为大于0的整数,且m小于或等于n。其中的服务能力信息例如可以包括终端的带宽、当前已接入的终端数量(即当前向多少终端提供视频服务)等,可以由具有视频服务能力的各终端上报给视频地址服务器,也可以由视频地址服务器与具有视频服务能力的各终端交互获得。例如,视频地址服务器可以基于具有视频服务能力的n个终端中各终端的 服务能力信息,来选取服务能力较好的部分终端作为服务节点,另外,也可以按照顺序选取或随机选取其中的部分终端作为服务节点,本申请实施例对具体的选取方式不做限制。Optionally, in some of the implementations, the at least one initial terminal node is m terminals determined by the video address server from the n terminals with video service capabilities as service nodes, then in 101, the video server is received. Before the returned video list, the video address server may also determine m terminals from the n terminals with video service capabilities as the at least one initial terminal node. Wherein, m and n are integers greater than 0, respectively, and m is less than or equal to n. The service capability information may include, for example, the bandwidth of the terminal, the number of currently connected terminals (that is, how many terminals are currently providing video services to), etc. It may be reported to the video address server by each terminal with video service capability, or the video The address server is obtained through interaction with each terminal with video service capability. For example, the video address server may select some terminals with better service capabilities as service nodes based on the service capability information of each of the n terminals with video service capabilities, and may also select some of the terminals in sequence or randomly. As a service node, the embodiment of the present application does not limit the specific selection method.
基于本实施例,可以由视频地址服务器从具有视频服务能力的终端中选取部分终端作为服务节点,以针对本次请求获取视频列表的请求方终端提供视频服务,从而由视频地址服务器均衡分配和调控视频服务的终端节点的资源。Based on this embodiment, the video address server can select some terminals from the terminals with video service capabilities as service nodes to provide video services for the requester terminal that requests to obtain the video list this time, so that the video address server can evenly allocate and control The resource for the endpoint of the video service.
图2为本申请另一实施例提供的视频获取方法的流程示意图,如图2所示,在102之后,还可以包括:FIG. 2 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application. As shown in FIG. 2, after 102, it may further include:
201、响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,向所述视频服务器发送服务补全请求。201. Send a service completion request to the video server in response to the number of data packets of the video data received within a preset time being less than a preset threshold.
所述服务补全请求中包括所述目标视频的视频标识。The service completion request includes a video identifier of the target video.
202、接收所述视频服务器返回的补充终端节点的地址。202. Receive the address of the supplementary terminal node returned by the video server.
其中,所述补充终端节点为视频地址服务器从所述n个终端中未被确定作为服务节点的终端中、选取作为服务节点的终端。The supplementary terminal node is a terminal selected by the video address server as a service node from among the terminals that have not been determined as a service node among the n terminals.
203、向所述补充终端节点发送所述目标视频的获取请求。203. Send an acquisition request of the target video to the supplemental terminal node.
其中,所述获取请求中包括目标视频的视频标识。Wherein, the acquisition request includes the video identifier of the target video.
204、接收所述补充终端节点返回的所述目标视频的视频数据。204. Receive the video data of the target video returned by the supplemental terminal node.
基于本实施例,本次请求获取视频列表的请求方终端可以同时接收由视频地址服务器初始分配的至少一个初始终端节点以及后续基于服务补全请求分配的补充终端节点返回的目标视频的视频数据,使得该请求方终端可以从更多的终端节点获得目标视频的视频数据,有利于更快、更完整的获得目标视频的视频数据,从而提高目标视频的播放流畅性,提高用户的观看体验。Based on this embodiment, the requester terminal that requests to obtain the video list this time can simultaneously receive at least one initial terminal node initially allocated by the video address server and the video data of the target video returned by the supplementary terminal node subsequently allocated based on the service completion request, The requesting terminal can obtain the video data of the target video from more terminal nodes, which is beneficial to obtain the video data of the target video faster and more completely, thereby improving the playback fluency of the target video and improving the user's viewing experience.
可选地,在其中一些实现方式中,所述多个服务节点还包括至少一个CDN节点,该至少一个CDN节点具体可以由视频地址服务器基于CDN集群中各CDN节点的带宽、负载、以及与本次请求获取视频列表的请求方终端之间的位置关系等选取,以为本次请求获取视频列表的请求方终端提供视频服务。Optionally, in some implementation manners, the plurality of service nodes further include at least one CDN node, and the at least one CDN node may be specifically configured by the video address server based on the bandwidth, load, and relationship with this CDN node in the CDN cluster. The location relationship between the requester terminals that request to obtain the video list this time is selected to provide video services for the requester terminal that requests to obtain the video list this time.
进一步可选地,在203之后,本次请求获取视频列表的请求方终端还可以继续监测视频数据的接收情况,响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,继续执行向所述视频服务器发送服务补全请求的操作,即重新执 行图2所示实施例的流程,由视频地址服务器继续从所述n个终端中未被确定作为服务节点的终端中、选取作为服务节点的终端作为补充终端节点,请求方终端同时从该补充终端节点请求目标视频的数据请求,直至所述n个终端全部被选取作为该请求方终端获取目标视频的服务节点,此时,视频服务器返回的补充终端节点的地址为空,则响应于接收到的视频服务器返回的补充终端节点的地址为空,向所述CDN节点发送所述目标视频的获取请求,其中,所述获取请求中包括目标视频的视频标识;并接收所述CDN节点返回的所述目标视频的视频数据。Further optionally, after 203, the requester terminal that requests to obtain the video list this time can also continue to monitor the reception of the video data, and responds that the number of data packets of the video data received within the preset time is less than the preset number. threshold value, continue to perform the operation of sending a service completion request to the video server, that is, re-execute the process of the embodiment shown in FIG. 2, and the video address server continues to select the terminal from the n terminals that have not been determined as the service node. , select the terminal as the service node as the supplementary terminal node, the requester terminal simultaneously requests the data request of the target video from the supplementary terminal node, until all the n terminals are selected as the requester terminal to obtain the service node of the target video, this When the address of the supplementary terminal node returned by the video server is empty, in response to the received address of the supplementary terminal node returned by the video server being empty, send the acquisition request of the target video to the CDN node, wherein the The acquisition request includes the video identifier of the target video; and the video data of the target video returned by the CDN node is received.
由于终端设备的不稳定性,如果仅通过一个终端节点提供视频服务,可能导致服务会非常不稳定,因此单一依赖一个终端节点作为服务节点无法保证服务效果。基于本实施例,提供了合理的调度算法,首先通过至少一个初始终端节点提供目标视频的视频服务,在预设时间内接收到的视频数据的数据包的数量小于预设阈值时,说明已有至少一个初始终端节点的地址不可用(不可访问)或者服务能力较差,此时,优先补充终端节点来提供视频服务,直至所有可提供本次视频服务的终端节点已补充完毕、在预设时间内接收到的视频数据的数据包的数量小于预设阈值,则调度CDN节点来提供本次视频服务,从而保证了了视频数据的快递。完整传输。Due to the instability of terminal equipment, if only one terminal node is used to provide video services, the service may be very unstable. Therefore, relying solely on one terminal node as a service node cannot guarantee the service effect. Based on this embodiment, a reasonable scheduling algorithm is provided. First, a video service of a target video is provided through at least one initial terminal node. When the number of video data packets received within a preset time is less than a preset threshold, it means that the The address of at least one initial terminal node is unavailable (inaccessible) or the service capability is poor. At this time, priority is given to replenishing terminal nodes to provide video services until all terminal nodes that can provide this video service have been replenished and within a preset time. If the number of data packets of the video data received within is less than the preset threshold, the CDN node is scheduled to provide this video service, thereby ensuring the express delivery of the video data. Complete transfer.
进一步可选地,在其中一些实现方式中,本次请求获取视频列表的请求方终端和视频服务器保持通讯,同时视频地址服务器实时更新具有视频服务能力的n个终端的实体个数,由视频服务器从视频地址服务器获取具有视频服务能力的终端的实体个数,响应于接收到的所述视频服务器返回的补充终端节点的地址为空之后,请求方终端还可以接收由视频地址服务器更新具有视频服务能力的终端后返回的补充终端节点的地址,所述补充终端节点为从更新后的具有视频服务能力的t个终端中未被确定作为服务节点的终端中、选取作为服务节点的终端,其中,t为大于0的整数;此时,停止执行所述接收所述CDN节点返回的所述目标视频的视频数据的操作,并开始执行203中向所述补充终端节点发送所述目标视频的获取请求的操作,以同时从本次返回的补充终端节点获取目标视频的视频数据。Further optionally, in some of these implementations, the requester terminal that requests to obtain the video list this time maintains communication with the video server, and the video address server updates the physical number of n terminals with video service capabilities in real time. Obtain the entity number of terminals with video service capabilities from the video address server, and in response to the received address of the supplementary terminal node returned by the video server being empty, the requesting terminal may also receive an update from the video address server that has video services. The address of the supplementary terminal node returned after the capable terminal, the supplementary terminal node is the terminal selected as the service node from the terminals that have not been determined as the service node from the updated t terminals with the video service capability, wherein, t is an integer greater than 0; at this time, stop executing the operation of receiving the video data of the target video returned by the CDN node, and start executing the acquisition request of sending the target video to the supplementary terminal node in 203 operation to simultaneously obtain the video data of the target video from the supplementary terminal node returned this time.
基于本实施例,在视频地址服务器更新具有视频服务能力的终端后,可以及时为请求方终端分配用于提供本次视频服务的补充终端节点,由本次补充终端节点和之前分配的终端节点同时提供本次视频服务,请求方终端断开CDN服务,以节省CDN资源,从而实现了在保证视频服务能力的情况下节省CDN资源。Based on this embodiment, after the video address server updates the terminal with video service capability, the requester terminal can be allocated a supplementary terminal node for providing this video service in time. To provide this video service, the requester terminal disconnects the CDN service to save CDN resources, thereby saving CDN resources while ensuring the video service capability.
可选地,在其中一些实现方式中,所述视频列表具体包括:至少一个视频中每个视频的视频标识、针对所述每个视频具有视频服务能力的n个终端的地址和服务能力信息。其中的服务能力信息例如可以包括终端的带宽、当前已接入的终端数量(即当前向多少终端提供视频服务)等,可以由具有视频服务能力的各终端上报给视频地址服务器,也可以由视频地址服务器与具有视频服务能力的各终端交互获得,并由视频地址服务器提供给视频服务器。相应地,在101之后,还可以包括:从所述n个终端中确定作为所述至少一个初始终端节点的m个终端。例如,可以基于具有视频服务能力的n个终端中各终端的服务能力信息,来选取服务能力较好的部分终端作为服务节点,另外,也可以按照顺序选取或随机选取其中的部分终端作为服务节点,本申请实施例对具体的选取方式不做限制。其中,m、n分别为大于0的整数,且m小于或等于n。Optionally, in some implementation manners, the video list specifically includes: a video identifier of each video in at least one video, addresses and service capability information of n terminals having video service capabilities for each video. The service capability information may include, for example, the bandwidth of the terminal, the number of currently connected terminals (that is, how many terminals are currently providing video services to), etc. It may be reported to the video address server by each terminal with video service capability, or the video The address server is obtained through interaction with each terminal with video service capability, and is provided to the video server by the video address server. Correspondingly, after 101, the method may further include: determining m terminals serving as the at least one initial terminal node from the n terminals. For example, some terminals with better service capabilities may be selected as service nodes based on the service capability information of each of the n terminals with video service capabilities, and some of the terminals may also be selected sequentially or randomly as service nodes. , the embodiments of the present application do not limit the specific selection method. Wherein, m and n are integers greater than 0, respectively, and m is less than or equal to n.
图3为本申请又一实施例提供的视频获取方法的流程示意图,如图3所示,在102之后,还可以包括:FIG. 3 is a schematic flowchart of a video acquisition method provided by another embodiment of the present application. As shown in FIG. 3, after 102, it may further include:
301、响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,从所述n个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点。301. In response to the number of data packets of the video data received within a preset time being less than a preset threshold, select a terminal as a service node from among the terminals that have not been determined as a service node in the n terminals, as a supplement. terminal node.
302、向所述补充终端节点发送所述目标视频的获取请求。302. Send an acquisition request of the target video to the supplemental terminal node.
其中,所述获取请求中包括目标视频的视频标识。Wherein, the acquisition request includes the video identifier of the target video.
303、接收所述补充终端节点返回的所述目标视频的视频数据。303. Receive the video data of the target video returned by the supplemental terminal node.
基于本实施例,可以由视频服务器初始分配的至少一个初始终端节点提供本次视频服务,在预设时间内接收到的所述视频数据的数据包的数量小于预设阈值时,本次请求获取视频列表的请求方终端可以选取补充终端同时提供本次视频服务,使得该请求方终端可以从更多的终端节点获得目标视频的视频数据,有利于更快、更完整的获得目标视频的视频数据,从而提高目标视频的播放流畅性,提高用户的观看体验。Based on this embodiment, this video service can be provided by at least one initial terminal node initially allocated by the video server, and when the number of data packets of the video data received within a preset time is less than a preset threshold, the request to obtain this time The requester terminal of the video list can select supplementary terminals to provide this video service at the same time, so that the requester terminal can obtain the video data of the target video from more terminal nodes, which is beneficial to obtain the video data of the target video faster and more completely. , thereby improving the playback fluency of the target video and improving the user's viewing experience.
可选地,在其中一些实现方式中,所述多个服务节点还包括至少一个CDN节点,该至少一个CDN节点具体可以由视频服务器基于CDN集群中各CDN节点的带宽、负载、以及与本次请求获取视频列表的请求方终端之间的位置关系等选取,以为本次请求获取视频列表的请求方终端提供视频服务。Optionally, in some implementation manners, the plurality of service nodes further include at least one CDN node, and the at least one CDN node may be specifically configured by the video server based on the bandwidth, load, and correlation with the current CDN nodes in the CDN cluster. The location relationship among the requester terminals that request to obtain the video list is selected to provide video services for the requester terminal that requests to obtain the video list this time.
进一步可选地,在302之后,本次请求获取视频列表的请求方终端还可以继续监测视频数据的接收情况,响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,继续执行所述从所述n个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点的操作,即重新执行图3所示实施例的流程,选取补充终端节点,请求方终端同时从该补充终端节点请求目标视频的数据请求,直至所述n个终端全部被选取作为该请求方终端获取目标视频的服务节点,此时,响应于未获取到补充终端节点,则向所述CDN节点发送所述目标视频的获取请求,其中,所述获取请求中包括目标视频的视频标识;接收所述CDN节点返回的所述目标视频的视频数据。Further optionally, after 302, the requester terminal that requests to obtain the video list this time can also continue to monitor the reception of the video data, in response to the number of data packets of the video data received within the preset time being less than the preset number. Threshold, continue to perform the operation of selecting the terminal as the service node as the supplementary terminal node from the terminals that have not been determined as the service node from the n terminals, that is, re-execute the process of the embodiment shown in FIG. 3, select the supplementary The terminal node, the requester terminal simultaneously requests the data request of the target video from the supplementary terminal node, until all the n terminals are selected as the service nodes for the requester terminal to obtain the target video, at this time, in response to the supplementary terminal not being obtained. node, send an acquisition request of the target video to the CDN node, wherein the acquisition request includes a video identifier of the target video; and receive the video data of the target video returned by the CDN node.
由于终端设备的不稳定性,如果仅通过一个终端节点提供视频服务,可能导致服务会非常不稳定,因此单一依赖一个终端节点作为服务节点无法保证服务效果。基于本实施例,提供了合理的调度算法,首先通过至少一个初始终端节点提供目标视频的视频服务,在预设时间内接收到的视频数据的数据包的数量小于预设阈值时,说明已有至少一个初始终端节点的地址不可用(不可访问)或者服务能力较差,此时,优先补充终端节点来提供视频服务,直至所有可提供本次视频服务的终端节点已补充完毕、在预设时间内接收到的视频数据的数据包的数量小于预设阈值,则调度CDN节点来提供本次视频服务,从而保证了了视频数据的快递。完整传输。Due to the instability of terminal equipment, if only one terminal node is used to provide video services, the service may be very unstable. Therefore, relying solely on one terminal node as a service node cannot guarantee the service effect. Based on this embodiment, a reasonable scheduling algorithm is provided. First, a video service of a target video is provided through at least one initial terminal node. When the number of video data packets received within a preset time is less than a preset threshold, it means that the The address of at least one initial terminal node is unavailable (inaccessible) or the service capability is poor. At this time, priority is given to replenishing terminal nodes to provide video services until all terminal nodes that can provide this video service have been replenished and within a preset time. If the number of data packets of the video data received within is less than the preset threshold, the CDN node is scheduled to provide this video service, thereby ensuring the express delivery of the video data. Complete transfer.
进一步可选地,在其中一些实现方式中,响应于未获取到补充终端节点之后,请求方终端还可以向所述视频服务器发送服务补全请求,所述服务补全请求中包括所述目标视频的视频标识,并接收视频地址服务器更新具有视频服务能力的终端后,由视频服务器返回的、具有视频服务能力的更新的t个终端的地址,其中,t为大于0的整数;然后,从所述t个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点;停止执行所述接收所述CDN节点返回的所述目标视频的视频数据的操作,并开始执行302中所述向所述补充终端节点发送所述目标视频的获取请求的操作,以同时从本次选取的补充终端节点获取目标视频的视频数据。Further optionally, in some of these implementations, in response to not acquiring the supplementary terminal node, the requester terminal may also send a service completion request to the video server, where the service completion request includes the target video. , and receive the addresses of the updated t terminals with video service capabilities returned by the video server after the video address server updates the terminals with video service capabilities, where t is an integer greater than 0; Among the terminals that are not determined as service nodes among the t terminals, select the terminal as a service node as a supplementary terminal node; stop performing the operation of receiving the video data of the target video returned by the CDN node, and start executing The operation of sending the acquisition request of the target video to the supplemental terminal node in 302 is to simultaneously acquire the video data of the target video from the supplementary terminal node selected this time.
基于本实施例,在视频地址服务器更新具有视频服务能力的终端后可以及时提供给请求方终端,以便请求方终端可以及时补充提供本次视频服务的补充终端节点,由本次补充终端节点和之前分配和补充选取的终端节点同时提供本次视频服 务,请求方终端断开CDN服务,以节省CDN资源,从而实现了在保证视频服务能力的情况下节省CDN资源。Based on this embodiment, after the video address server updates the terminal with video service capability, it can be provided to the requester terminal in time, so that the requester terminal can supplement the supplementary terminal node providing this video service in time. The terminal nodes selected and allocated and selected provide the video service at the same time, and the requester terminal disconnects the CDN service to save CDN resources, thereby realizing the saving of CDN resources while ensuring the video service capability.
可选地,在其中一些实现方式中,所述目标视频的视频数据在传输前,预先被按照预设大小切分为多个视频数据段,所述多个视频数据段中的每个视频数据段与基于所述每个视频数据段在所述目标视频中的顺序分配的索引(index)组合为一个数据包。对于同一个视频,按照预设大小切分为多个视频数据段,例如每1K划分为一个视频数据段,同时对每个视频数据段做索引,并将索引和对应视频数据段组合成一个数据包,形成发结构可以参见图4。Optionally, in some of the implementations, the video data of the target video is pre-divided into multiple video data segments according to a preset size before transmission, and each video data in the multiple video data segments is divided into multiple segments. The segments are combined into one packet with an index assigned based on the sequence of each segment of video data in the target video. For the same video, it is divided into multiple video data segments according to the preset size, for example, every 1K is divided into one video data segment, and each video data segment is indexed at the same time, and the index and the corresponding video data segment are combined into one data segment. The package to form the hair structure can be seen in Figure 4.
如图4所示,为本申请实施例中视频数据的数据包的一个格式示意图。其中,Data表示目标视频按照预设大小顺序切分成的各视频数据段,0、1、…分别为基于对应的视频数据段在目标视频中的顺序分配的索引。As shown in FIG. 4 , it is a schematic diagram of a format of a data packet of video data in an embodiment of the present application. Wherein, Data represents the video data segments into which the target video is divided in the order of preset sizes, and 0, 1, .
基于上述视频的数据包结构,服务节点在传输视频数据时以索引和对应的视频数据段组合得到的数据包为最小结构传输给请求方终端,此结构不同于p2p的视频流,是不可播放的。为了安全性,可以采用预设加密算法对该最小结构的数据包进行加密,由请求方终端接收到数据包后按照预设加密算法进行解密处理来得到数据包,并提取出其中的视频数据段,从而提高数据传输的安全性。其中的预设加密算法可以采用现有的任意加密算法,本申请实施例对此不做赘述。Based on the above video data packet structure, when transmitting video data, the service node transmits the data packet obtained by combining the index and the corresponding video data segment as the smallest structure to the requester terminal. This structure is different from the p2p video stream and cannot be played. . For security, a preset encryption algorithm can be used to encrypt the data packet with the smallest structure. After receiving the data packet, the requesting terminal performs decryption processing according to the preset encryption algorithm to obtain the data packet, and extracts the video data segment. , thereby improving the security of data transmission. The preset encryption algorithm may adopt any existing encryption algorithm, which will not be repeated in this embodiment of the present application.
相应地,103中,可以分别接收所述至少一个初始终端节点中每个终端节点返回的目标视频的视频数据的数据包,加入补充终端节点后,同时接收至少一个初始终端节点和补充终端节点返回的目标视频的视频数据的数据包,并依次按照索引顺序,获取每个索引所在的一个数据包中的视频数据并顺序存储在所在终端的缓存区,并更新缓存区中视频数据对应的索引最大值;丢弃索引等于所述索引最大值的其他数据包、以及索引小于所述索引最大值的数据包。Correspondingly, in 103, the data packets of the video data of the target video returned by each terminal node in the at least one initial terminal node can be respectively received, and after adding the supplementary terminal node, the at least one initial terminal node and the supplementary terminal node are simultaneously returned. The data packets of the video data of the target video, and sequentially according to the index order, obtain the video data in a data packet where each index is located and store them in the buffer area of the terminal in sequence, and update the video data in the buffer area corresponding to the largest index value; discard other data packets with an index equal to the maximum index value, and data packets with an index smaller than the maximum index value.
如图5所示,为图4所示实施例对应的数据包接收和去重的一个流程示意图。As shown in FIG. 5 , it is a schematic flowchart of data packet reception and deduplication corresponding to the embodiment shown in FIG. 4 .
基于本实施例,请求方终端在收到数据包后,可以依次按照索引顺序,获取一个相应数据包中的视频数据并按照顺序放置在所在终端的缓存区,同时更新当前缓存区中视频数据的索引最大值,例如,首先读取索引0的数据包中的视频数据并按照顺序放置在所在终端的缓存区,更新缓存区中视频数据对应的索引最大值为0,之后,读取索引1的数据包中的视频数据并按照顺序放置在所在终端的缓存区中索 引0对应的视频数据之后,更新缓存区中视频数据对应的索引最大值为1,…,依次类推,读取索引i的数据包中的视频数据并按照顺序放置在所在终端的缓存区中索引i-1对应的视频数据之后,更新缓存区中视频数据对应的索引最大值为i,其中,i为大于1的整数;之后,若接收到索引小于或等于该索引最大值的数据包,由于该数据包中的视频数据在缓存区已有存储,为避免重合存储同样的视频数据,全部丢弃处理。Based on this embodiment, after receiving the data packet, the requesting terminal can obtain video data in a corresponding data packet in order of index and place it in the buffer area of the terminal where it is located, and at the same time update the video data in the current buffer area. The maximum index value, for example, first read the video data in the data packet with index 0 and place it in the buffer area of the terminal in order, update the maximum index value corresponding to the video data in the buffer area to 0, and then read the index value of index 1. The video data in the data packet is placed in sequence after the video data corresponding to index 0 in the buffer area of the terminal where it is located, and the maximum value of the index corresponding to the video data in the buffer area is updated to 1, ..., and so on, read the data of index i The video data in the package is placed in sequence after the video data corresponding to index i-1 in the buffer area of the terminal where it is located, and the maximum value of the index corresponding to the video data in the update buffer area is i, where i is an integer greater than 1; then , if a data packet with an index less than or equal to the maximum value of the index is received, since the video data in the data packet is already stored in the buffer area, in order to avoid overlapping and storing the same video data, all the data will be discarded.
可选地,在进一步实现方式中,在依次按照索引顺序,获取每个索引所在的一个数据包中的视频数据并顺序存储在所在终端的缓存区之后,还可以将所述缓存区中的视频数据依次发送给播放器以进行播放。Optionally, in a further implementation manner, after obtaining the video data in a data packet where each index is located and sequentially storing it in the buffer area of the terminal in the order of the indexes, the video data in the buffer area can also be stored. The data is in turn sent to the player for playback.
基于本实施例,实现了目标视频、无重复内容的流畅播放。Based on this embodiment, smooth playback of the target video and no repetitive content is achieved.
可选地,在其中一些实现方式中,终端用户可以确定本终端是否提供视频服务,在具体实现中,可以在实现本实施例的视频APP中设置视频服务选项,例如“视频服务”开关按钮,用户可以通过操作该视频服务选项选择开启或关闭视频服务。由于提供视频服务传输视频数据时会对终端产生流量,由终端用户自己决定是否提供视频服务。终端开启此视频服务后,会将该终端的地址作为视频服务地址上报给视频服务器,以加入到视频地址服务器中。由于终端是否提供视频服务是动态变化的,终端的开启和关闭视频服务都需要即时通知视频服务器以及时更新提供视频服务的多个服务节点的地址。Optionally, in some implementations, the terminal user can determine whether the terminal provides video services. In specific implementations, video service options, such as a "video service" switch button, can be set in the video APP that implements this embodiment. The user can choose to turn on or turn off the video service by operating the video service option. Since video services are provided to transmit video data, traffic will be generated on the terminal, and it is up to the terminal users to decide whether to provide video services. After the terminal starts the video service, the terminal's address will be reported to the video server as the video service address, so as to be added to the video address server. Since whether a terminal provides a video service is dynamically changed, the terminal needs to immediately notify the video server to update the addresses of multiple service nodes that provide the video service when turning on and off the video service.
可选地,在其中一些实现方式中,还可以包括:响应于接收到用户发送的开启视频服务的指令,获取所在终端的地址和可用视频资源列表,所述可用视频资源列表包括至少一个可用视频的视频标识;按照预设周期,或者响应于接收完一个视频的视频数据,例如接收完所述目标视频的视频数据,向视频服务器上报所在终端的地址和可用视频资源列表,由视频服务器转发给视频地址服务器,以便视频地址服务器更新所述至少一个可用视频的服务节点的地址,将所在终端的地址加入所述至少一个可用视频的服务节点的地址中。Optionally, in some of the implementations, it may further include: in response to receiving an instruction to start a video service sent by a user, acquiring the address of the terminal where it is located and a list of available video resources, where the list of available video resources includes at least one available video. according to the preset period, or in response to receiving the video data of a video, for example, after receiving the video data of the target video, report the address of the terminal where it is located and the list of available video resources to the video server, and the video server forwards it to a video address server, so that the video address server updates the address of the at least one available video service node, and adds the address of the terminal where it is located to the address of the at least one available video service node.
基于本实施例,终端开启视频服务后,可以向视频服务器上报所在终端的地址和可用视频资源列表,以便视频地址服务器将该终端纳入所述可用视频资源列表中视频的服务节点中,为其他终端提供所述可用视频资源列表中视频的视频服务。Based on this embodiment, after the terminal starts the video service, it can report the address of the terminal and the list of available video resources to the video server, so that the video address server can include the terminal in the service node of the video in the list of available video resources, which is the service node of other terminals. A video service that provides videos in the list of available video resources.
可选地,在其中一些实现方式中,还可以包括:响应于检测到所述可用视频资 源列表中有所述可用视频的视频数据被删除,向视频服务器上报所在终端的地址和失效可用视频资源列表,所述失效可用视频资源列表包括所述可用视频资源列表中视频数据被删除的可用视频,由视频服务器转发给视频地址服务器,以便视频地址服务器更多所述失效可用视频的服务节点的地址,将所述所在终端的地址从该失效可用视频的服务节点的地址中删除。Optionally, in some of the implementations, it may further include: in response to detecting that the video data of the available video is deleted in the available video resource list, reporting the address of the terminal where it is located and the invalid available video resource to the video server. A list, the list of invalid available video resources includes available videos whose video data is deleted in the list of available video resources, and is forwarded by the video server to the video address server, so that the video address server has more addresses of the service nodes of the invalid available videos , delete the address of the terminal where the terminal is located from the address of the service node of the unavailable video.
基于本实施例,终端开启视频服务后,若检测到之前上报的可用视频资源列表中有可用视频的视频数据被删除,及时向视频服务器上报所在终端的地址和失效可用视频资源列表,以便视频地址服务器将该终端从所述可用视频资源列表中视频的服务节点中剔除,避免后续被分配给其他终端提供所述可用视频资源列表中视频的视频服务、影响服务效果。Based on this embodiment, after the terminal starts the video service, if it detects that the video data of the available video in the previously reported available video resource list is deleted, it reports the address of the terminal and the list of invalid available video resources to the video server in time, so that the video address The server removes the terminal from the service nodes of the video in the available video resource list, so as to avoid being subsequently assigned to other terminals to provide video services of the video in the available video resource list and affecting the service effect.
图6为适于用来实现本申请实施例的示例性视频服务系统的框图,如图6所示,该视频服务系统包括视频服务器(也即CDN服务器)601、视频列表服务器602和视频地址服务器603。其中,视频服务器601用于管理和调度CDN节点,为终端提供视频服务,终端可以访问视频服务器601,发送视频列表获取请求,请求获取视频列表;视频列表服务器602用于生成视频列表发送给视频服务器以提供给终端;视频地址服务器603用于缓存为每个视频提供视频服务的所有终端节点的地址,视频服务器601可以从视频地址服务器603中获取为每个视频提供视频服务的终端节点的地址,同时可以将可以提供视频服务的终端节点的地址、以及可用资源列表或失效可用资源列表转发给视频地址服务器603。FIG. 6 is a block diagram of an exemplary video service system suitable for implementing the embodiments of the present application. As shown in FIG. 6 , the video service system includes a video server (ie, a CDN server) 601 , a video list server 602 and a video address server 603. The video server 601 is used to manage and schedule CDN nodes and provide video services for the terminal. The terminal can access the video server 601, send a video list acquisition request, and request to acquire the video list; the video list server 602 is used to generate a video list and send it to the video server The video address server 603 is used to cache the addresses of all terminal nodes that provide video services for each video, and the video server 601 can obtain the addresses of the terminal nodes that provide video services for each video from the video address server 603, At the same time, the address of the terminal node that can provide the video service, and the list of available resources or the list of invalid available resources can be forwarded to the video address server 603 .
图7为本申请再一实施例提供的视频获取方法的流程示意图,如图7所示。FIG. 7 is a schematic flowchart of a video acquisition method provided by still another embodiment of the present application, as shown in FIG. 7 .
701、请求方终端向视频服务器发送视频列表获取请求。701. The requester terminal sends a video list acquisition request to a video server.
702、视频服务器向视频列表服务器转发视频列表获取请求,并接收视频列表服务器返回的推荐视频列表。702. The video server forwards the video list acquisition request to the video list server, and receives the recommended video list returned by the video list server.
其中的推荐视频列表包括视频列表服务器推荐的视频的视频标识,其中的视频标识用于唯一标识一个视频,视频ID可以包括视频的名称、编号等。所述视频推荐列表中的视频可以具有一定的播放顺序,即可以是按照播放顺序排列的多个视频的视频标识。The recommended video list includes video identifiers of videos recommended by the video list server, where the video identifiers are used to uniquely identify a video, and the video ID may include the name, serial number, and the like of the video. The videos in the video recommendation list may have a certain playback order, that is, they may be video identifiers of multiple videos arranged in the playback order.
703、视频服务器向视频地址服务器请求推荐视频列表中视频的播放地址。703. The video server requests the video address server for a playback address of the video in the recommended video list.
704、视频地址服务器分别确定推荐视频列表中各视频的终端节点,并向视频 服务器返回添加终端节点的地址后的推荐视频列表。704. The video address server respectively determines the terminal nodes of each video in the recommended video list, and returns the recommended video list after adding the addresses of the terminal nodes to the video server.
具体地,视频地址服务器确定推荐视频列表中每个视频的终端节点时,可以根据之前开启视频服务的终端上报的终端的地址和可用视频资源列表,获取可用视频资源列表中包括该视频的n个终端作为当前具有视频服务能力的终端,从中挑选出m个终端作为服务节点,即得到m个终端节点。Specifically, when the video address server determines the terminal node of each video in the recommended video list, it can obtain n number of available video resources including the video according to the address of the terminal and the list of available video resources reported by the terminal that opened the video service before. The terminal is used as a terminal with the current video service capability, and m terminals are selected as service nodes, that is, m terminal nodes are obtained.
705、视频服务器在添加终端节点的地址后的推荐视频列表中添加至少一个CDN节点的地址,得到视频列表并返回请求方终端。705. The video server adds the address of at least one CDN node to the recommended video list after adding the address of the terminal node, obtains the video list, and returns it to the requester terminal.
其中,所述视频列表包括:推荐视频列表中每个视频的视频标识和为所述每个视频提供视频服务的多个服务节点的地址、以及具有视频服务能力的n个终端的地址,所述多个服务节点包括至少一个CDN节点和至少一个初始终端节点。Wherein, the video list includes: a video identifier of each video in the recommended video list, addresses of multiple service nodes that provide video services for each video, and addresses of n terminals with video service capabilities, the The plurality of service nodes include at least one CDN node and at least one initial termination node.
具体地,视频服务器中存储有所有CDN节点的地址,可以由视频服务器基于CDN集群中各CDN节点的带宽、负载、以及与本次请求获取视频列表的请求方终端之间的位置关系等选取至少一个CDN节点,为本次请求获取视频列表的请求方终端提供视频服务。Specifically, the addresses of all CDN nodes are stored in the video server, and the video server can select at least the A CDN node that provides video services for the requester terminal that requests to obtain the video list this time.
706、请求方终端与m个终端节点建立连接,向m个终端节点发送目标视频的获取请求,并在自己的存储空间中划分出用于接收视频数据的缓冲区。706. The requester terminal establishes connections with m terminal nodes, sends an acquisition request of the target video to the m terminal nodes, and divides a buffer for receiving video data in its own storage space.
其中,所述获取请求中包括目标视频的视频标识,所述至少一个视频包括所述目标视频。Wherein, the acquisition request includes a video identifier of the target video, and the at least one video includes the target video.
707、请求方终端接收m个终端节点返回的目标视频的视频数据,并去除接收到的目标视频的视频数据中的重合视频数据,将目标视频的完整的、不重合的视频数据放置在缓存区。707. The requester terminal receives the video data of the target video returned by m terminal nodes, and removes the overlapping video data in the video data of the received target video, and places the complete, non-overlapping video data of the target video in the buffer area. .
具体地,可以采用本申请上述实施例的方式去除接收到的目标视频的视频数据中的重合视频数据,将目标视频的完整的、不重合的视频数据放置在缓冲区,此处不再赘述。Specifically, the overlapping video data in the received video data of the target video can be removed by the method of the above-mentioned embodiments of the present application, and the complete, non-overlapping video data of the target video can be placed in the buffer, which will not be repeated here.
若在预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,从剩下的n-m个终端中挑选终端作为服务节点,并重复706-707的操作。如果n-m小于或等于0,那将CDN节点纳入视频服务方,提供视频数据,向CDN节点发送目标视频的获取请求,并接收所述CDN节点返回的所述目标视频的视频数据,具体实现可以参见上述实施例,此处不再赘述。同时请求方终端定时和视频服务器进行通讯,并 实时更新具有视频服务能力的n个终端的地址,如果在一定时间后n-m大于0,即补充了新的具有视频服务能力的终端,则可以断开CDN服务,及时释放CDN资源,重新执行706-707的操作。If the number of the video data packets received within the preset time is less than the preset threshold, a terminal is selected from the remaining n-m terminals as a service node, and operations 706-707 are repeated. If n-m is less than or equal to 0, the CDN node is included in the video server, provides video data, sends a request for obtaining the target video to the CDN node, and receives the video data of the target video returned by the CDN node. For details, see The foregoing embodiments are not repeated here. At the same time, the requester terminal communicates with the video server regularly, and updates the addresses of n terminals with video service capabilities in real time. If n-m is greater than 0 after a certain period of time, that is, a new terminal with video service capabilities is added, and can be disconnected. CDN service, release CDN resources in time, and perform operations 706-707 again.
708、请求方终端将缓存区中的视频数据发送给播放器进行播放。708. The requester terminal sends the video data in the buffer area to the player for playback.
本申请的技术方案可以适用于终端、视频服务器等任意设备中的视频应用程序。利用视频应用程序,执行本申请实施例提供的视频获取方法时,能够实现从终端下载该目标视频或进一步播放该目标视频,避免了所有视频请求都依赖CDN服务、会产生一定的CDN服务费用,节省了CDN服务费用。The technical solutions of the present application can be applied to video applications in any device such as a terminal and a video server. When using the video application program to execute the video acquisition method provided by the embodiments of the present application, the target video can be downloaded from the terminal or the target video can be further played, avoiding that all video requests depend on CDN services and certain CDN service fees will be generated, Save on CDN service fees.
另外,采用本申请所提供的技术方案,采用本申请所提供的技术方案,将终端中已经播放或者下载视频的视频数据作为缓存,利用终端作为视频的微型服务器,将缓存有视频的视频数据的终端纳入服务节点来提供视频服务,其他终端在需要播放该视频时,可以连接到这台终端获取视频数据,从而绕过CDN服务,可以避免终端集中访问某一CDN节点影响视频数据的传输速度和播放流畅性,提升了视频服务可用性,从而改善了用户体验。In addition, using the technical solution provided by the present application, using the technical solution provided by the present application, the video data of the video that has been played or downloaded in the terminal is used as a cache, and the terminal is used as a micro server of the video to cache the video data of the video. The terminal is included in the service node to provide video services. When other terminals need to play the video, they can connect to this terminal to obtain video data, thereby bypassing the CDN service and avoiding the centralized access of the terminal to a CDN node to affect the transmission speed and speed of video data. Playback fluency increases the usability of video services, thereby improving user experience.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
图8示出了适于用来实现本申请实施方式的示例性计算机系统/服务器12的框图。图8显示的计算机系统/服务器12仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Figure 8 shows a block diagram of an exemplary computer system/server 12 suitable for use in implementing embodiments of the present application. The computer system/server 12 shown in FIG. 8 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present application.
如图8所示,计算机系统/服务器12以通用计算设备的形式表现。计算机系统/服务器12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,存储装置或者系统存储器28,连接不同系统组件(包括系统存储器28和处理单元16)的总线18。As shown in FIG. 8, computer system/server 12 takes the form of a general purpose computing device. Components of computer system/server 12 may include, but are not limited to, one or more processors or processing units 16, storage or system memory 28, and a bus 18 connecting various system components including system memory 28 and processing unit 16.
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制 器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。 Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect ( PCI) bus.
计算机系统/服务器12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被计算机系统/服务器12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。Computer system/server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer system/server 12, including both volatile and non-volatile media, removable and non-removable media.
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。计算机系统/服务器12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图8未显示,通常称为“硬盘驱动器”)。尽管图8中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。系统存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本申请各实施例的功能。System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32 . Computer system/server 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media. For example only, storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in Figure 8, a disk drive may be provided for reading and writing to removable non-volatile magnetic disks (eg "floppy disks"), as well as removable non-volatile optical disks (eg CD-ROM, DVD-ROM) or other optical media) to read and write optical drives. In these cases, each drive may be connected to bus 18 through one or more data media interfaces. System memory 28 may include at least one program product having a set (eg, at least one) of program modules configured to perform the functions of various embodiments of the present application.
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如系统存储器28中,这样的程序模块42包括——但不限于——操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本申请所描述的实施例中的功能和/或方法。A program/utility 40 having a set (at least one) of program modules 42, which may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other Program modules and program data, each or some combination of these examples may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
计算机系统/服务器12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该计算机系统/服务器12交互的设备通信,和/或与使得该计算机系统/服务器12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口44进行。并且,计算机系统/服务器12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图8所示,网络适配器20通过总线18与计算机系统/服务器12的其它模块通信。应当明白,尽管图中未示出,可以结合计算机系统/服务器12使用其它硬 件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。The computer system/server 12 may also communicate with one or more external devices 14 (eg, keyboard, pointing device, display 24, etc.), and may also communicate with one or more devices that enable a user to interact with the computer system/server 12, and/or with any device (eg, network card, modem, etc.) that enables the computer system/server 12 to communicate with one or more other computing devices. Such communication may take place through input/output (I/O) interface 44 . Also, the computer system/server 12 may communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network such as the Internet) through a network adapter 20 . As shown in FIG. 8 , network adapter 20 communicates with other modules of computer system/server 12 via bus 18 . It should be understood that, although not shown, other hardware and/or software modules may be used in conjunction with computer system/server 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, Tape drives and data backup storage systems, etc.
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现图1~图7所对应的实施例任一实施例所提供的方法。The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28 , for example, implementing the method provided by any of the embodiments corresponding to FIG. 1 to FIG. 7 .
本申请另一实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现图1~图7所对应的实施例任一实施例所提供的方法。Another embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the method provided by any of the embodiments corresponding to FIG. 1 to FIG. 7 . .
具体来说,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。In particular, any combination of one or more computer-readable media may be employed. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (a non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer-readable signal medium may include a propagated data signal in baseband or as part of a carrier wave, with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、 或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present application may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as "C" language or similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或页面组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or page components may be combined. Either it can be integrated into another system, or some features can be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一个计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute parts of the methods described in the various embodiments of the present application step. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制; 尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (15)

  1. 一种视频获取方法,其特征在于,包括:A video acquisition method, comprising:
    向视频服务器发送视频列表获取请求,并接收所述视频服务器返回的视频列表;其中,所述视频列表包括:至少一个视频中每个视频的视频标识和为所述每个视频提供视频服务的多个服务节点的地址,所述多个服务节点包括至少一个初始终端节点;Send a video list acquisition request to a video server, and receive a video list returned by the video server; wherein, the video list includes: a video identifier of each video in at least one video and a plurality of video services that provide video services for each video. addresses of service nodes, the plurality of service nodes include at least one initial terminal node;
    向所述至少一个初始终端节点发送目标视频的获取请求;其中,所述获取请求中包括目标视频的视频标识,所述至少一个视频包括所述目标视频;Send an acquisition request of the target video to the at least one initial terminal node; wherein, the acquisition request includes a video identifier of the target video, and the at least one video includes the target video;
    接收所述至少一个初始终端节点返回的所述目标视频的视频数据,并去除接收到的所述目标视频的视频数据中的重合视频数据。The video data of the target video returned by the at least one initial terminal node is received, and the overlapping video data in the received video data of the target video is removed.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述至少一个初始终端节点为视频地址服务器从具有视频服务能力的n个终端中确定的m个终端;其中,m、n分别为大于0的整数,且m小于或等于n。The at least one initial terminal node is m terminals determined by the video address server from n terminals with video service capabilities; wherein m and n are integers greater than 0, and m is less than or equal to n.
  3. 根据权利要求2所述的方法,其特征在于,所述向所述至少一个初始终端节点发送目标视频的获取请求之后,还包括:The method according to claim 2, wherein after the sending an acquisition request of the target video to the at least one initial terminal node, the method further comprises:
    响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,向所述视频服务器发送服务补全请求,所述服务补全请求中包括所述目标视频的视频标识;In response to the received number of the video data packets within a preset time being less than a preset threshold, sending a service completion request to the video server, where the service completion request includes a video identifier of the target video;
    接收所述视频服务器返回的补充终端节点的地址;其中,所述补充终端节点为所述视频地址服务器从所述n个终端中未被确定作为服务节点的终端中、选取作为服务节点的终端;Receive the address of the supplementary terminal node returned by the video server; wherein, the supplementary terminal node is the terminal that the video address server selects as the service node from the terminals that have not been determined as the service node among the n terminals;
    向所述补充终端节点发送所述目标视频的获取请求;其中,所述获取请求中包括目标视频的视频标识;sending an acquisition request of the target video to the supplementary terminal node; wherein, the acquisition request includes a video identifier of the target video;
    接收所述补充终端节点返回的所述目标视频的视频数据。The video data of the target video returned by the supplemental terminal node is received.
  4. 根据权利要求3所述的方法,其特征在于,所述多个服务节点还包括至少一个内容分发网络CDN节点;The method according to claim 3, wherein the plurality of service nodes further comprises at least one content distribution network CDN node;
    所述向所述补充终端节点发送所述目标视频的获取请求之后,还包括:After the sending the request for obtaining the target video to the supplementary terminal node, the method further includes:
    响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,执行所述向所述视频服务器发送服务补全请求的操作;In response to the number of the video data packets received within a preset time being less than a preset threshold, performing the operation of sending a service completion request to the video server;
    响应于接收到的所述视频服务器返回的补充终端节点的地址为空,向所述CDN节点 发送所述目标视频的获取请求;其中,所述获取请求中包括目标视频的视频标识;In response to the received address of the supplementary terminal node returned by the video server is empty, send the acquisition request of the target video to the CDN node; Wherein, the acquisition request includes the video identification of the target video;
    接收所述CDN节点返回的所述目标视频的视频数据。Receive the video data of the target video returned by the CDN node.
  5. 根据权利要求4所述的方法,其特征在于,所述响应于接收到的所述视频服务器返回的补充终端节点的地址为空之后,还包括:The method according to claim 4, wherein after the response to the received address of the supplementary terminal node returned by the video server is empty, the method further comprises:
    接收所述视频服务器返回的补充终端节点的地址,所述补充终端节点为所述视频地址服务器从更新后的具有视频服务能力的t个终端中未被确定作为服务节点的终端中、选取作为服务节点的终端;其中,t为大于0的整数;Receive the address of the supplementary terminal node returned by the video server, where the supplementary terminal node is selected by the video address server as a service node from the updated t terminals with video service capabilities that have not been determined as service nodes. The terminal of the node; where t is an integer greater than 0;
    停止执行所述接收所述CDN节点返回的所述目标视频的视频数据的操作,并执行所述向所述补充终端节点发送所述目标视频的获取请求的操作。Stop executing the operation of receiving the video data of the target video returned by the CDN node, and execute the operation of sending the acquisition request of the target video to the supplementary terminal node.
  6. 根据权利要求1所述的方法,其特征在于,所述视频列表具体包括:至少一个视频中每个视频的视频标识、针对所述每个视频具有视频服务能力的n个终端的地址和服务能力信息;The method according to claim 1, wherein the video list specifically includes: a video identifier of each video in at least one video, addresses and service capabilities of n terminals with video service capabilities for each video information;
    所述接收所述视频服务器返回的视频列表之后,还包括:After receiving the video list returned by the video server, the method further includes:
    从所述n个终端中确定作为所述至少一个初始终端节点的m个终端;其中,m、n分别为大于0的整数,且m小于或等于n。Determine m terminals from the n terminals as the at least one initial terminal node; wherein m and n are integers greater than 0, respectively, and m is less than or equal to n.
  7. 根据权利要求6所述的方法,其特征在于,所述向所述至少一个初始终端节点发送目标视频的获取请求之后,还包括:The method according to claim 6, wherein after the sending the acquisition request of the target video to the at least one initial terminal node, the method further comprises:
    响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,从所述n个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点;In response to the number of data packets of the video data received within the preset time being less than the preset threshold, selecting the terminal as the service node from the terminals that are not determined to be the service node from the n terminals as the supplementary terminal node ;
  8. 根据权利要求7所述的方法,其特征在于,所述多个服务节点还包括至少一个内容分发网络CDN节点;The method according to claim 7, wherein the plurality of service nodes further comprises at least one content distribution network CDN node;
    响应于预设时间内接收到的所述视频数据的数据包的数量小于预设阈值,执行所述从所述n个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点的操作;In response to the number of data packets of the video data received within a preset time being less than a preset threshold, performing the step of selecting the terminal as the service node from among the terminals that have not been determined as the service node from the n terminals. Supplementary terminal node operations;
    响应于未获取到补充终端节点,向所述CDN节点发送所述目标视频的获取请求;其中,所述获取请求中包括目标视频的视频标识;In response to not acquiring the supplementary terminal node, sending an acquisition request of the target video to the CDN node; wherein, the acquisition request includes a video identifier of the target video;
  9. 根据权利要求8所述的方法,其特征在于,所述响应于未获取到补充终端节点之后,还包括:The method according to claim 8, wherein after the response that the supplementary terminal node is not obtained, the method further comprises:
    向所述视频服务器发送服务补全请求,所述服务补全请求中包括所述目标视频的视频标识;Sending a service completion request to the video server, where the service completion request includes a video identifier of the target video;
    接收所述视频服务器返回的、具有视频服务能力的t个终端的地址;其中,t为大于0的整数;Receive the addresses of t terminals with video service capabilities returned by the video server; wherein, t is an integer greater than 0;
    从所述t个终端中未被确定作为服务节点的终端中,选取作为服务节点的终端作为补充终端节点;From the terminals that are not determined as service nodes in the t terminals, select the terminals as service nodes as supplementary terminal nodes;
  10. 根据权利要求1~9任一权利要求所述的方法,其特征在于,所述目标视频的视频数据被按照预设大小切分为多个视频数据段,所述多个视频数据段中的每个视频数据段与基于所述每个视频数据段在所述目标视频中的顺序分配的索引组合为一个数据包;The method according to any one of claims 1 to 9, wherein the video data of the target video is divided into a plurality of video data segments according to a preset size, and each of the plurality of video data segments video data segments are combined into a data packet with an index assigned based on the sequence of each video data segment in the target video;
    所述接收所述至少一个初始终端节点返回的所述目标视频的视频数据,并去除接收到的所述目标视频的视频数据中的重合视频数据,包括:The receiving the video data of the target video returned by the at least one initial terminal node, and removing the overlapping video data in the received video data of the target video, includes:
    分别接收所述至少一个初始终端节点中每个终端节点返回的所述目标视频的视频数据的数据包;Respectively receiving data packets of the video data of the target video returned by each terminal node in the at least one initial terminal node;
    依次按照索引顺序,获取每个索引所在的一个数据包中的视频数据并顺序存储在所在终端的缓存区,并更新缓存区中视频数据对应的索引最大值;According to the index order, the video data in a data packet where each index is located is obtained and sequentially stored in the buffer area of the terminal where it is located, and the maximum index value corresponding to the video data in the buffer area is updated;
    丢弃索引等于所述索引最大值的其他数据包、以及索引小于所述索引最大值的数据包。Other packets with an index equal to the maximum index value, and packets with an index less than the maximum index value are discarded.
  11. 根据权利要求10所述的方法,其特征在于,所述依次按照索引顺序,获取每个索引所在的一个数据包中的视频数据并顺序存储在所在终端的缓存区之后,还包括:The method according to claim 10, wherein the step of obtaining video data in a data packet where each index is located and sequentially storing the video data in the buffer area of the terminal according to the index sequence, further comprises:
    将所述缓存区中的视频数据依次发送给播放器以进行播放。The video data in the buffer area is sequentially sent to the player for playback.
  12. 根据权利要求1~9任一权利要求所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 9, further comprising:
    响应于接收到用户发送的开启视频服务的指令,获取所在终端的地址和可用视频资源列表,所述可用视频资源列表包括至少一个可用视频的视频标识;In response to receiving the instruction to start the video service sent by the user, obtain the address of the terminal where it is located and a list of available video resources, where the list of available video resources includes a video identifier of at least one available video;
    按照预设周期,或者响应于接收完一个视频的视频数据,向所述视频服务器上报所述所在终端的地址和所述可用视频资源列表,以便所述视频服务器更新视频地址服务器中所述至少一个可用视频的服务节点的地址。According to a preset period, or in response to receiving the video data of one video, report the address of the terminal and the list of available video resources to the video server, so that the video server can update the at least one video address server. The address of the service node where the video is available.
  13. 根据权利要求12所述的方法,其特征在于,还包括:The method of claim 12, further comprising:
    响应于检测到所述可用视频资源列表中有所述可用视频的视频数据被删除,向所述视频服务器上报所述所在终端的地址和失效可用视频资源列表,所述失效可用视频资源 列表包括视频数据被删除的可用视频,以便所述视频服务器更新所述视频地址服务器中所述失效可用视频的服务节点的地址。In response to detecting that the video data of the available video in the available video resource list is deleted, reporting the address of the terminal and the list of invalid available video resources to the video server, and the list of invalid available video resources includes video The available video whose data is deleted, so that the video server updates the address of the service node of the invalid available video in the video address server.
  14. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, characterized in that the electronic device comprises:
    一个或多个处理器;one or more processors;
    存储装置,用于存储一个或多个程序,storage means for storing one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1~13任一权利要求所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-13.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1~13任一权利要求所述的方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
PCT/CN2021/120674 2020-11-25 2021-09-26 Video acquisition method, electronic device, and storage medium WO2022111027A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011341280.4 2020-11-25
CN202011341280.4A CN112565907A (en) 2020-11-25 2020-11-25 Video acquisition method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2022111027A1 true WO2022111027A1 (en) 2022-06-02

Family

ID=75043675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120674 WO2022111027A1 (en) 2020-11-25 2021-09-26 Video acquisition method, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112565907A (en)
WO (1) WO2022111027A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086720A (en) * 2022-06-14 2022-09-20 烽火通信科技股份有限公司 Network path calculation method and device for live broadcast service

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565907A (en) * 2020-11-25 2021-03-26 上海连尚网络科技有限公司 Video acquisition method, electronic device and storage medium
CN113364865B (en) * 2021-06-03 2023-04-07 湖南快乐阳光互动娱乐传媒有限公司 Resource acquisition method, device, readable medium and equipment
CN114390338A (en) * 2022-01-26 2022-04-22 湖南快乐阳光互动娱乐传媒有限公司 Method and device for rapidly acquiring p2p video and electronic equipment
CN115277704B (en) * 2022-09-27 2022-12-27 美冠(北京)科技有限公司 Cloud playing system based on distributed preloading

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096177A (en) * 2012-10-11 2013-05-08 北京邮电大学 Video on demand (VOD) method, system, agent node and media server
CN105656876A (en) * 2015-11-26 2016-06-08 乐视云计算有限公司 Live video play method, device and system
CN107948664A (en) * 2017-11-20 2018-04-20 广州虎牙信息科技有限公司 Direct broadcasting room video playing control method, device and terminal
US20190068701A1 (en) * 2017-08-31 2019-02-28 Boe Technology Group Co., Ltd. Content Scheduling Method Based on CDN and P2P Network, and Communication Network
CN110727499A (en) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 Resource data acquisition method and device, computer equipment and storage medium
CN111225241A (en) * 2019-12-30 2020-06-02 视联动力信息技术股份有限公司 Communication method and device
CN112565907A (en) * 2020-11-25 2021-03-26 上海连尚网络科技有限公司 Video acquisition method, electronic device and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959054B (en) * 2009-07-14 2013-04-10 中国电信股份有限公司 Integrated P2P (Peer-To-Peer) VOD (Video-On-Demand) system and partner node selecting method
CN102118405B (en) * 2009-12-31 2014-07-30 比亚迪股份有限公司 P2P (Peer-to-Peer) network system applied to real-time video data transmission
US20170164020A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Content delivery method for content delivery network platform and scheduling proxy server
CN107070923B (en) * 2017-04-18 2020-07-28 上海云熵网络科技有限公司 P2P live broadcast system and method for reducing code segment repetition
CN108833591B (en) * 2018-07-13 2019-12-06 广州虎牙信息科技有限公司 method, electronic equipment, device and network architecture for data transmission in P2P network
CN109688417A (en) * 2018-12-12 2019-04-26 广州虎牙信息科技有限公司 A kind of data distribution systems, method, apparatus, TV box and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103096177A (en) * 2012-10-11 2013-05-08 北京邮电大学 Video on demand (VOD) method, system, agent node and media server
CN105656876A (en) * 2015-11-26 2016-06-08 乐视云计算有限公司 Live video play method, device and system
US20190068701A1 (en) * 2017-08-31 2019-02-28 Boe Technology Group Co., Ltd. Content Scheduling Method Based on CDN and P2P Network, and Communication Network
CN107948664A (en) * 2017-11-20 2018-04-20 广州虎牙信息科技有限公司 Direct broadcasting room video playing control method, device and terminal
CN110727499A (en) * 2019-09-18 2020-01-24 平安科技(深圳)有限公司 Resource data acquisition method and device, computer equipment and storage medium
CN111225241A (en) * 2019-12-30 2020-06-02 视联动力信息技术股份有限公司 Communication method and device
CN112565907A (en) * 2020-11-25 2021-03-26 上海连尚网络科技有限公司 Video acquisition method, electronic device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086720A (en) * 2022-06-14 2022-09-20 烽火通信科技股份有限公司 Network path calculation method and device for live broadcast service
CN115086720B (en) * 2022-06-14 2023-06-09 烽火通信科技股份有限公司 Network path calculation method and device for live broadcast service

Also Published As

Publication number Publication date
CN112565907A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
WO2022111027A1 (en) Video acquisition method, electronic device, and storage medium
CN104301373B (en) Via the synchronous sending out notice of file-sharing service
WO2020221190A1 (en) Applet state synchronization method, device and computer storage medium
WO2021082584A1 (en) Message exchange method and apparatus, readable medium, and electronic device
US20150019694A1 (en) Method for Screen Sharing, Related Device, and Communications System
US10897500B2 (en) Synchronizing a device using push notifications
KR20150083708A (en) Data streaming method of electronic apparatus and electronic apparatus thereof
US11259063B2 (en) Method and system for setting video cover
CN103299600A (en) Apparatus and method for transmitting live media content
WO2021082649A1 (en) List update method and apparatus, readable medium, and electronic device
WO2020063008A1 (en) Resource configuration method and apparatus, terminal, and storage medium
US10178431B2 (en) Hybrid stream delivery
CN112839067B (en) Data synchronization method and device
JP5669818B2 (en) Method, electronic device and server device for receiving and transmitting multimedia content
EP3417367B1 (en) Implementing a storage system using a personal user device and a data distribution device
CN109582274B (en) Volume adjusting method and device, electronic equipment and computer readable storage medium
JP2023528398A (en) Live distribution room creation method, device, electronic device and storage medium
EP4297416A1 (en) Angle-of-view switching method, apparatus and system for free angle-of-view video, and device and medium
US11606309B2 (en) Multimedia content steering
WO2013078614A1 (en) Audio compression algorithm selection method, device and communication system in scenario of virtual desktop
US9313613B2 (en) Method, apparatus, and system for performing unsolicited location-based download
CN110178353A (en) Method for processing business, Cloud Server and terminal device
CN112235642A (en) Video data processing method, device, equipment and storage medium
CN111835801B (en) File downloading method, device, server, edge equipment, terminal and medium
JP2007516499A (en) System and method for selecting a provider that provides services for content requested by a client device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21896530

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21896530

Country of ref document: EP

Kind code of ref document: A1