[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107995244A - A kind of data request method and device of live multimedia resource - Google Patents

A kind of data request method and device of live multimedia resource Download PDF

Info

Publication number
CN107995244A
CN107995244A CN201610958022.8A CN201610958022A CN107995244A CN 107995244 A CN107995244 A CN 107995244A CN 201610958022 A CN201610958022 A CN 201610958022A CN 107995244 A CN107995244 A CN 107995244A
Authority
CN
China
Prior art keywords
data
client
location
super node
multimedia resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610958022.8A
Other languages
Chinese (zh)
Inventor
赵国鑫
孔韬
刘春瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING UNION VOOLE TECHNOLOGY Co Ltd
Original Assignee
BEIJING UNION VOOLE TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING UNION VOOLE TECHNOLOGY Co Ltd filed Critical BEIJING UNION VOOLE TECHNOLOGY Co Ltd
Priority to CN201610958022.8A priority Critical patent/CN107995244A/en
Publication of CN107995244A publication Critical patent/CN107995244A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of data request method and device of live multimedia resource, to solve the problems, such as that the super node operating pressure in P2P networks in the prior art is larger.In the method, client is after definite first Data Position and the second Data Position, further determine that the 3rd Data Position, so as to fulfill asking the first data between first Data Position and the 3rd Data Position at least one second super node, and to the second data described in other client requests between the 3rd Data Position and second Data Position, reduce the operating pressure of super node in P2P networks, and the data of the live multimedia resource can be asked between client, therefore, pass through the above method, on the premise of the fluency of live multimedia resource described in the client terminal playing is ensured, reduce the operating pressure of super node, and improve the data sharing rate between client.

Description

Data request method and device for live multimedia resources
Technical Field
The invention relates to the technical field of computers, in particular to a data request method and device for live multimedia resources.
Background
With the development of the internet, the demand of people for network on demand is more and more common, so that the requirement for network services is higher and higher. In a conventional Client/Server (C/S) mode, each Client requests a play service from a Server. As the number of clients requesting a broadcast service increases, the server is limited by its capabilities, and therefore, in order To eliminate the server-centric network bottleneck, a Peer-To-Peer (P2P) technology has emerged.
The P2P technology breaks the traditional C/S mode, and in a P2P network using the P2P technology, each client is a node, and data transmission is carried out through the node without a plurality of servers. However, in order to ensure the data transmission quality, the P2P network automatically analyzes the hardware resources of each node, and allows the nodes with larger bandwidth and high-speed computing power to act as "super nodes". Thus, a plurality of "super nodes" and a plurality of clients collectively form a P2P network, wherein the super nodes can provide high quality data services to other clients.
Currently, in a P2P network, when each client acquires a live multimedia resource, each client first requests a super node for data of the live multimedia resource, and the super node selects a time point less than or equal to a current time, and returns the data of the live multimedia resource cached by the super node from the time point to the current time to each client. However, when each client simultaneously requests the super node for the data of the live multimedia resource at the same time, the data of the live multimedia resource acquired by each client is the same, the clients cannot share the data, and subsequently, the clients need to continuously request the super node for the data of the live multimedia resource. This results in a higher operating pressure of the super node.
Disclosure of Invention
The invention provides a data request method and device for live multimedia resources, which are used for solving the problem of higher working pressure of a super node in a P2P network in the prior art.
The specific technical scheme provided by the invention is as follows:
in a first aspect, an embodiment of the present invention provides a method for requesting data of a live multimedia resource, including:
a client sends a data position request to a first super node;
the client receives a first data position of a to-be-played live broadcast multimedia resource returned by the first super node, wherein the first data position is an initial data position of the client for playing the live broadcast multimedia resource;
the client determines a second data position, wherein the second data position is the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment;
the client determines a third data location between the first data location and the second data location, requests first data of the live multimedia resource between the first data location and the third data location from at least one second super node, and requests second data of the live multimedia resource between the third data location and the second data location from other clients.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the determining, by the client, the second data location includes:
the client acquires a preset data range, wherein the data range is a data range between the first data position and a position of data cached at the current moment of the live broadcast multimedia resource stored by the first super node;
and the client determines the second data position according to the first data position and the data range.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the second data location is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block.
With reference to the first aspect, in a third possible implementation manner of the first aspect, the determining, by the client, the third data location between the first data location and the second data location includes:
the client determines a fourth data location between the first data location and the second data location, the fourth data location being a minimum critical location at which the client requests data of the live multimedia resource from the at least one second super node;
the client determines the third data location between the fourth data location and the second data location.
With reference to the first aspect and any one of the first to third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, after the client requests, from at least one second super node, first data of the live multimedia resource between the first data location and the third data location, the method further includes:
the client receives first data sent by the at least one second super node;
the client determines that the first data passes through a first set time length after being received, the second data passes through a second set time length after the second data is requested to the other clients, and the second data sent by the other clients are not received;
the client requests the second data from the at least one second super node.
In a second aspect, an embodiment of the present invention provides a method for sending a data location of a live multimedia resource, where the method includes:
the super node receives a data position request sent by a client;
the super node determines a first data position, wherein the first data position is an initial data position of the client for playing the live multimedia resource;
and the super node sends the first data position to the client.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the determining, by the super node, the first data location includes:
the super node acquires a preset data range, wherein the data range is a data range from a starting data position of the live broadcast multimedia resource stored by the super node to a position of data cached at the current moment from a starting data position of the live broadcast multimedia resource played by the client;
the super node determines a fifth data position according to the data range and the position of the data of the live broadcast multimedia resource cached by the super node at the current moment;
and the super node determines a key frame closest to the fifth data position in a plurality of preset key frames, and takes the determined position of the key frame as the first data position, wherein the plurality of key frames are contained in the data of the live broadcast multimedia resource cached by the super node.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the fifth data location is determined according to the following formula:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node at the current moment.
In a third aspect, an embodiment of the present invention provides a client, including:
a sending unit, configured to send a data location request to a first super node;
a receiving unit, configured to receive a first data position of a to-be-played live broadcast multimedia resource returned by the first super node, where the first data position is an initial data position at which the client plays the live broadcast multimedia resource;
the processing unit is used for determining a second data position, wherein the second data position is a position of the data of the live broadcast multimedia resource cached by the first super node at the current moment; and determining a third data location between the first data location and the second data location; and
requesting first data of the live multimedia asset between the first data location and the third data location from at least one second super node, and requesting second data of the live multimedia asset between the third data location and the second data location from other clients.
With reference to the third aspect, in a first possible implementation manner of the third aspect, when determining the second data location, the processing unit is specifically configured to:
acquiring a preset data range, wherein the data range is the data range between the first data position and the position of the data cached at the current moment of the live broadcast multimedia resource stored by the first super node;
and determining the second data position according to the first data position and the data range.
With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the second data position is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block.
With reference to the third aspect, in a third possible implementation manner of the third aspect, when determining the third data position between the first data position and the second data position, the processing unit is specifically configured to:
determining a fourth data location between the first data location and the second data location, the fourth data location being a critical location of a minimum data range for which the processing unit requests data of the live multimedia resource from the at least one second node;
determining the third data location between the fourth data location and the second data location.
With reference to the third aspect and any one of the first to third possible implementation manners of the third aspect, in a fourth possible implementation manner of the first aspect,
the receiving unit is further configured to receive first data sent by at least one second super node after the processing unit requests the at least one second super node for the first data of the live multimedia resource between the first data location and the third data location;
the processing unit is further configured to determine that a first set duration elapses after the receiving unit receives the first data, a second set duration elapses after the receiving unit requests the other clients for the second data, and the receiving unit does not receive the second data sent by the other clients; and
requesting the second data from the at least one second supernode.
In a fourth aspect, an embodiment of the present invention provides a super node, including:
the receiving unit is used for receiving a data position request sent by a client;
the processing unit is used for determining a first data position, wherein the first data position is an initial data position for playing the live multimedia resource by the client;
and the sending unit is used for sending the first data position to the client.
With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, when determining the first data location, the processing unit is specifically configured to:
acquiring a preset data range, wherein the data range is a data range between a starting data position of the live broadcast multimedia resource, stored by the super node, played by the client and a position of data cached at the current moment;
determining a fifth data position according to the data range and the position of the data of the live multimedia resource cached by the super node at the current moment;
determining a key frame closest to the fifth data position in a plurality of preset key frames, and taking the determined position of the key frame as the first data position, wherein the plurality of key frames are contained in the data of the live multimedia resource cached by the super node.
With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the fifth data location is determined according to the following formula:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node at the current moment.
In the embodiment of the present invention, after determining the first data position and the second data position, the client further determines the third data position, so as to request at least one second super node for first data between the first data position and the third data position, and request other clients for second data between the third data position and the second data position, thereby reducing the working pressure of super nodes in a P2P network, and enabling clients to request data of the live multimedia resource, therefore, by the above method, on the premise of ensuring the fluency of the client playing the live multimedia resource, the working pressure of super nodes is reduced, and the data sharing rate between clients is improved.
Drawings
Fig. 1 is a data schematic diagram of a live multimedia resource according to an embodiment of the present invention;
FIG. 2 is a diagram of a P2P network architecture using P2P technology according to an embodiment of the present invention;
fig. 3 is a flowchart of a data request method for live multimedia resources according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for sending a data location of a live multimedia resource according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a data request method for a live multimedia resource according to an embodiment of the present invention;
fig. 6 is a diagram of a structure of a client according to an embodiment of the present invention;
fig. 7 is a diagram of a super node structure according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a data request method and device for live multimedia resources, which are used for solving the problem of higher working pressure of a super node in a P2P network in the prior art. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
In the embodiment of the present invention, after determining the first data position and the second data position, the client further determines the third data position, so as to request at least one second super node for first data between the first data position and the third data position, and request other clients for second data between the third data position and the second data position, thereby reducing the working pressure of super nodes in the P2P network, and enabling clients to request data of the live multimedia resource, therefore, by the above method, on the premise of ensuring the fluency of the client playing the live multimedia resource, the working pressure of super nodes is reduced, and the data sharing rate between clients is improved.
Hereinafter, some terms in the present application are explained to facilitate understanding by those skilled in the art.
1) The super node related to the embodiment of the invention provides data service of multimedia resources for the client. The super node is a node with larger bandwidth and high-speed computing capacity in the P2P network. The P2P network ensures the quality of data transmission, and the super node is usually selected by hardware resources in the network.
2) The data of the live multimedia resources related to the embodiment of the invention can be stored according to the data blocks with set sizes. When the super node or the client stores the data of the live broadcast multimedia resource, the data are arranged according to the sequence of the data blocks, for example, the data of the live broadcast multimedia resource stored by the super node shown in fig. 1 includes t +1 data blocks from data block 0 to data block t, where the identification sequence of the data blocks may represent the time sequence of the super node caching the data blocks.
3) The data position of the live broadcast multimedia resource related to the embodiment of the invention is the position of the designated data of the live broadcast multimedia resource stored by the super node. The data location may be represented by a storage location of the data; when the super node stores the data of the live broadcast multimedia resource according to the data block with the set size, the data position can be represented by the position number of the data block. The representation form of the data position is not limited in the embodiment of the present invention.
4) The rollback time length related to the embodiment of the invention is set for live multimedia resources. When the client requests to play the live multimedia resources at the current moment, the super node ensures that the data of the live multimedia resources within the backspacing duration before the current moment are stored. In this way, when the client requests to play, the super node can send the data of the live broadcast multimedia resource at the specified time before the current time to the client, so as to ensure the fluency of the client playing the live broadcast multimedia resource, wherein the specified time is before the current time, and the time offset between the specified time and the current time is equal to the back-off duration.
5) The data range related to the embodiment of the invention is set for the code rate of the live multimedia resource. Wherein the data range conforms to the following formula one or formula two:
the unit of the data range is byte, the unit of the rollback duration is second, the unit of the code rate is bit/second, and 8 is a multiple relation between byte and bit; or
The unit of the data range is the number of data blocks, the unit of the backoff duration is seconds, the unit of the code rate is bits/second, the unit of the size of the data blocks is bytes, and 8 is a multiple relation between the bytes and the bits.
Wherein, in a normal case, the data range is defined by the formula one; and when the super node stores the data of the live multimedia resources according to the data blocks with set sizes, the data range adopts the formula II.
6) The terms "first," "second," and the like in connection with embodiments of the invention are used for descriptive purposes only and not for purposes of indication or implication relative importance, nor for order of indication or implication. For example, the "first super node" and the "second super node" related to the embodiment of the present invention may be the same super node, or may be different super nodes, that is, the "at least one second super node" may include the "first super node", or may not include the "first super node".
In order to more clearly describe the technical solution of the embodiment of the present invention, the following describes in detail a data request method and apparatus for live multimedia resources provided by the embodiment of the present invention with reference to the accompanying drawings.
Referring to fig. 2, the architecture of the P2P network includes a live data source, a data access layer, a data distribution layer, a node server, a plurality of clients (e.g., a client a and a client B in the figure), and a plurality of super nodes (e.g., a super node a and a super node B in the figure). Wherein,
the live broadcast data source is used for generating live broadcast multimedia resources and pushing the live broadcast multimedia resources to the data access layer;
and the data access layer is used for encapsulating the live multimedia resources into a private format. Optionally, the data access layer may further cut data of the live multimedia resource into a plurality of data blocks with a set size, and perform information addition processing on the data blocks, for example, add corresponding information such as a position number, code rate information, whether the data blocks are key frames, and the like to the data blocks;
the data distribution layer is used for pushing the data of the live broadcast multimedia resources to the plurality of super nodes;
the node server has the functions of realizing management, routing and load balancing of the super nodes, and maintains a corresponding preset data range for each live broadcast multimedia resource;
and the super nodes are used for storing the data of the live broadcast multimedia resources and sending the data of the live broadcast multimedia resources to a client when the client requests the data of the live broadcast multimedia resources. The data of the live multimedia resources at least comprise data between the current moment and the appointed moment, and the range of the data is equal to the preset data range.
And each client in the plurality of clients requests the data of the live broadcast multimedia resources from the corresponding super node respectively and receives the data of the live broadcast multimedia resources returned by the corresponding super node. The multiple clients may be live devices, such as network set top boxes. The data of the live broadcast multimedia resources requested by different clients are different, so that the clients can request the data of the multimedia resources after receiving the data of the live broadcast multimedia resources returned by the corresponding super nodes, and obviously, the method not only reduces the working pressure of the super nodes, but also improves the data sharing rate among the clients. For example, the client a requests the super node a for data of data block 0 to data block n in the data of the live multimedia resource shown in fig. 1, and the client B requests the super node B for data of data block 0 to data block t in the data of the live multimedia resource shown in fig. 1; after the client a and the client B respectively receive corresponding data, the client a may request the client B for data of data blocks m to t in the data of the live broadcast multimedia resource shown in fig. 1, so that data sharing between the client a and the client B is realized, the client a does not need to request a super node for data of the data blocks m to t, and the working pressure of the super node is reduced.
Based on the above embodiments, an embodiment of the present invention provides a data request method for live multimedia resources, which is applicable to a P2P network shown in fig. 2, and referring to fig. 3, a specific flow of the method includes:
step 301: the client sends a data location request to the first supernode.
When a user requests to play a live multimedia asset through the client, the client performs step 301. Optionally, the data location request includes identification information of the live multimedia resource to be played, where the identification information may be a channel number of the live multimedia resource.
Optionally, when the client sends the data location request to the first super node, selecting the first super node may include the following two ways:
the first mode is as follows: and when the information of the first super node is stored in the client, the client selects the stored first super node.
The second mode is as follows: when the information of the first super node is not stored in the client, the client selects the first super node through a node server, wherein a specific method may be as follows:
the client sends a login request to the node server, wherein the login request comprises identification information of the live broadcast multimedia resource;
the client receives a login success response which is returned by the node server and aims at the identification information, wherein the login success response comprises a super node list; the node server determines that a plurality of super nodes in the super node list all store data of the live broadcast multimedia resources;
the client selects the first super node in the super node list, where the first super node may be a first super node in the super node list.
Optionally, when the first super node stores the data of the live broadcast multimedia resource according to a data block with a set size, and the client sends the data location request to the first super node, the data location request may carry a location number of a non-existent data block, for example, a data location request carrying a negative value (e.g., -1, -2) of the location number of the data block is sent. The client does not know the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment, and the client sends a data position request carrying the position number of the abnormal data block to the first super node to enable the first super node to return the initial data position where the client plays the live broadcast multimedia resource to the client.
Step 302: and the client receives a first data position of the live broadcast multimedia resource to be played, which is returned by the first super node, wherein the first data position is an initial data position of the client for playing the live broadcast multimedia resource.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is data block t in the graph, and the position of the data of the live broadcast multimedia resource cached at the time when the first super node backs before the current time is data block 0 in the graph, at this time, the first data position is data block 0.
Optionally, after receiving the data location request sent by the client, the first super node obtains a preset data range, determines the first data location according to the data range and the location of the data of the live broadcast multimedia resource cached by the first super node at the current time, and finally carries the first data location in a data location response and sends the data location response to the client.
Optionally, the client receives a first data location of the to-be-played live broadcast multimedia resource returned by the first super node, and the specific method may be as follows:
the client receives a data position response returned by the first super node, wherein the data position response comprises the first data position;
and the client acquires the first data position in the position response.
Step 303: and the client determines a second data position, wherein the second data position is the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource stored in the first super node at the current time is a data block t in the graph, at this time, the second data position is the data block t.
Optionally, the determining, by the client, the second data location may specifically be divided into the following two steps:
A. and the client acquires a preset data range, wherein the data range is the data range between the first data position and the position of the data cached at the current moment of the live broadcast multimedia resource stored by the first super node.
B. And the client determines the second data position according to the first data position and the data range.
Optionally, in the step a, the obtaining, by the client, the data range may include the following two ways:
the first mode is as follows: when the client plays the data of the live multimedia resource in the past, the client logs in a node server and then acquires the data range, the data range is stored in the client, and when the data range is not cleared by the client, the client acquires the data range stored by the client.
The second mode is as follows: when the client does not currently store the data range, the client logs in the node server again, receives the data range sent by the node server, and optionally,
when the client executes step 301, if the client determines the first super node in the second manner, the login success response returned by the node server further includes the data range, and the client acquires the data range in the login success response.
Optionally, in step B, the client determines the second data location according to the data range and the first data location, and the specific method may be as follows:
and the client adds the first data position and the data range to obtain the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment as the second data position. For example,
taking fig. 1 as an example, the first data position is a data block 0 in the graph, the data range is the number of data blocks of the live broadcast multimedia resource cached by the first super node within a backoff duration before the current time, and the client adds the data block 0 to the data range to obtain a position data block t of the live broadcast multimedia resource data cached at the current time, that is, the second data position is obtained.
Optionally, in step B, the second data position may be determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block. For example:
taking fig. 1 as an example, the first data location is data block 0 in the graph, the data range is the number of bytes of data of the live multimedia resource cached by the first super node in the backoff duration before the current time, the data range divided by the size of the preset data block is the number of data blocks of the live multimedia resource cached by the first super node in the backoff duration before the current time, and the client adds the data block 0 to obtain location data block t of the live multimedia resource data cached at the current time, so as to obtain the second data location.
Step 304: the client determines a third data location between the first data location and the second data location.
The third data position is a boundary data position where the client requests data of the live multimedia resource from at least one second super node and other clients respectively, wherein the data of the live multimedia resource cached in the at least one second super node is the same as the data of the live multimedia resource cached in the first super node.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is a data block t in the graph, and the position of the data of the live broadcast multimedia resource cached at a time before the current time by the first super node is a data block 0 in the graph, at this time, the first data position is the data block 0, the second data position is the data block t, and the third data position may be a data block m between the data block 0 and the data block t.
Optionally, the client determines the third data location between the first data location and the second data location, and the specific method may be as follows:
the client determines a fourth data location between the first data location and the second data location, where the fourth data location is a critical location of a minimum data range for the client to request the data of the live multimedia resource from the at least one second super node, and may be a data block y between a data block 0 and a data block t in fig. 1; wherein, optionally, the most preferred fourth data position may be a position exactly midway between the first data position and the second data position;
the client determines the third data location between the fourth data location and the second data location.
By the method, the client determines the fourth data position, so that the client can be ensured to quickly acquire enough data of the live multimedia resource, and the client can be ensured to play smoothly within a certain time.
Optionally, when determining the third data location, the client may randomly select a location between the fourth data location and the second data location as the third data location, where the third data location may be the same as the fourth data location or the same as the second data location. Therefore, the live multimedia data requested by different clients are different, and when the live multimedia data acquired by different clients are different, the clients can request the multimedia resource data, so that data sharing among the clients is realized, and the working pressure of the super node is reduced.
Step 305: the client requests first data of the live multimedia asset between the first data location and the third data location from the at least one second super node, and requests second data of the live multimedia asset between the third data location and the second data location from other clients.
Optionally, taking the data of the live multimedia resource shown in fig. 1 as an example, the first data requested by the client to the at least one second super node may be data of the live multimedia resource between data block 0 and data block n; the client may request data of different data ranges of the live broadcast multimedia resource from the at least one second super node, for example, the client may request data of the live broadcast multimedia resource between data block 0 and data block 4 from one second super node, and request data of the live broadcast multimedia resource between data block 5 and data block n from another second super node;
the second data requested by the client from the other clients may be data of the live multimedia resource between data block m and data block t; the client may request data of different data ranges of the live multimedia resource from a plurality of other clients, for example, the client may request data of the live multimedia resource between a data block m and a data block p from one client and request data of the live multimedia resource between a data block q and a data block t from another client.
Through the client side respectively requesting the first data from the at least one second super node and requesting the second data from other client sides, the fluency of playing the live broadcast multimedia resources by the client side can be ensured, the data sharing between the client side and the other client sides can be ensured, and the working pressure of the super nodes is reduced.
Optionally, after the client requests the at least one second super node for data of the live multimedia resource between the first data location and the third data location, the method further includes:
the client receives first data sent by the at least one second super node;
the client determines that the first data passes through a first set time length after being received, the second data passes through a second set time length after the second data is requested to the other clients, and the second data sent by the other clients are not received;
the client requests the second data from the at least one second super node.
By the method, data sharing between the client and other clients can be guaranteed, and the working pressure of the super node is reduced.
By adopting the data request method for the live broadcast multimedia resource provided by the embodiment of the invention, after the first data position and the second data position are determined, the third data position is further determined by the client, so that the first data between the first data position and the third data position is requested from at least one second super node, and the second data between the third data position and the second data position is requested from other clients, the working pressure of super nodes in a P2P network is reduced, and the clients can request the data of the live broadcast multimedia resource, therefore, by the method, the working pressure of the super nodes is reduced on the premise of ensuring the fluency of playing the live broadcast multimedia resource by the client, and the data sharing rate between the clients is improved.
Based on the above embodiments, an embodiment of the present invention provides a method for sending a data location of a live multimedia resource, which is applicable to a P2P network shown in fig. 2, and with reference to fig. 4, a specific process of the method includes:
step 401: and the super node receives a data position request sent by the client.
And when a user requests to play a live multimedia resource through the client, the client sends the data position request to the super node. Optionally, the data location request includes identification information of the live multimedia resource to be played, where the identification information may be a channel number of the live multimedia resource.
Optionally, when the super node stores the data of the live multimedia resource according to a data block with a set size, and the super node receives the data location request sent by the client, the super node may receive a data location request sent by the client and carrying a location number of a non-existent data block, for example, send a data location request carrying a data block whose location number is a negative value (e.g., -1, -2). And after the super node receives a data position request which is sent by the client and carries the position number of the abnormal data block, the super node returns the initial data position where the client should play the live broadcast multimedia resource to the client.
Step 402: and the super node determines a first data position, wherein the first data position is an initial data position for the client to play the live broadcast multimedia resource.
Optionally, the determining, by the super node, the first data position may specifically include the following three steps:
a1, the super node obtains a preset data range, wherein the data range is the data range between the position of the live broadcast multimedia resource stored by the super node from the initial data position of the client playing the live broadcast multimedia resource to the position of the data cached at the current moment.
And B1, the super node determines a fifth data position according to the data range and the position of the data of the live broadcast multimedia resource cached by the super node at the current moment.
C1, the super node determines a key frame closest to the fifth data position among a plurality of preset key frames, and takes the determined key frame position as the first data position, where the plurality of key frames are included in the data of the live multimedia resource that the super node has cached.
Optionally, in the step a1, the acquiring, by the super node, the data range may include the following two ways:
the first mode is as follows: and when the super node logs in a node server in the past and acquires the data range, storing the data range in the super node, wherein the data range is not cleared by the super node, and the super node acquires the data range stored by the super node.
The second mode is as follows: when the super node does not store the data range currently, the super node logs in the node server again and receives the data range sent by the node server, wherein the specific method may be as follows:
after logging in the node server, the super node sends a notification message to the node server when receiving the data of the live multimedia resource pushed by a data distribution layer, wherein the notification message comprises identification information of the data of the live multimedia resource;
the super node receives a notification response aiming at the identification information and sent by the node server, wherein the notification response comprises the data range;
and the super node acquires the data range in the notification response.
Optionally, in the step B1, the supernode determines a fifth data location according to the data range and the location of the data of the live multimedia resource cached by the supernode at the current time, and the specific method may be:
and the super node subtracts the data range from the position of the data of the live multimedia resource cached at the current moment to obtain the fifth data position. For example,
taking fig. 1 as an example, the position of the data of the live broadcast multimedia resource cached by the super node at the current time is a data block t in the graph, the data range is the number of the data blocks of the live broadcast multimedia resource cached by the super node within a backoff duration before the current time, and the super node subtracts the data range from the data block t to obtain the fifth data position.
Optionally, in step B1, the fifth data location may be determined according to the following formula:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node at the current moment. For example,
taking fig. 1 as an example, the position of the data of the live broadcast multimedia resource cached by the super node at the current time is a data block t (i.e., the sixth data position) in the graph, the data range is the number of bytes of the data of the live broadcast multimedia resource cached by the super node in the backoff duration before the current time, the data range is divided by the size of the preset data block to be the number of the data blocks of the live broadcast multimedia resource cached by the super node in the backoff duration before the current time, and the super node subtracts the number of the obtained data blocks from the data block t to obtain the fifth data position.
Optionally, in the step C1, when the fifth data location is a location of the super node in one of a plurality of preset key frames, the fifth data location is the first data location; and when the fifth data position is not the position of one key frame of the super node in a plurality of preset key frames, the super node takes the position of the key frame closest to the fifth data position as the first data position.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the super node is a data block t in the graph, and the position of the key frame closest to the position of the data of the live broadcast multimedia resource cached at the time when the super node backs before the current time is a data block 0 in the graph, at this time, the first data position is the data block 0.
Step 403: and the super node sends the first data position to the client.
Optionally, the super node sends the first data location to the client, and the specific method may be:
and the super node carries the first data position in a data position response and sends the data position response to the client.
By adopting the method for sending the data position of the live broadcast multimedia resource provided by the embodiment of the invention, after the super node receives the data position request sent by the client, the super node determines the first data position and sends the first data position to the client. In this way, the client can determine a second data position according to the first data position and further determine a third data position, so that the first data between the first data position and the third data position is requested from at least one second super node, and the second data between the third data position and the second data position is requested from other clients, the working pressure of super nodes in a P2P network is reduced, and the data of the live broadcast multimedia resource can be requested between the clients.
Based on the above embodiments, an example of a data request method for a live multimedia resource is provided in the embodiments of the present invention, and this example may be applied to a P2P network shown in fig. 2, and referring to fig. 5, a specific flow of this example includes:
step 501: a first super node logs in a node server and sends a notification message to the node server, wherein the notification message comprises identification information of data of live broadcast multimedia resources pushed by a data distribution layer and received by the first super node.
Step 502: and the node server sends a notification response aiming at the identification information to the first super node, wherein the notification response comprises a preset data range, and the data range is a data range between a starting data position of the live broadcast multimedia resource played by the client A and a position of the data cached at the current moment, which are stored by the first super node.
Step 503: and the client A sends a login request to the node server, wherein the login request comprises the identification information of the live broadcast multimedia resource.
Step 504: and the node server returns a login success response to the client A, wherein the login success response comprises a super node list and the data range.
Wherein a plurality of super nodes in the super node list determined by the node server all store data of the live broadcast multimedia resource
Step 505: and the client A selects the first super node and sends a data position request to the first super node.
Optionally, the client a selects the first super node from the super node list included in the login success response in the step 502, where the first super node may be a first super node in the super node list.
When the user requests to play a live multimedia resource through the client a, the client a executes step 505. Optionally, the data location request includes identification information of a live broadcast multimedia resource to be played, where the identification information may be a channel number of the live broadcast multimedia resource.
Optionally, when the first super node stores the data of the live broadcast multimedia resource according to a data block with a set size, and the client sends the data location request to the first super node, the data location request may carry a location number of a non-existent data block, for example, a data location request carrying a negative value (e.g., -1, -2) of the location number of the data block is sent. The client does not know the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment, and the client sends a data position request carrying the position number of the abnormal data block to the first super node to enable the first super node to return the initial data position where the client plays the live broadcast multimedia resource to the client.
Step 506: and the first super node acquires the data range in the notification response and determines a first data position according to the data range and the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment. The data range is a data range between a starting data position of the live broadcast multimedia resource played by the client A and a position of data cached at the current moment, wherein the data range is stored by the first super node, and the first data position is a starting data position of the client A for playing the live broadcast multimedia resource.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is data block t in the graph, and the position of the data of the live broadcast multimedia resource cached at the time when the first super node backs before the current time is data block 0 in the graph, at this time, the first data position is data block 0.
Optionally, the first super node determines the first data position according to the data range and the position of the data of the live multimedia resource cached by the first super node at the current time, and the specific method may be:
the first super node determines a fifth data position according to the data range and the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment;
and the first super node determines a key frame closest to the fifth data position in a plurality of preset key frames, and takes the determined position of the key frame as the first data position, wherein the plurality of key frames are contained in the data of the live broadcast multimedia resource cached by the first super node.
Optionally, the first super node determines a fifth data position according to the data range and the position of the data of the live multimedia resource cached by the first super node at the current time, and the specific method may be:
and the first super node subtracts the data range from the position of the data of the live multimedia resource cached at the current moment to obtain the fifth data position. For example,
taking fig. 1 as an example, the position of the data of the live broadcast multimedia resource cached by the first super node at the current time is a data block t in the graph, the data range is the number of the data blocks of the live broadcast multimedia resource cached by the first super node within a backoff duration before the current time, and the first super node subtracts the data range from the data block t to obtain the fifth data position.
Optionally, the fifth data location may be determined according to the following formula:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the first super node at the current moment. For example,
taking fig. 1 as an example, the location of the data of the live broadcast multimedia resource cached by the first super node at the current time is a data block t (i.e., the sixth data location) in the graph, the data range is the number of bytes of the data of the live broadcast multimedia resource cached by the first super node in the backoff duration before the current time, the data range is divided by the size of the preset data block to be the number of the data blocks of the live broadcast multimedia resource cached by the first super node in the backoff duration before the current time, and the first super node subtracts the number of the obtained data blocks from the data block t to obtain the fifth data location.
Optionally, when the fifth data position is a position of the first super node in a key frame of a plurality of preset key frames, the fifth data position is the first data position; when the fifth data position is not the position of one key frame of the first super node in a plurality of preset key frames, the first super node takes the position of the key frame closest to the fifth data position as the first data position.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is a data block t in the graph, and the position of the key frame closest to the position of the data of the live broadcast multimedia resource cached at the time before the current time by the first super node is a data block 0 in the graph, at this time, the first data position is a data block 0.
Step 507: and the first super node sends the first data position to the client A.
Optionally, the first super node sends the first data location to the client a, and the specific method may be:
and the first super node carries the first data position in a data position response and sends the data position response to the client A.
Step 508: and the client A acquires the data range in the login success response and determines a second data position according to the data range and the first data position. The data range is a data range from a starting data position of the live broadcast multimedia resource stored by the first super node to a position of data cached at the current moment, which is played by the live broadcast multimedia resource stored by the first super node from the client, and the second data position is a position of the data of the live broadcast multimedia resource cached at the current moment by the first super node.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource stored in the first super node at the current time is a data block t in the graph, at this time, the second data position is the data block t.
Optionally, the client a determines, according to the data range and the first data position, a position of the data of the live broadcast multimedia resource cached by the first super node at the current time as the second data position, and the specific method may be as follows:
and the client A adds the first data position and the data range to obtain the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment, and the position is used as the second data position. For example,
taking fig. 1 as an example, the first data position is a data block 0 in the graph, the data range is the number of data blocks of the live broadcast multimedia resource cached by the first super node within a backoff duration before the current time, and the client adds the data block 0 to the data range to obtain a position data block t of the live broadcast multimedia resource data cached at the current time, that is, the second data position is obtained.
Optionally, the second data location may also be determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block. For example:
taking fig. 1 as an example, the first data location is data block 0 in the graph, the data range is the number of bytes of data of the live multimedia resource cached by the first super node in the backoff duration before the current time, the data range divided by the size of the preset data block is the number of data blocks of the live multimedia resource cached by the first super node in the backoff duration before the current time, and the client adds the data block 0 to obtain location data block t of the live multimedia resource data cached at the current time, so as to obtain the second data location.
Step 509: the client a determines a fourth data location between the first data location and the second data location. The fourth data position is a critical position of a minimum data range where the client a requests the at least one second super node for data of the live multimedia resource.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is a data block t in the graph, and the position of the data of the live broadcast multimedia resource cached at a time before the current time by the first super node is a data block 0 in the graph, at this time, the first data position is the data block 0, the second data position is the data block t, and the third data position may be a data block y between the data block 0 and the data block t.
Optionally, the most preferred fourth data position may be a position exactly in the middle of the first data position and the second data position.
By the method, the client A determines the fourth data position, so that the client A can be ensured to quickly acquire enough data of the live multimedia resource, and the client A is ensured to play smoothly within a certain time.
Step 510: the client a determines the third data location between the fourth data location and the second data location. The third data position is a boundary data position at which the client requests data of the live broadcast multimedia resource from at least one second super node and other clients (client B, client C), respectively, wherein the data of the live broadcast multimedia resource cached in the at least one second super node is the same as the data of the live broadcast multimedia resource cached in the first super node.
Still taking fig. 1 as an example, when the position of the data of the live broadcast multimedia resource cached at the current time stored by the first super node is a data block t in the graph, and the position of the data of the live broadcast multimedia resource cached at a time before the current time by the first super node is a data block 0 in the graph, at this time, the first data position is the data block 0, the second data position is the data block t, and the third data position may be a data block m between the data block 0 and the data block t.
Optionally, when determining the third data location, the client a may randomly determine a location between the fourth data location and the second data location as the third data location, where the third data location may be the same as the fourth data location or the second data location. Therefore, the live multimedia data requested by different clients are different, and when the live multimedia data acquired by different clients are different, the clients can request the multimedia resource data, so that data sharing among the clients is realized, and the working pressure of the nodes is reduced.
Step 511: the client a sends a first data request to the at least one second super node, and sends a second data request to the client B and the client C, wherein the first data request is for requesting first data of the live multimedia resource between the first data location and the third data location, and the second data request is for requesting second data of the live multimedia resource between the third data location and the second data location.
Taking the data of the live multimedia resource shown in fig. 1 as an example, the first data requested by the client a to the at least one second super node may be the data of the live multimedia resource between data block 0 and data block n; the client a may request data of different data ranges of the live broadcast multimedia resource from the at least one second super node, for example, the client a may request data of the live broadcast multimedia resource between data block 0 and data block 4 from one second node, and request data of the live broadcast multimedia resource between data block 5 and data block n from another second node;
the second data requested by the client a from the other clients (the client a, the client B) may be data of the live multimedia resource between a data block m and a data block t; the client may request the data of the live multimedia resource in different data ranges from the client B to the client C, for example, the client a may request the data of the live multimedia resource between the data block m to the data block p from the client B, and request the data of the live multimedia resource between the data block q to the data block t from the client C.
The client A requests the first data from the at least one second super node and requests the second data from the client B and the client C respectively, so that the client A can be ensured to play the live multimedia resources smoothly, and the data sharing between the client A and the client B and the client C can be ensured.
Step 512: and the client A receives the first data sent by the at least one second super node and receives the second data sent by the client B and the client C.
Optionally, the client a determines that a second set time period passes after receiving the first data and the second data is requested to the client B and the client C, and the client a does not receive the second data sent by the client B and the client C, and requests the second data to the at least one second super node. Therefore, data sharing between the client and other clients can be guaranteed, and the working pressure of the super node is reduced.
By adopting the data request method for the live broadcast multimedia resource provided by the embodiment of the invention, after the first data position and the second data position are determined, the third data position is further determined by the client, so that the first data between the first data position and the third data position is requested from at least one second super node, and the second data between the third data position and the second data position is requested from other clients, the working pressure of super nodes in a P2P network is reduced, and the clients can request the data of the live broadcast multimedia resource, therefore, by the method, the working pressure of the super nodes is reduced on the premise of ensuring the fluency of playing the live broadcast multimedia resource by the client, and the data sharing rate between the clients is improved.
Based on the above embodiments, an embodiment of the present invention further provides a client, where the client has a function of implementing the data request method for live multimedia resources shown in fig. 3, and as shown in fig. 6, the client 600 includes: a transmitting unit 601, a receiving unit 602, and a processing unit 603, wherein,
the sending unit 601 is configured to send a data location request to a first super node;
the receiving unit 602 is configured to receive a first data position of a to-be-played live broadcast multimedia resource returned by the first super node, where the first data position is an initial data position of the client 600 playing the live broadcast multimedia resource;
the processing unit 603 is configured to determine a second data location, where the second data location is a location of data of the live multimedia resource cached by the first supernode at the current moment; and determining a third data location between the first data location and the second data location; and
requesting first data of the live multimedia asset between the first data location and the third data location from at least one second super node, and requesting second data of the live multimedia asset between the third data location and the second data location from other clients.
Optionally, the data location request includes identification information of the live multimedia resource.
Optionally, when determining the second data position, the processing unit 603 is specifically configured to:
acquiring a preset data range, wherein the data range is the data range between the first data position and the position of the data cached at the current moment of the live broadcast multimedia resource stored by the first super node;
and determining the second data position according to the first data position and the data range.
Optionally, when the data range is obtained, the processing unit 603 is specifically configured to:
acquiring the data range stored by the user; or
And receiving the data range sent by the node server.
Optionally, the second data location is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block.
Optionally, when determining the third data position between the first data position and the second data position, the processing unit 603 is specifically configured to:
determining a fourth data location between the first data location and the second data location, the fourth data location being a critical location of a minimum data range for which the processing unit 603 requests data of the live multimedia resource from the at least one second super node;
determining the third data location between the fourth data location and the second data location.
Optionally, the receiving unit 602 is further configured to receive first data sent by at least one second super node after the processing unit 603 requests the at least one second super node for the first data of the live multimedia resource between the first data location and the third data location;
the processing unit 603 is further configured to determine that a first set time period elapses after the receiving unit 602 receives the first data, a second set time period elapses after the receiving unit 602 requests the other clients for the second data, and the receiving unit 602 does not receive the second data sent by the other clients; and
requesting the second data from the at least one second supernode.
By adopting the client provided by the embodiment of the invention, after the first data position and the second data position are determined, the third data position is further determined, so that the first data between the first data position and the third data position are requested from at least one second super node, and the second data between the third data position and the second data position are requested from other clients, the working pressure of the super nodes in a P2P network is reduced, and the clients can request the data of the live broadcast multimedia resource, therefore, by adopting the method, the working pressure of the super nodes is reduced on the premise of ensuring the fluency of the client playing the live broadcast multimedia resource, and the data sharing rate between the clients is improved.
Based on the above embodiments, an embodiment of the present invention further provides a super node, where the super node has a function of implementing a data location sending method for a live broadcast multimedia resource shown in fig. 4, and as shown in fig. 7, the super node 700 includes: a receiving unit 701, a processing unit 702 and a transmitting unit 703, wherein,
the receiving unit 701 is configured to receive a data location request sent by a client;
the processing unit 702 is configured to determine a first data position, where the first data position is an initial data position of the client for playing the live multimedia resource;
the sending unit 703 is configured to send the first data location to the client.
Optionally, the data location request includes identification information of the live multimedia resource.
Optionally, when determining the first data position, the processing unit 702 is specifically configured to:
acquiring a preset data range, where the data range is a data range from a starting data position of the live broadcast multimedia resource played by the client to a position of data cached at the current moment, of the live broadcast multimedia resource stored by the super node 700;
determining a fifth data position according to the data range and the position of the data of the live multimedia resource cached by the super node 700 at the current moment;
determining a key frame closest to the fifth data position from among a plurality of preset key frames, and using the determined key frame position as the first data position, where the plurality of key frames are included in the data of the live multimedia resource cached by the super node 700.
Optionally, when acquiring the preset data range, the processing unit 702 is specifically configured to:
acquiring the data range stored by the user; or
And receiving the data range sent by the node server.
Optionally, the fifth data location is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node 700 at the current time.
By adopting the super node provided by the embodiment of the invention, after receiving the data position request sent by the client, the first data position is determined, and the first data position is sent to the client. In this way, the client can determine a second data position according to the first data position and further determine a third data position, so that the first data between the first data position and the third data position is requested from at least one second super node, and the second data between the third data position and the second data position is requested from other clients, the working pressure of super nodes in a P2P network is reduced, and the data of the live broadcast multimedia resource can be requested between the clients.
In summary, in the data request method and apparatus for live multimedia resources provided in the embodiments of the present invention, after determining the first data location and the second data location, the client further determines the third data location, thereby enabling a request for first data between the first data location and the third data location from at least one second supernode, and requesting second data between the third data location and the second data location from other clients, reduces the operating pressure of the super node in the P2P network, and clients can request data of the live multimedia resource therebetween, and thus, by the above method, on the premise of ensuring the fluency of the client side for playing the live broadcast multimedia resources, the working pressure of the super nodes is reduced, and the data sharing rate between the client sides is improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (16)

1. A data request method of a live multimedia resource is characterized by comprising the following steps:
a client sends a data position request to a first super node;
the client receives a first data position of a to-be-played live broadcast multimedia resource returned by the first super node, wherein the first data position is an initial data position of the client for playing the live broadcast multimedia resource;
the client determines a second data position, wherein the second data position is the position of the data of the live broadcast multimedia resource cached by the first super node at the current moment;
the client determines a third data location between the first data location and the second data location, requests first data of the live multimedia resource between the first data location and the third data location from at least one second super node, and requests second data of the live multimedia resource between the third data location and the second data location from other clients.
2. The method of claim 1, wherein the client determining the second data location comprises:
the client acquires a preset data range, wherein the data range is a data range between the first data position and a position of data cached at the current moment of the live broadcast multimedia resource stored by the first super node;
and the client determines the second data position according to the first data position and the data range.
3. The method of claim 2, wherein the second data location is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block.
4. The method of claim 1, wherein the client determining the third data location between the first data location and the second data location comprises:
the client determines a fourth data location between the first data location and the second data location, the fourth data location being a minimum critical location at which the client requests data of the live multimedia resource from the at least one second super node;
the client determines the third data location between the fourth data location and the second data location.
5. The method of any of claims 1-4, wherein after the client requests first data of the live multimedia asset between the first data location and the third data location from at least one second supernode, the method further comprises:
the client receives first data sent by the at least one second super node;
the client determines that the first data passes through a first set time length after being received, the second data passes through a second set time length after the second data is requested to the other clients, and the second data sent by the other clients are not received;
the client requests the second data from the at least one second super node.
6. A method for sending a data position of a live multimedia resource is characterized by comprising the following steps:
the super node receives a data position request sent by a client;
the super node determines a first data position, wherein the first data position is an initial data position of the client for playing the live multimedia resource;
and the super node sends the first data position to the client.
7. The method of claim 6, wherein the supernode determining the first data location comprises:
the super node acquires a preset data range, wherein the data range is a data range from a starting data position of the live broadcast multimedia resource stored by the super node to a position of data cached at the current moment from a starting data position of the live broadcast multimedia resource played by the client;
the super node determines a fifth data position according to the data range and the position of the data of the live broadcast multimedia resource cached by the super node at the current moment;
and the super node determines a key frame closest to the fifth data position in a plurality of preset key frames, and takes the determined position of the key frame as the first data position, wherein the plurality of key frames are contained in the data of the live broadcast multimedia resource cached by the super node.
8. The method of claim 7, wherein the fifth data location is determined according to the following equation:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node at the current moment.
9. A client, comprising:
a sending unit, configured to send a data location request to a first super node;
a receiving unit, configured to receive a first data position of a to-be-played live broadcast multimedia resource returned by the first super node, where the first data position is an initial data position at which the client plays the live broadcast multimedia resource;
the processing unit is used for determining a second data position, wherein the second data position is a position of the data of the live broadcast multimedia resource cached by the first super node at the current moment; and determining a third data location between the first data location and the second data location; and
requesting first data of the live multimedia asset between the first data location and the third data location from at least one second super node, and requesting second data of the live multimedia asset between the third data location and the second data location from other clients.
10. The client according to claim 9, wherein the processing unit, when determining the second data location, is specifically configured to:
acquiring a preset data range, wherein the data range is the data range between the first data position and the position of the data cached at the current moment of the live broadcast multimedia resource stored by the first super node;
and determining the second data position according to the first data position and the data range.
11. The client of claim 10, wherein the second data location is determined according to the following formula:
the unit of the data range is a byte, the unit of the size of the data block is a byte, and the first data position and the second data position are both position numbers of the data block.
12. The client according to claim 9, wherein the processing unit, when determining the third data location between the first data location and the second data location, is specifically configured to:
determining a fourth data location between the first data location and the second data location, the fourth data location being a critical location of a minimum data range for which the processing unit requests data of the live multimedia resource from the at least one second node;
determining the third data location between the fourth data location and the second data location.
13. The client of any one of claims 9-12,
the receiving unit is further configured to receive first data sent by at least one second super node after the processing unit requests the at least one second super node for the first data of the live multimedia resource between the first data location and the third data location;
the processing unit is further configured to determine that a first set duration elapses after the receiving unit receives the first data, a second set duration elapses after the receiving unit requests the other clients for the second data, and the receiving unit does not receive the second data sent by the other clients; and
requesting the second data from the at least one second supernode.
14. A super node, comprising:
the receiving unit is used for receiving a data position request sent by a client;
the processing unit is used for determining a first data position, wherein the first data position is an initial data position for playing the live multimedia resource by the client;
and the sending unit is used for sending the first data position to the client.
15. The supernode of claim 14, wherein the processing unit, when determining the first data location, is specifically configured to:
acquiring a preset data range, wherein the data range is a data range between a starting data position of the live broadcast multimedia resource, stored by the super node, played by the client and a position of data cached at the current moment;
determining a fifth data position according to the data range and the position of the data of the live multimedia resource cached by the super node at the current moment;
determining a key frame closest to the fifth data position in a plurality of preset key frames, and taking the determined position of the key frame as the first data position, wherein the plurality of key frames are contained in the data of the live multimedia resource cached by the super node.
16. The supernode of claim 15, wherein the fifth data location is determined according to the formula:
the unit of the data range is byte, the unit of the size of the data block is byte, the fifth data position and the sixth data position are both position numbers of the data block, and the sixth data position is a position of the data of the live broadcast multimedia resource cached by the super node at the current moment.
CN201610958022.8A 2016-10-27 2016-10-27 A kind of data request method and device of live multimedia resource Pending CN107995244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610958022.8A CN107995244A (en) 2016-10-27 2016-10-27 A kind of data request method and device of live multimedia resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610958022.8A CN107995244A (en) 2016-10-27 2016-10-27 A kind of data request method and device of live multimedia resource

Publications (1)

Publication Number Publication Date
CN107995244A true CN107995244A (en) 2018-05-04

Family

ID=62028988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610958022.8A Pending CN107995244A (en) 2016-10-27 2016-10-27 A kind of data request method and device of live multimedia resource

Country Status (1)

Country Link
CN (1) CN107995244A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068186A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Customer end node network topological structure method and stream media distributing system
CN101068336A (en) * 2006-08-22 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and device
CN102340522A (en) * 2010-07-15 2012-02-01 腾讯科技(深圳)有限公司 Data transmission method and device
CN102685554A (en) * 2012-05-24 2012-09-19 北京国双科技有限公司 Method and device for processing video play
CN103024076A (en) * 2012-12-31 2013-04-03 乐视网信息技术(北京)股份有限公司 Live telecast scheduling system and live telecast scheduling method applied to peer-to-peer network
CN104735044A (en) * 2014-11-18 2015-06-24 深圳市同洲电子股份有限公司 Streaming media live broadcast method and system
CN104967685A (en) * 2015-06-25 2015-10-07 广东德诚网络科技有限公司 Streaming media multi-level cache network acceleration method based on Flash P2P
US9258341B2 (en) * 2013-04-25 2016-02-09 Hive Streaming Ab Method and device for centralized peer arrangement in P2P overlay networks
CN105656986A (en) * 2015-11-26 2016-06-08 乐视云计算有限公司 Live video play method, device and system
CN105959364A (en) * 2016-04-25 2016-09-21 乐视控股(北京)有限公司 Data transmission method and device based on point to point protocol

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068336A (en) * 2006-08-22 2007-11-07 腾讯科技(深圳)有限公司 Coordinate connection stream media direct broadcasting system and device
CN101068186A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Customer end node network topological structure method and stream media distributing system
CN102340522A (en) * 2010-07-15 2012-02-01 腾讯科技(深圳)有限公司 Data transmission method and device
CN102685554A (en) * 2012-05-24 2012-09-19 北京国双科技有限公司 Method and device for processing video play
CN103024076A (en) * 2012-12-31 2013-04-03 乐视网信息技术(北京)股份有限公司 Live telecast scheduling system and live telecast scheduling method applied to peer-to-peer network
US9258341B2 (en) * 2013-04-25 2016-02-09 Hive Streaming Ab Method and device for centralized peer arrangement in P2P overlay networks
CN104735044A (en) * 2014-11-18 2015-06-24 深圳市同洲电子股份有限公司 Streaming media live broadcast method and system
CN104967685A (en) * 2015-06-25 2015-10-07 广东德诚网络科技有限公司 Streaming media multi-level cache network acceleration method based on Flash P2P
CN105656986A (en) * 2015-11-26 2016-06-08 乐视云计算有限公司 Live video play method, device and system
CN105959364A (en) * 2016-04-25 2016-09-21 乐视控股(北京)有限公司 Data transmission method and device based on point to point protocol

Similar Documents

Publication Publication Date Title
RU2553671C2 (en) Direct streaming between peer-to-peer entities
CN104581374B (en) A kind of method, node and server for obtaining section file and generating sub- m3u8 files
US9204180B2 (en) Method, server and terminal for audio and video on demand
WO2019084972A1 (en) Streaming media live broadcast method and system
CN107277134B (en) Data transmission method and system based on peer-to-peer network
US9392081B2 (en) Method and device for sending requests
CN110703980B (en) File transmission method and device
US20100174806A1 (en) Data Processing Method, Apparatus And System
CN108540868A (en) Processing method, device, server, terminal and the storage medium of HLS live streamings
CN108924609B (en) Streaming media data transmission method, electronic equipment, device and storage medium
US20120096136A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN107920108A (en) A kind of method for pushing of media resource, client and server
JP2020061764A (en) Method and apparatus for bandwidth allocation in network
US20160381127A1 (en) Systems and methods for dynamic networked peer-to-peer content distribution
WO2011138359A1 (en) Content delivery over a peer-to-peer network
CN103905516B (en) The method and respective server and terminal of sharing data
CN116633934A (en) Load balancing method, device, node and storage medium
CN111131843A (en) Network live broadcast system and method
CN103546829A (en) Method and device for processing video service
US20150074234A1 (en) Content system and method for chunk-based content delivery
EP3902279A1 (en) Audio and video stream distribution method in audio and video stream distribution system, and dynamic parent node
WO2016180284A1 (en) Service node allocation method, device, cdn management server and system
KR20130045929A (en) Asynchronous data streaming in a peer-to-peer network
CN107995244A (en) A kind of data request method and device of live multimedia resource
CN112925946B (en) Service data storage method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180504

WD01 Invention patent application deemed withdrawn after publication