WO2015058334A1 - 流媒体资源的管理方法、服务器及客户端 - Google Patents

流媒体资源的管理方法、服务器及客户端 Download PDF

Info

Publication number
WO2015058334A1
WO2015058334A1 PCT/CN2013/085592 CN2013085592W WO2015058334A1 WO 2015058334 A1 WO2015058334 A1 WO 2015058334A1 CN 2013085592 W CN2013085592 W CN 2013085592W WO 2015058334 A1 WO2015058334 A1 WO 2015058334A1
Authority
WO
WIPO (PCT)
Prior art keywords
streaming media
media resource
uri
server
client
Prior art date
Application number
PCT/CN2013/085592
Other languages
English (en)
French (fr)
Inventor
张力学
熊春山
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/085592 priority Critical patent/WO2015058334A1/zh
Priority to CN201380002298.3A priority patent/CN104781807B/zh
Publication of WO2015058334A1 publication Critical patent/WO2015058334A1/zh

Links

Classifications

    • 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
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Definitions

  • the present invention relates to the field of mobile communication technologies, and in particular, to a method, a server, and a client for managing a streaming media resource.
  • the streaming media resources are mainly stored in the local cache, the upper cache, and the original server.
  • the local cache stores only the initial part of the high-hots streaming media resource, and the rest of the high-hots streaming media resource is stored in the upper-layer cache or the original server, and other non-high-hot hotspots are also stored in the upper cache or the original server.
  • Resources When receiving the streaming media resource request message sent by the client, first determining whether the requested streaming media resource segment is the initial part, and if yes, obtaining the requested streaming media resource segment from the local cache, and requesting the streaming media. The resource fragment is sent to the client; if not, the requested streaming resource fragment is obtained from the upper cache or the origin server, and the requested streaming resource fragment is forwarded to the client.
  • the client Since only the initial part of the streaming media resource is stored in the local cache, when the user performs a fast forward or fast rewind operation during the process of viewing the streaming media resource, the client is triggered to send the streaming media in the fast forward position or the fast reverse position.
  • the streaming media resource in the fast forward or rewind position is not the initial part, the streaming media resource needs to be obtained from the upper cache or the original server and returned to the fast forward location or the fast backward location, resulting in the client.
  • the buffering time of the returning streaming media resource is too long, thereby reducing the management efficiency of the streaming media resource, causing the user to wait too long and reduce the user experience.
  • the embodiment of the present invention provides a method, a server, and a client for managing a streaming media resource.
  • the technical solution is as follows:
  • the first aspect provides a method for managing a streaming media resource, where the method includes: receiving a streaming media resource request message sent by a client, where the streaming media resource request message carries a URI of the requested streaming media resource segment ( Uniform Resource Ident if ier , Universal Resource Identifier);
  • streaming media resource segment corresponding to the URI If the streaming media resource segment corresponding to the URI is not queried, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client end.
  • the method before the querying the streaming media resource segment corresponding to the URI in the pre-cached discrete streaming media resource segment, the method further includes: Selecting a preset number of discrete streaming media resource segments from the plurality of streaming media resource segments;
  • the streaming media resource is pre-divided into a plurality of streaming media resource segments.
  • the method further includes:
  • the adjacent streaming media resource When the fragment is sent to the client, the method further includes:
  • the method further includes: acquiring the streaming media resource segment after the adjacent streaming media resource segment from the upper layer cache or the original server, and Forwarding the streaming media resource segment subsequent to the adjacent streaming media resource segment to the client.
  • a server comprising:
  • a receiving module configured to receive a streaming media resource request message sent by the client, where the streaming media resource request message carries a URI of the requested streaming media resource segment;
  • a querying module configured to query, in a locally pre-cached discrete streaming resource segment, a streaming media resource segment corresponding to the URI received by the receiving module;
  • a determining module configured to: when the query module does not query the streaming media resource segment corresponding to the URI, determine a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI;
  • a first sending module configured to send the adjacent streaming media resource segment determined by the determining module to the client.
  • the server further includes:
  • a selection module configured to select a preset number of discrete streaming resource resource segments from the plurality of streaming media resource segments of the streaming media resource;
  • a first storage module configured to sequentially store, in a play time sequence, a preset number of discrete streaming media resource segments selected by the selection module in a local cache;
  • the streaming media resource is pre-divided into a plurality of streaming media resource segments.
  • the server further includes:
  • a second storage module configured to store other streaming media resource fragments of the streaming media resource other than the preset number of discrete streaming media resource segments in an upper layer cache or an original server.
  • the first sending module is further configured to The client sends a streaming media resource segment replacement indication, where the streaming media resource segment replacement indication carries the URI of the adjacent streaming media resource segment.
  • the server further includes:
  • An obtaining module configured to obtain, from the upper layer cache or the original server, a streaming media resource segment after the adjacent streaming media resource segment;
  • a second sending module configured to forward the streaming media resource segment subsequent to the adjacent streaming media resource segment acquired by the acquiring module to the client.
  • the third aspect further provides a method for managing a streaming media resource, where the method includes: sending a streaming media resource request message to a server, where the streaming media resource request message carries a URI of the requested streaming media resource segment, where The URI is used by the server to query a streaming media resource segment corresponding to the URI in a local cache, and if a streaming media resource segment corresponding to the URI is not queried in the local cache, determining a corresponding to the URI And streaming the media resource segment adjacent to the streaming media resource segment, and sending the adjacent streaming media resource segment to the client;
  • the discrete streaming media resource segments are pre-cached in the local cache.
  • the method when the receiving the adjacent streaming media resource segment sent by the server, the method further includes:
  • a client is further provided, where the client includes:
  • a sending module configured to send a streaming media resource request message to the server, where the streaming media resource request message carries a URI of the requested streaming media resource segment, where the URI is used by the server to query the URI in the local cache a streaming media resource segment, if the streaming media resource segment corresponding to the URI is not queried in the local cache, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and Adjacent streaming media resource fragments are sent to the client;
  • a first receiving module configured to receive the adjacent streaming media resource segment sent by the server, where a discrete streaming media resource segment is pre-cached in the local cache.
  • the client further includes:
  • a second receiving module configured to receive a streaming media resource segment replacement indication sent by the server, where the streaming media resource segment replacement indication carries a URI of the adjacent streaming media resource segment.
  • the streaming resource request message carrying the URI of the requested streaming media resource segment After receiving the streaming resource request message carrying the URI of the requested streaming media resource segment, if the streaming media resource segment corresponding to the URI is not queried in the locally pre-cached discrete streaming media resource segment, determining the URI with the URI Corresponding streaming media resource segment adjacent to the streaming media resource segment, and sending the adjacent streaming media resource segment to the client, since the required streaming media resource segment is not required to be obtained from the upper layer cache or the original server, thereby shortening the delivery to the client
  • the buffer time of the streaming media resource is returned.
  • the management efficiency of streaming media resources has been increased, and the waiting time of users has been reduced, thereby improving user experience.
  • FIG. 1 is a flowchart of a method for managing streaming media resources according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for managing streaming media resources according to another embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a second type of streaming media resource according to another embodiment of the present invention
  • FIG. 5 is a schematic diagram of a third type of streaming media resource according to another embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a server according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another server according to another embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of still another server according to another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of still another server according to another embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a device for managing a streaming media resource according to another embodiment of the present invention.
  • FIG. 11 is a flowchart of a method for managing a streaming media resource according to another embodiment of the present invention
  • FIG. 12 is a flowchart of a method for managing a streaming media resource according to another embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of another client according to another embodiment of the present invention.
  • FIG. 15 is a schematic structural diagram of a device for managing a streaming media resource according to another embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some implementations of the present invention. For example, other drawings may be obtained from those skilled in the art without any inventive labor.
  • the embodiment of the present invention provides a method for managing a streaming media resource, which can be applied to a mobile communication system such as LTE (Long Term Evolution), UMTS (Universal Mobi Telecom Antenna t ions System) .
  • LTE Long Term Evolution
  • UMTS Universal Mobi Telecom Antenna t ions System
  • the LTE system can provide downlink 100 Mbit/s and uplink 50 Mbit/s transmission speeds at a spectrum bandwidth of 20 MHz.
  • the E-UTRAN (Evolved Universa l Terres ia l Radio Acces s Network) in the LTE system is directly connected to the client, is close to the client, and the local cache can be located therein, or Independent network elements are set separately, but the interface between the network element and other network elements needs to be defined.
  • the PDN (Packet Data Network) gateway communicates with E-UTRAN through the service gateway, which is far away from the client and cached by the upper layer. It can be located in it or as a separate NE. However, you need to define the interface between the NE and other NEs.
  • the original server can be connected to the PDN gateway, which can segment the streaming media resources and assign URIs to the segmented respective streaming media resource segments. With this system, users on the client side can order video or audio streaming resources to view what they want to watch.
  • URI can be a unified identifier of the resource location, ?
  • URL Uniform Resource Locator
  • URN Uniform Resource Name
  • the method before querying the streaming media resource segment corresponding to the URI in the locally pre-cached discrete streaming resource segment, the method further includes:
  • the preset number of discrete streaming media resource segments are sequentially stored in the local cache according to the playing time sequence
  • the streaming media resource is pre-divided into a plurality of streaming media resource segments.
  • a preset number of discrete streaming media resource segments are sequentially stored in order of playing time After being stored in the local cache, the method further includes:
  • the other pieces of streaming media resources of the streaming media resource other than the preset number of discrete streaming media resource segments are stored in the upper layer cache or the original server.
  • the streaming media resource segment corresponding to the URI is not queried, determine a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and send the adjacent streaming media resource segment to the client.
  • the streaming media resource segment corresponding to the URI is queried, the streaming media resource segment corresponding to the URI is directly sent to the client.
  • the method further includes: sending a streaming media resource segment replacement indication to the client, where the streaming media resource segment replacement indication carries the adjacent streaming media resource segment URI.
  • the method further includes: acquiring the streaming media resource segment after the adjacent streaming media resource segment from the upper layer cache or the original server, and using the adjacent streaming media The stream resource segment after the resource fragment is forwarded to the client.
  • the method provided in this embodiment after receiving the streaming resource request message carrying the URI of the requested streaming media resource segment, if the streaming media resource segment corresponding to the URI is not queried in the locally pre-cached discrete streaming media resource segment And determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the obtained streaming media resource segment does not need to be obtained from the upper layer cache or the original server. Therefore, the buffering time for returning streaming media resources to the client is shortened, the management efficiency of the streaming media resource is improved, the waiting time of the user is reduced, and the user experience is improved, and the streaming media resource is stored when the streaming media resource is stored.
  • Another embodiment of the present invention provides a method for managing a streaming media resource.
  • the method for managing the streaming media resource provided by the embodiment of the present invention is explained in detail by using the server as an example. . Referring to FIG. 2, the method process provided by this embodiment includes:
  • 201 Select a preset number of discrete streaming media resource segments from the plurality of streaming media resource segments of the streaming media resource, and sequentially store the preset number of discrete streaming media resource segments in the local cache according to the playing time sequence, and Presetting a plurality of discrete streaming media resource segments other than the streaming media resource
  • the other streaming media resource segment is stored in the upper layer cache or the original server; wherein the streaming media resource is pre-divided into a plurality of streaming media resource segments;
  • streaming media resources include, but are not limited to, video streaming media resources and audio streaming media resources.
  • the original server will segment the streaming media resource into multiple streaming media resource segments in advance.
  • the streaming media resources may be segmented according to the same length, that is, the streaming media resources are divided into a plurality of segments of the same length of the streaming media resources; in addition, the unequal length may also be used.
  • the streaming media resource is segmented, that is, the streaming media resource is divided into a plurality of streaming media resource segments of unequal length.
  • the number of obtained streaming media resource segments can be 10 segments or 15 segments, or more.
  • the method for segmenting the streaming media resources and the number of the obtained streaming media resource segments are determined by the length of the streaming media resources, which is not specifically limited in this embodiment.
  • the streaming media resource For example, if the length of a certain streaming media resource is 2 minutes and 30 seconds, if the streaming media resource is segmented, if it is divided into 10 segments according to the same length, 10 segments each having a length of 15 seconds are obtained. Streaming media resource segment; if it is divided into 15 segments in an equal length manner, 15 streaming media resource segments each having a length of 10 seconds are obtained.
  • the streaming media resource may be segmented according to the unequal length. If the segment is divided into 10 segments according to the unequal length, the length of the first 5 streaming media resource segments may be divided into 10 seconds. The length of the last 5 streaming media resource segments is divided into 20 seconds.
  • the length of the first 5 streaming media resource segments can be divided into 7 seconds, and the middle 5 streaming media The length of the resource segment is divided into 11 seconds, and the length of the last 5 streaming media resource segments is divided into 12 seconds.
  • the original server further allocates corresponding URIs for each streaming media resource segment of the streaming media resource in advance.
  • the URI may be a URN (Uniform Resource Name) or a Uniform Resource Locator (Uniform Resource Locator). This embodiment does not specifically limit this, and only needs to be guaranteed to be a different streaming resource. Fragments are assigned different URIs through which different streaming media resource fragments can be distinguished.
  • the size of the preset number may be specifically 5.
  • the size of the preset number may be other than the value of 5, and may be other values, for example, 8 or 9.
  • the preset number is not specified. limited.
  • a preset number of discrete streaming media resource segments may be selected from all the streaming media resource segments in an equally spaced manner, or may be A predetermined number of discrete streaming media resource segments are randomly selected from all streaming media resource segments in an equally spaced manner.
  • a preset number of discrete streaming media resource segments are selected, and the selected preset number of discrete streaming media resource segments are sequentially stored in the local cache according to the playing time sequence; of course, for the purpose of quickly obtaining the streaming media resource segment, Other streaming media resource segments of the streaming media resource other than the preset number of streaming media resource segments are also stored in the local cache.
  • other streaming media resource segments of the streaming media resource other than the preset number of streaming media resource segments need to be stored in the upper cache or the original server.
  • the streaming media resources other than the preset number of discrete streaming media resource segments may be used. All other streaming media resource segments are stored in the upper layer cache or the original server; a part of other streaming media resource segments of the streaming media resource other than the preset number of discrete streaming media resource segments may also be stored in the upper layer cache. , while other parts are stored in the original server.
  • the method for storing the other streaming media resource segments of the streaming media resource other than the preset number of the discrete streaming media resource segments is not specifically limited in this embodiment.
  • the duration of the streaming media resource in FIG. 3 is 60 seconds, and the streaming media resource is divided into 10 segments, and the duration of each streaming media resource segment is 6 seconds. If each of the streaming media resource segments is identified by the symbol a-al O, the start time and the end time of the streaming media resource segment a are 00: 00-00: 06, and the start time and the end time of the streaming media resource segment a2. For 00: 06-00: 12, the start time and end time of the streaming resource segment a3 is 00: 12-00: 18; and so on, the start time and end time of the streaming resource segment a0 are 00: 54-00: 60.
  • the streaming media resource segment a1 when selecting 5 discrete streaming media resource segments, the streaming media resource segment a1, the streaming media resource segment a3, the streaming media resource segment a5, the streaming media resource segment a7, and the stream may be sequentially selected.
  • the media resource segment a9 is selected according to the manner shown in FIG. 4; after the selection, the above five streaming media resource segments are sequentially stored in the local cache, and the streaming media resource segment a2, the streaming media resource segment a4, and the streaming media are The resource segment a6, the streaming media resource segment a8, and the streaming media resource segment a1 are stored in the upper layer cache.
  • the streaming media resource segment a1, the streaming media resource segment a2, the streaming media resource segment a3, the streaming media resource segment a7, and the streaming media resource segment a9 may be sequentially selected, that is, selected according to the manner shown in FIG. 5;
  • the five streaming media resource segments are sequentially stored in the local cache, and the streaming media resource segment a4, the streaming media resource segment a5, the streaming media resource segment a6, the streaming media resource segment a8, and the streaming media resource segment al 0 are stored in the upper cache.
  • the streaming media resource segment a4, the streaming media resource segment a5, and the streaming media can also be used.
  • Part or all of the volume resource segment a6, the streaming media resource segment a8, and the streaming media resource segment aal0 are stored in the origin server.
  • the streaming media resource segment a4 the streaming media resource segment a5, the streaming media resource segment a6, the streaming media resource segment a8, and the streaming media resource segment a0 are all stored in the upper layer cache as an example.
  • other methods for selecting and storing the streaming media resource segment may be adopted, which is not specifically limited in this embodiment.
  • each streaming media resource segment of the streaming media resource may be separately stored in a local cache, an upper cache, or an original server in a discrete manner, thereby balancing the local cache, the upper cache, or the original server storage.
  • the amount of resources that increase the speed of streaming resource fragments for subsequent lookup requests may be directly executed. If and only if the selection and storage mode of the streaming media resource segment is changed, the above step 201 needs to be performed again.
  • the corresponding processing may be performed on the streaming media resource request message sent by the subsequent client. For details, refer to the following steps 202 to 205.
  • a TCP/IP (Transfer Protocol Protocol) connection is established with the client through the three-way handshake mechanism.
  • HTTP Hypertext Transfer Protocol
  • the client may also send the client based on the FTP (File Transfer Protocol) and the RTSP (Rea l Time Streaming Protocol).
  • the streaming resource request message is not specifically limited in this embodiment.
  • the POP resource request message carries the URI of the requested streaming media resource segment, and may carry other messages, for example, the time when the streaming media resource request message is sent, and the content carried in the streaming media resource request message in this embodiment. The same is not specifically limited.
  • step 203 multiple streams of streaming media resources have been provided in the manner provided by step 203 above.
  • the media resource fragments are stored in the local cache, the upper cache, or the origin server, respectively. Therefore, after receiving the URI of the requested streaming media resource segment, the streaming media resource segment corresponding to the URI is first queried in a local cache that is closer to the client.
  • the streaming media resource segment a5 is stored in the local cache, and the streaming media resource segment a5 is used as the queried streaming media resource segment; If the URI of the requested streaming media resource segment is a6, since the streaming media resource segment a6 is not stored in the local cache, the requested streaming media resource is not queried locally.
  • the stream resource segment replacement indication carries the URI of the adjacent streaming media resource segment
  • the streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI may be determined, and the adjacent streaming media resource segment is sent to the client.
  • the streaming media resource segment adjacent to the requested streaming media resource segment is not far apart from the requested streaming media resource segment, the content of the two does not have a large jump, so the streaming media with the request The segment of the streaming media resource adjacent to the resource segment is sent to the client, and does not have a large impact on the viewing of the client side user.
  • the user When the user triggers the sending of the streaming resource request message on the client, it may only be for the purpose of browsing the streaming media resource to determine whether it has a viewing value; therefore, the requested streaming media resource segment is replaced with the requested stream.
  • the streaming resource resource fragments adjacent to the media resource segment are sent to the client without affecting the user's viewing experience.
  • the left adjacent streaming media resource segment on the time axis and the right adjacent to the streaming media resource segment corresponding to the URI may be adjacent.
  • Any one of the streaming media resource segments is determined to be a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and is specifically determined to be a specific one, which is not limited in this embodiment, and may be determined by the case.
  • the closest possible streaming segment in time can be selected.
  • the streaming media resource segment a6 is not stored in the local cache. Therefore, in order not to affect the smoothness of the streaming media resource played by the client, A streaming media resource segment adjacent to the streaming media resource segment a6 is determined. As can be seen from FIG. 4, if the URI of the requested streaming media resource segment is a6, the streaming media resource segment a6 is not stored in the local cache. Therefore, in order not to affect the smoothness of the streaming media resource played by the client, A streaming media resource segment adjacent to the streaming media resource segment a6 is determined. As can be seen from FIG.
  • the left adjacent streaming media resource segment of the streaming media resource segment a 6 is a streaming media resource segment a5
  • the right adjacent stream Property fragment is a fragment streaming source a7, to determine the flow properties of the flow segments a7 property a6 adjacent segments of streaming source fragments, for example, since the clip stream property fragment streaming source and request a 6 a7 Only 6 seconds apart in time, the content of the two does not have a large jump, so the streaming resource segment a7 is sent to the client, which does not have a large impact on the viewing of the client side user.
  • the user may only determine whether the viewing resource value is viewed for the purpose of browsing the streaming media resource; therefore, the streaming media resource segment a6 is replaced with the streaming media resource segment a7.
  • Sending to the client does not affect the user's viewing experience.
  • the URI of the streaming resource segment a7 is included in the indication.
  • the content of the streaming media resource segment replacement indication may include other URIs, for example, the generation time of the streaming media resource segment replacement indication, which is carried in the streaming media resource replacement indication.
  • the content is not specifically limited.
  • the streaming media resource after the adjacent streaming media resource segment needs to be obtained from the upper layer cache or the original server.
  • Fragment; after acquiring the streaming media resource segment after the adjacent streaming media resource segment, the contiguous streaming media resource segment may be obtained from the upper cache according to the URI of the streaming media resource segment after the adjacent streaming media resource segment Streaming the media resource segment, and forwarding the segment of the streaming media resource subsequent to the adjacent streaming media resource segment to the client.
  • the client can perform the streaming resource segment a7. Play.
  • the streaming media resource segment a9 is stored in the local cache in the streaming media resource segment after the streaming media resource segment a7, and the streaming media resource segment a8 and the streaming media resource segment a0 are stored in the upper layer cache. Therefore, in order for the client to smoothly play the streaming media resource segment after the streaming media resource segment a7, the streaming media resource segment may be obtained from the upper layer cache according to the URI of the streaming media resource segment a8 and the URI of the streaming media resource segment aal0.
  • A8 and the streaming media resource segment a0 forward the streaming media resource segment a 8 and the streaming media resource segment a0 to the client, so as to ensure the smoothness of the client to play the streaming media resource.
  • the method provided in this embodiment after receiving the streaming resource request message carrying the URI of the requested streaming media resource segment, if the streaming media resource segment corresponding to the URI is not queried in the locally pre-cached discrete streaming media resource segment And determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the obtained streaming media resource segment does not need to be obtained from the upper layer cache or the original server.
  • the buffering time for returning streaming media resources to the client is shortened, the management efficiency of the streaming media resource is improved, the waiting time of the user is reduced, and the user experience is improved, and the streaming media resource is stored when the streaming media resource is stored.
  • Another embodiment of the present invention provides a server for performing the method provided by the foregoing two embodiments. Referring to FIG. 6, the server includes:
  • the receiving module 601 is configured to receive a streaming media resource request message sent by the client, where the streaming media resource request message carries the URI of the requested streaming media resource segment;
  • the querying module 602 is configured to query the streaming media resource segment corresponding to the URI received by the receiving module 601 in the locally pre-cached discrete streaming resource segment;
  • the determining module 603 is configured to: when the query module 602 does not query the streaming media resource segment corresponding to the URI, determine a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI;
  • the first sending module 604 is configured to send the adjacent streaming media resource segment determined by the determining module 603 to the client.
  • the server further includes:
  • the selecting module 605 is configured to select a preset number of discrete streaming media resource segments from the plurality of streaming media resource segments of the streaming media resource;
  • the first storage module 606 is configured to sequentially store the preset number of discrete streaming resource segments selected by the selection module 605 in the local cache according to the play time sequence;
  • the streaming media resource is pre-divided into a plurality of streaming media resource segments.
  • the server further includes:
  • the second storage module 607 is configured to store other streaming media resource fragments of the streaming media resource other than the preset number of discrete streaming media resource segments in the upper layer cache or the original server.
  • the first sending module 604 is further configured to send a streaming media resource segment replacement to the client.
  • the URI of the adjacent streaming media resource segment is carried in the streaming media resource segment replacement indication.
  • the server further includes:
  • the obtaining module 608 is configured to obtain a streaming resource segment after the adjacent streaming media segment from the upper cache or the original server;
  • the second sending module 609 is configured to forward the segment of the streaming media resource after the obtained streaming media resource segment acquired by the obtaining module 608 to the client.
  • the server After receiving the streaming resource request message carrying the URI of the requested streaming media resource segment, the server provided by the embodiment does not query the streaming resource resource segment corresponding to the URI in the locally pre-cached discrete streaming resource segment. And determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the obtained streaming media resource segment does not need to be obtained from the upper layer cache or the original server. Therefore, the buffering time for returning streaming media resources to the client is shortened, the management efficiency of the streaming media resource is improved, the waiting time of the user is reduced, and the user experience is improved, and the streaming media resource is stored when the streaming media resource is stored.
  • the device includes at least one processor 701, such as a CPU, at least one network interface 704 or other user interface 703, and a memory 705. And at least one communication bus 702. Communication bus 702 is used to implement connection communication between these devices.
  • User interface 703 can be a display, a keyboard or a pointing device.
  • the memory 705 may include a high speed Ram memory, and may also include a non-volatile memory, such as at least one disk memory.
  • the processor 701 is configured to execute the program stored in the memory 705, to implement the following method: receiving a streaming media resource request message sent by the client, where the streaming media resource request message carries the URI of the requested streaming media resource segment;
  • the processor 701 is specifically configured to select a preset number of discrete streaming media resource segments from the plurality of streaming media resource segments of the streaming media resource;
  • the preset number of discrete streaming media resource segments are sequentially stored in the local cache according to the play time sequence; wherein the streaming media resources are previously divided into multiple streaming media resource segments.
  • the processor 701 is configured to store, in the upper layer cache or the original server, other streaming media resource fragments of the streaming media resource other than the preset number of discrete streaming media resource segments.
  • the processor 701 is specifically configured to send a streaming media resource segment replacement indication to the client, where the streaming media resource segment replacement indication carries a URI of the adjacent streaming media resource segment.
  • the processor 701 is specifically configured to acquire, from the upper layer cache or the original server, the streaming media resource segment after the adjacent streaming media resource segment, and the flow after the adjacent streaming media resource segment The media resource segment is forwarded to the client.
  • memory 705 stores the following elements, modules or data structures, or a subset thereof, or their extension set:
  • Operating system 707 which contains various programs for implementing various basic services and handling hardware-based tasks
  • the application module 707 includes a receiving module 601, a query module 602, a determining module 603, a first sending module 604, a selecting module 605, a first storage module 606, a second storage module 607, an obtaining module 608, and a second sending module 609.
  • the device of the present embodiment After receiving the streaming media resource request message carrying the URI of the requested streaming media resource segment, the device of the present embodiment does not query the streaming media resource segment corresponding to the URI in the locally pre-cached discrete streaming media resource segment. And determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the obtained streaming media resource segment does not need to be obtained from the upper layer cache or the original server. Therefore, the buffering time for returning streaming media resources to the client is shortened, the management efficiency of the streaming media resource is improved, the waiting time of the user is reduced, and the user experience is improved, and the streaming media resource is stored when the streaming media resource is stored.
  • Another embodiment of the present invention provides a method for managing a streaming media resource.
  • the method for managing a streaming media resource provided by the embodiment of the present invention is explained by taking a client as an example. Referring to FIG. 11, the method process provided by this embodiment includes:
  • the streaming media resource request message carries a URI of the requested streaming media resource segment, where the URI is used by the server to query the streaming media resource segment corresponding to the URI in the local cache, if locally cached
  • the streaming media resource segment corresponding to the URI is not queried, and the streaming media resource segment adjacent to the URI corresponding to the URI is determined, and the adjacent streaming media resource segment is sent to the client; wherein, the local cache is pre- Caching discrete streaming media resource fragments;
  • 1102 Receive an adjacent stream media resource segment sent by the server.
  • the method further includes: receiving a streaming media resource segment replacement indication sent by the server, where the streaming media resource segment replacement indication carries the URI of the adjacent streaming media resource segment .
  • the server receives the streaming resource request message and does not query the locally pre-cached discrete streaming resource segment according to the streaming resource request message. Determining a streaming media resource segment corresponding to the URI, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the server does not need to cache from the upper layer or the original.
  • the server obtains the requested streaming media resource segment, thereby shortening the buffering time for returning the streaming media resource to the client, improving the management efficiency of the streaming media resource, reducing the waiting time of the user, and improving the user experience.
  • Another embodiment of the present invention provides a method for managing a streaming media resource. The method for managing the streaming media resource provided in this embodiment is explained in detail by taking the client as an example. Description. Referring to FIG. 12, the method process provided by this embodiment includes:
  • the streaming media resource request message carries a URI of the requested streaming media resource segment, where the URI is used by the server to query the streaming media resource segment corresponding to the URI in the local cache, if locally cached
  • the streaming media resource segment corresponding to the URI is not queried, and the streaming media resource segment adjacent to the URI corresponding to the URI is determined, and the adjacent streaming media resource segment is sent to the client; wherein, the local cache is pre- Caching discrete streaming media resource fragments;
  • a TCP/IP connection needs to be established with the server through a three-way handshake mechanism. After establishing a TCP/IP connection with the server, the streaming resource request can be sent to the server based on HTTP. Message.
  • the sending of the streaming media resource request message to the server based on the HTTP may be performed, and the streaming media resource request message may be sent to the server based on the FTP and the RTSP, which is not specifically limited in this embodiment.
  • the POP resource request message carries the URI of the requested streaming media resource segment, and may carry other messages, for example, the time when the streaming media resource request message is sent, and the content carried in the streaming media resource request message in this embodiment. The same is not specifically limited.
  • the adjacent streaming media resource segment and the streaming media resource segment replacement indication may be stored.
  • the type of the storage medium may be other types of storage media, such as a cache or a hard disk.
  • the type of the storage medium is not specifically limited in this embodiment.
  • the adjacent streaming media resource segments are not separated from the requested streaming media resource segments in time, the content of the two streams does not have a large jump, so the adjacent streams are received and played to the user.
  • Media resource snippets do not have a major impact on user viewing.
  • the user triggers the sending of the streaming resource request message on the client, it may only be for the purpose of browsing the streaming media resource to determine whether it has a viewing value; therefore, the requested streaming media resource segment is replaced with the requested stream.
  • the streaming resource segment adjacent to the media resource segment does not affect the user's viewing experience. And receiving the streaming media resource replacement indication that includes the adjacent streaming media resource fragment URI, to notify the user that the requested streaming media resource has been replaced, thereby effectively implementing Manage streaming media resources.
  • the content in addition to the URI of the adjacent streaming media resource segment, the content may also include other content, for example, the generation time of the streaming media resource segment replacement indication, and the streaming media resource replacement in this embodiment.
  • the content carried in the instructions is not specifically limited.
  • the server receives the streaming resource request message and does not query the locally pre-cached discrete streaming resource segment according to the streaming resource request message.
  • the streaming media resource segment corresponding to the URI determines a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and the adjacent streaming media resource slice
  • the segment is sent to the client, because the server does not need to obtain the requested streaming resource segment from the upper cache or the original server, thereby shortening the buffering time for returning the streaming media resource to the client, improving the management efficiency of the streaming media resource, and reducing the efficiency.
  • the user's waiting time which in turn improves the user experience.
  • Another embodiment of the present invention provides a client for performing the method provided by the foregoing two adjacent embodiments. Referring to FIG. 13, the client includes:
  • the sending module 1301 is configured to send a streaming media resource request message to the server, where the streaming media resource request message carries a URI of the requested streaming media resource segment, where the URI is used by the server to query the streaming media resource segment corresponding to the URI in the local cache. If the streaming media resource segment corresponding to the URI is not queried in the local cache, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client;
  • the first receiving module 1302 is configured to receive a neighboring streaming media resource segment sent by the server, where the discrete streaming media resource segment is pre-cached in the local cache.
  • the client further includes:
  • the second receiving module 1303 is configured to receive a streaming media resource segment replacement indication sent by the server, where the streaming media resource segment replacement indication carries a URI of the adjacent streaming media resource segment.
  • the client after receiving the streaming media resource request message to the server, the server receives the streaming media resource request message and does not locally cache the discrete streaming media resource segment according to the streaming media resource request message. Querying the streaming media resource segment corresponding to the URI, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the server does not need to cache from the upper layer or The original server obtains the requested streaming media resource segment, thereby shortening the buffering time for returning the streaming media resource to the client, improving the management efficiency of the streaming media resource, reducing the waiting time of the user, and improving the user experience.
  • the device includes at least one processor 701, such as a CPU, at least one network interface 704 or other user interface 703, and a memory 705. And at least one communication bus 702. Communication bus 702 is used to implement connection communication between these devices.
  • User interface 703 can be a display, a keyboard or a pointing device.
  • the memory 705 may include a high speed Ram memory, and may also include a non-volatile memory, such as at least one disk memory.
  • the processor 701 is configured to execute a program stored in the memory 705 to implement the following method: Sending a streaming media resource request message, where the streaming media resource request message carries a URI of the requested streaming media resource segment, where the URI is used by the server to query the streaming media resource segment corresponding to the URI in the local cache, if Determining, in the local cache, the streaming media resource segment corresponding to the URI, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to The client;
  • the discrete streaming media resource segments are pre-cached in the local cache.
  • the processor 701 is specifically configured to receive a streaming media resource segment replacement indication sent by the server, where the streaming media resource segment replacement indication carries a URI of the adjacent streaming media resource segment.
  • memory 705 stores the following elements, modules or data structures, or a subset thereof, or their extension set:
  • Operating system 707 which contains various programs for implementing various basic services and handling hardware-based tasks
  • the application module 707 includes a sending module 1301, a first receiving module 1302, and a second receiving module 1303.
  • the server After the device sends the streaming media resource request message to the server, the server receives the streaming media resource request message and does not query the locally pre-cached discrete streaming media resource segment according to the streaming media resource request message. Determining a streaming media resource segment corresponding to the URI, determining a streaming media resource segment adjacent to the streaming media resource segment corresponding to the URI, and sending the adjacent streaming media resource segment to the client, because the server does not need to cache from the upper layer or the original The server obtains the requested streaming media resource segment, thereby shortening the buffering time for returning the streaming media resource to the client, improving the management efficiency of the streaming media resource, reducing the waiting time of the user, and improving the user experience.
  • the server, the client, and the device provided by the foregoing embodiments are only illustrated by the foregoing division of each functional module when managing the streaming media resource. In actual applications, the foregoing functions may be allocated differently according to requirements.
  • the function module is completed, that is, the internal structure of the server, the client and the device are divided into different functional modules to complete all or part of the functions described above.
  • the server, the client, and the device provided by the foregoing embodiment are in the same concept as the method for managing the streaming media resource. For the specific implementation process, refer to the method embodiment, and details are not described herein again.
  • the serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

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

Abstract

本发明实施例提供了一种流媒体资源的管理方法、服务器及客户端,涉及移动通信技术领域,方法包括:接收客户端发送的流媒体资源请求消息,流媒体资源请求消息中携带了请求的流媒体资源片段的URI;在本地预先緩存的离散的流媒体资源片段中查询URI对应的流媒体资源片段;如果未查询到URI对应的流媒体资源片段,则确定与URI对应的流媒体资源片段相邻的流媒体资源片段,并将相邻的流媒体资源片段发送给客户端。本发明在接收到携带请求的流媒体资源片段的URI的流媒体资源请求消息后,若未查询到URI对应的流媒体资源片段,则将与URI对应的流媒体资源片段相邻的流媒体资源片段发送给客户端,从而缩短了返回流媒体资源的緩冲时间,提升了流媒体资源的管理效率。

Description

流媒体资源的管理方法、 服务器及客户端
技术领域
本发明涉及移动通信技术领域, 特别涉及一种流媒体资源的管理方法、 服 务器及客户端。
背景技术
随着移动通信技术的日益发展,传统的移动网络业务已从语音业务主导逐 步迁移为数据业务主导。 移动流媒体业务、 网页浏览业务、 实时游戏业务等数 据业务在人群中迅速普及, 其中移动流媒体业务更是受到广大用户的青睐。 而 由于当前移动通信网的网络带宽共享且有限, 无线环境不稳定、 波动较为厉害 等因素的影响, 在移动通信网上部署流媒体业务并非易事。 为了降低网络带宽 及无线环境波动等因素对用户观看流媒体产生的影响, 如何管理流媒体资源, 以提升用户的流媒体业务体验, 成为了移动网络开发过程中一个亟待解决的问 题。
现有技术在管理流媒体资源时, 主要将流媒体资源存储在本地緩存、 上层 緩存及原始服务器中。其中,本地緩存中仅存储高热点流媒体资源的起始部分, 高热点流媒体资源的其余部分存储在上层緩存或原始服务器中, 且上层緩存或 原始服务器中还存储了其他非高热点流媒体资源。 当接收到客户端发送的流媒 体资源请求消息时, 先确定请求的流媒体资源片段是否为起始部分, 如果是, 则从本地緩存中获取请求的流媒体资源片段, 并将请求的流媒体资源片段发送 给客户端; 如果不是, 则从上层緩存或原始服务器中获取请求的流媒体资源片 段, 并将请求的流媒体资源片段转发给客户端。
由于本地緩存中仅存储流媒体资源的起始部分, 因此, 当用户在观看流媒 体资源的过程中执行了快进或快退等动作, 触发客户端发送快进位置或快退位 置的流媒体资源请求消息时,如果快进位置或快退位置的流媒体资源并不是起 始部分, 则需要从上层緩存或原始服务器中获取并返回快进位置或快退位置的 流媒体资源, 导致向客户端返回流媒体资源的緩冲时间过长, 从而降低了流媒 体资源的管理效率, 致使用户等待时间过长, 降低用户体验度。 发明内容
为了解决现有技术中存在的用户体验度低的问题, 本发明实施例提供了一 种流媒体资源的管理方法、 服务器及客户端。 所述技术方案如下:
第一方面, 提供了一种流媒体资源的管理方法, 所述方法包括: 接收客户端发送的流媒体资源请求消息 , 所述流媒体资源请求消息中携带 了请求的流媒体资源片段的 URI ( Uniform Resource Ident if ier , 通用资源标 识符);
在本地预先緩存的离散的流媒体资源片段中查询所述 URI对应的流媒体资 源片段;
如果未查询到所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的 流媒体资源片段相邻的流媒体资源片段, 并将所述相邻的流媒体资源片段发送 给所述客户端。
在第一方面的第一种可能的实现方式中, 所述在本地预先緩存的离散的流 媒体资源片段中查询所述 URI对应的流媒体资源片段之前, 所述方法还包括: 从流媒体资源的多个流媒体资源片段中选择预设数目个离散的流媒体资 源片段;
按照播放时间顺序将所述预设数目个离散的流媒体资源片段依次存储在 本地緩存中;
其中 , 所述流媒体资源预先被分为多个流媒体资源片段。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所 述按照播放时间顺序将所述预设数目个离散的流媒体资源片段依次存储在本 地緩存中之后, 所述方法还包括:
将所述预设数目个离散的流媒体资源片段之外的所述流媒体资源的其他 流媒体资源片段存储在上层緩存或原始服务器中。
结合第一方面或第一方面的第一种可能的实现方式或第一方面的第二种 可能的实现方式, 在第三种可能的实现方式中, 所述将所述相邻的流媒体资源 片段发送给所述客户端时, 所述方法还包括:
向所述客户端发送流媒体资源片段替换指示, 所述流媒体资源片段替换指 示中携带了所述相邻的流媒体资源片段的 URI。
结合第一方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所 述向所述客户端发送流媒体资源片段替换指示之后, 所述方法还包括: 从所述上层緩存或所述原始服务器中获取所述相邻的流媒体资源片段之 后的流媒体资源片段, 并将所述相邻的流媒体资源片段之后的流媒体资源片段 转发给所述客户端。
第二方面, 提供了一种服务器, 所述服务器包括:
接收模块, 用于接收客户端发送的流媒体资源请求消息, 所述流媒体资源 请求消息中携带了请求的流媒体资源片段的 URI;
查询模块, 用于在本地预先緩存的离散的流媒体资源片段中查询所述接收 模块接收到的 URI对应的流媒体资源片段;
确定模块, 用于当所述查询模块未查询到所述 URI对应的流媒体资源片段 时, 确定与所述 URI对应的流媒体资源片段相邻的流媒体资源片段;
第一发送模块, 用于将所述确定模块确定的相邻的流媒体资源片段发送给 所述客户端。
在第二方面的第一种可能的实现方式中, 所述服务器还包括:
选择模块, 用于从流媒体资源的多个流媒体资源片段中选择预设数目个离 散的流媒体资源片段;
第一存储模块, 用于按照播放时间顺序将所述选择模块选择的预设数目个 离散的流媒体资源片段依次存储在本地緩存中;
其中 , 所述流媒体资源预先被分为多个流媒体资源片段。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所 述服务器还包括:
第二存储模块 , 用于将所述预设数目个离散的流媒体资源片段之外的所述 流媒体资源的其他流媒体资源片段存储在上层緩存或原始服务器中。
结合第二方面或第二方面的第一种可能的实现方式或第二方面的第二种 可能的实现方式, 在第三种可能的实现方式中, 所述第一发送模块, 还用于向 所述客户端发送流媒体资源片段替换指示, 所述流媒体资源片段替换指示中携 带了所述相邻的流媒体资源片段的 URI。
结合第二方面的第三种可能的实现方式, 在第四种可能的实现方式中, 所 述服务器还包括:
获取模块, 用于从所述上层緩存或所述原始服务器中获取所述相邻的流媒 体资源片段之后的流媒体资源片段; 第二发送模块, 用于将所述获取模块获取的相邻的流媒体资源片段之后的 流媒体资源片段转发给所述客户端。
第三方面, 还提供了一种流媒体资源的管理方法, 所述方法包括: 向服务器发送流媒体资源请求消息 , 所述流媒体资源请求消息中携带了请 求的流媒体资源片段的 URI , 所述 URI用于所述服务器在本地緩存中查询所述 URI对应的流媒体资源片段, 如果在所述本地緩存中未查询到所述 URI对应的 流媒体资源片段, 则确定与所述 URI对应的流媒体资源片段相邻的流媒体资源 片段, 并将所述相邻的流媒体资源片段发送给客户端;
接收所述服务器发送的所述相邻的流媒体资源片段;
其中 , 所述本地緩存中预先緩存了离散的流媒体资源片段。
在第三方面的第一种可能的实现方式中, 所述接收所述服务器发送的所述 相邻的流媒体资源片段时, 所述方法还包括:
接收所述服务器发送的流媒体资源片段替换指示, 所述流媒体资源片段替 换指示中携带了所述相邻的流媒体资源片段的 UR I。
第四方面, 还提供了一种客户端, 所述客户端包括:
发送模块, 用于向服务器发送流媒体资源请求消息, 所述流媒体资源请求 消息中携带了请求的流媒体资源片段的 URI , 所述 URI用于所述服务器在本地 緩存中查询所述 URI对应的流媒体资源片段, 如果在所述本地緩存中未查询到 所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的流媒体资源片段相 邻的流媒体资源片段, 并将所述相邻的流媒体资源片段发送给客户端;
第一接收模块, 用于接收所述服务器发送的所述相邻的流媒体资源片段; 其中 , 所述本地緩存中预先緩存了离散的流媒体资源片段。
在第四方面的第一种可能的实现方式中, 所述客户端还包括:
第二接收模块, 用于接收所述服务器发送的流媒体资源片段替换指示, 所 述流媒体资源片段替换指示中携带了所述相邻的流媒体资源片段的 URI。
本发明实施例提供的技术方案的有益效果是:
在接收到携带请求的流媒体资源片段的 URI的流媒体资源请求消息后, 若 在本地预先緩存的离散的流媒体资源片段中未查询到该 URI对应的流媒体资源 片段, 则确定与该 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相 邻的流媒体资源片段发送给客户端, 由于无需从上层緩存或原始服务器中获取 请求的流媒体资源片段, 从而缩短了向客户端返回流媒体资源的緩冲时间, 提 升了流媒体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明一实施例提供的一种流媒体资源的管理方法流程图; 图 2是本发明另一实施例提供的一种流媒体资源的管理方法流程图; 图 3是本发明另一实施例提供的第一种流媒体资源的结构示意图; 图 4是本发明另一实施例提供的第二种流媒体资源的结构示意图; 图 5是本发明另一实施例提供的第三种流媒体资源的结构示意图; 图 6是本发明另一实施例提供的一种服务器的结构示意图;
图 7是本发明另一实施例提供的另一种服务器的结构示意图;
图 8是本发明另一实施例提供的又一种服务器的结构示意图;
图 9是本发明另一实施例提供的再一种服务器的结构示意图;
图 10是本发明另一实施例提供的一种流媒体资源的管理设备的结构示意 图;
图 11是本发明另一实施例提供的一种流媒体资源的管理方法流程图; 图 12是本发明另一实施例提供的一种流媒体资源的管理方法流程图; 图 1 3是本发明另一实施例提供的一种客户端的结构示意图;
图 14是本发明另一实施例提供的另一种客户端的结构示意图;
图 15是本发明另一实施例提供的一种流媒体资源的管理设备的结构示意 图。 具体实施方式 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述中所 需要使用的附图作简要介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例, 对于本领域的普通技术人员来讲, 在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。 本发明实施例提供了一种流媒体资源的管理方法, 可应用于 LTE ( Long Term Evolut ion, 长期演进), UMTS ( Universa l Mobi l Telecommunica t ions Sys tem, 通用移动通讯系统)等移动通信系统。 LTE系统可在 20兆赫兹的频谱 带宽下提供下行 100兆位 /秒及上行 50兆位 /秒的传输速度。 LTE系统中的 E-UTRAN ( Evolved Universa l Terres tr ia l Radio Acces s Network, 演进通 用陆地无线接入网络)与客户端直接相连, 距离客户端较近, 且本地緩存可以 位于其中, 也可作为独立的网元单独设置, 但需要定义该网元与其它网元的接 口; PDN ( Packet Data Network, 分组数据网络)网关通过服务网关与 E-UTRAN 进行通信, 距离客户端较远, 且上层緩存可位于其中, 也可作为独立的网元单 独设置, 但需要定义该网元与其它网元的接口。 而原始服务器可与 PDN网关相 连, 其可将流媒体资源进行分段, 并为分段后的各个流媒体资源片段分别分配 URI。 通过该系统, 位于客户端侧的用户可点播视频或音频流媒体资源, 观看 其欲观看的内容。
现结合上述内容, 以服务器的角度为例, 对本实施例提供的流媒体资源管 理方法进行解译说明, 参见图 1 , 本实施例提供的方法流程包括:
101: 接收客户端发送的流媒体资源请求消息, 流媒体资源请求消息中携 带了请求的流媒体资源片段的 URI;
其中, URI可为资源位置的统一标识, ? URL ( Uni form Resource Locator , 统一资源定位符); 也可为资源名称的统一标识, 即 URN ( Uniform Resource Name, 统一资源名称)等。 其作用是用来在存储端唯一标识某一个资源, 以供 内部或者外部访问。
102: 在本地预先緩存的离散的流媒体资源片段中查询 URI对应的流媒体 资源片段;
进一步地, 在本地预先緩存的离散的流媒体资源片段中查询 URI对应的流 媒体资源片段之前, 该方法还包括:
从流媒体资源的多个流媒体资源片段中选择预设数目个离散的流媒体资 源片段;
按照播放时间顺序将预设数目个离散的流媒体资源片段依次存储在本地 緩存中;
其中 , 该流媒体资源预先被分为多个流媒体资源片段。
进一步地,按照播放时间顺序将预设数目个离散的流媒体资源片段依次存 储在本地緩存中之后, 该方法还包括:
将预设数目个离散的流媒体资源片段之外的该流媒体资源的其他流媒体 资源片段存储在上层緩存或原始服务器中。
103: 如果未查询到 URI对应的流媒体资源片段, 则确定与 URI对应的流 媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片段发送给客户 端。
其中, 如果查询到 URI对应的流媒体资源片段, 则将该 URI对应的流媒体 资源片段直接发送给客户端。
进一步地, 将相邻的流媒体资源片段发送给客户端时, 该方法还包括: 向客户端发送流媒体资源片段替换指示, 流媒体资源片段替换指示中携带 了相邻的流媒体资源片段的 URI。
进一步地, 向客户端发送流媒体资源片段替换指示之后, 该方法还包括: 从上层緩存或原始服务器中获取该相邻的流媒体资源片段之后的流媒体 资源片段, 并将相邻的流媒体资源片段之后的流媒体资源片段转发给客户端。
本实施例提供的方法, 在接收到携带请求的流媒体资源片段的 URI的流媒 体资源请求消息后 , 若在本地预先緩存的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流 媒体资源片段, 并将相邻的流媒体资源片段发送给客户端, 由于无需从上层緩 存或原始服务器中获取请求的流媒体资源片段,从而缩短了向客户端返回流媒 体资源的緩冲时间, 提升了流媒体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度; 且在存储流媒体资源时, 将流媒体资源分段为多个流媒 体资源片段, 且将多个流媒体资源片段进行离散存储, 平衡了本地緩存、 上层 緩存或原始服务器的存储资源量, 加快了获取流媒体资源片段的速度, 进一步 地提升了流媒体资源的管理效率。 本发明另一实施例提供了一种流媒体资源的管理方法, 现结合上述实施例 的内容, 以服务器的角度为例, 对本发明实施例提供的流媒体资源的管理方式 进行详细地解译说明。 参见图 2 , 本实施例提供的方法流程包括:
201: 从流媒体资源的多个流媒体资源片段中选择预设数目个离散的流媒 体资源片段,按照播放时间顺序将预设数目个离散的流媒体资源片段依次存储 在本地緩存中, 并将预设数目个离散的流媒体资源片段之外的该流媒体资源的 其他流媒体资源片段存储在上层緩存或原始服务器中; 其中, 该流媒体资源预 先被分为多个流媒体资源片段;
针对该步骤, 流媒体资源包括但不限于视频流媒体资源和音频流媒体资 源。 且原始服务器会预先将流媒体资源分段为多个流媒体资源片段。 在原始服 务器对流媒体资源进行分段时, 可按照等长的方式对流媒体资源进行分段, 即 将流媒体资源划分成多个等长的流媒体资源片段; 此外, 还可以按照不等长的 方式对流媒体资源进行分段, 即将流媒体资源划分成多个不等长的流媒体资源 片段。 得到的流媒体资源片段的数量可以为 10段或 15段, 或者更多。 具体实 施时, 关于对流媒体资源进行分段的方式以及得到的流媒体资源片段的数量, 可视流媒体资源的长度而定, 本实施例对此不作具体限定。
以某一流媒体资源的长度为 2分 30秒为例, 则在对该流媒体资源进行分 段时, 若按照等长的方式将其分为 10段, 则得到长度各为 15秒的 10个流媒 体资源片段; 若按照等长的方式将其分为 15段, 则得到长度各为 10秒的 15 个流媒体资源片段。此外,还可以按照非等长的方式对该流媒体资源进行分段, 若按照非等长的方式将其分为 10段, 则可将前 5个流媒体资源片段的长度划 分为 10秒, 后 5个流媒体资源片段的长度划分为 20秒; 若按照非等长的方式 将其分为 15段, 则可将前 5个流媒体资源片段的长度划分为 7秒, 中间 5个 流媒体资源片段的长度划分为 11秒, 后 5个流媒体资源片段的长度划分为 12 秒。
进一步地, 为了区分流媒体资源的多个流媒体资源片段, 原始服务器还会 预先为流媒体资源的各个流媒体资源片段分别分配对应的 URI。 其中, URI 既 可以是 URN (Uniform Resource Name, 统一资源名称), 也可以是 URL ( Uniform Resource Locator , 统一资源定位符), 本实施例对此不作具体限定, 仅需保 证为不同的流媒体资源片段分配不同的 URI , 通过该 URI能够区分不同的流媒 体资源片段即可。
此外, 预设数目的大小具体可为 5 , 当然, 预设数目的大小除数值 5以夕卜, 还可以为其他数值, 例如, 8或 9 , 本实施例对预设数目的大小不进行具体限 定。 从多个流媒体资源片段中选择预设数目个离散的流媒体资源片段时, 可以 按照等间隔的方式从所有流媒体资源片段中选择预设数目个离散的流媒体资 源片段,也可以按照非等间隔的方式随机从所有流媒体资源片段中选择预设数 目个离散的流媒体资源片段。无论按照哪种方式从多个流媒体资源片段中选择 预设数目个离散的流媒体资源片段,被选中的预设数目个离散的流媒体资源片 段均按照播放时间顺序依次存储在本地緩存中; 当然, 出于快速获取流媒体资 源片段的目的, 可将预设数目个流媒体资源片段之外的该流媒体资源的其他流 媒体资源片段也存储在本地緩存中。 但是由于本地緩存的空间大小存在限制, 因此, 需将预设数目个流媒体资源片段之外的该流媒体资源的其他流媒体资源 片段存储在上层緩存或原始服务器中。 其中, 在将预设数目个离散的流媒体资 源片段之外的该流媒体资源的其他流媒体资源片段进行存储时, 可将预设数目 个离散的流媒体资源片段之外的该流媒体资源的其他流媒体资源片段全部存 储在上层緩存或原始服务器中; 也可将预设数目个离散的流媒体资源片段之外 的该流媒体资源的其他流媒体资源片段中的一部分存储在上层緩存中, 而其他 部分存储在原始服务器中。 具体采用何种方式将预设数目个离散的流媒体资源 片段之外的该流媒体资源的其他流媒体资源片段进行存储, 本实施例对此不作 具体限定。
下面以图 3为例,对本实施例提供的选择及存储流媒体资源片段的具体实 现过程进行详细地解释说明。
图 3中的流媒体资源的时长为 60秒, 且将该流媒体资源分为了 10段, 每 个流媒体资源片段的时长为 6秒。 若分别以符号 al-al O来标识各个流媒体资 源片段,则流媒体资源片段 al的起始时间与终止时间为 00: 00-00: 06 , 流媒体 资源片段 a2的起始时间与终止时间为 00: 06-00: 12 , 流媒体资源片段 a3的起 始时间与终止时间为 00: 12-00: 18; 以此类推, 流媒体资源片段 al O的起始时 间与终止时间为 00: 54-00: 60。 以预设数目为 5为例, 则在选择 5个离散的流 媒体资源片段时, 可依次选择流媒体资源片段 al、 流媒体资源片段 a3、 流媒 体资源片段 a5、 流媒体资源片段 a7及流媒体资源片段 a9 , 即按照图 4所示的 方式进行选择;选择之后,将上述 5个流媒体资源片段依次存储在本地緩存中, 而将流媒体资源片段 a2、 流媒体资源片段 a4、 流媒体资源片段 a6、 流媒体资 源片段 a8及流媒体资源片段 al O存储在上层緩存中。 也可依次选择流媒体资 源片段 al、 流媒体资源片段 a2、 流媒体资源片段 a3、 流媒体资源片段 a7及流 媒体资源片段 a9 , 即按照图 5所示的方式进行选择; 选择之后, 将上述 5个流 媒体资源片段依次存储在本地緩存中, 而将流媒体资源片段 a4、流媒体资源片 段 a5、 流媒体资源片段 a6、 流媒体资源片段 a8及流媒体资源片段 al 0存储在 上层緩存中。 当然, 也可以将流媒体资源片段 a4、 流媒体资源片段 a5、 流媒 体资源片段 a6、 流媒体资源片段 a8及流媒体资源片段 al 0中的部分或全部存 储在原始服务器中。 本实施例以将流媒体资源片段 a4、 流媒体资源片段 a5、 流媒体资源片段 a6、 流媒体资源片段 a8及流媒体资源片段 al O全部存储在上 层緩存中为例。 当然, 除上述选择及存储流媒体资源片段方式外, 还可以采取 其他选择及存储流媒体资源片段的方式, 本实施例对此不作具体限定。
需要说明的是,通过上述步骤 201可将流媒体资源的各个流媒体资源片段 以离散的形式分别存储在本地緩存、 上层緩存或原始服务器中, 从而平衡了本 地緩存、 上层緩存或原始服务器的存储资源量, 提高了后续查找请求的流媒体 资源片段的速度。 且在执行本实施例提供的方法时, 上述步骤 201无需每次均 执行, 即在后续执行本实施例提供的方法时, 直接执行后续步骤即可。 当且仅 当流媒体资源片段的选择及存储方式发生变更时, 需再次执行上述步骤 201。
进一步地, 按照上述方式存储流媒体资源片段后, 可针对后续客户端发送 的流媒体资源请求消息进行相应的处理, 具体处理过程详见后续步骤 202至步 骤 205。
202: 接收客户端发送的流媒体资源请求消息, 流媒体资源请求消息中携 带了请求的流媒体资源片段的 URI;
针对该步骤, 在接收客户端发送的流媒体资源请求消息之前, 需通过三次 握手机制与客户端建立 TCP/ IP ( Transmi s s ion Contro l Protocol / Internet Protocol , 传输控制协议)连接, 当与客户端建立起 TCP/ IP连接后, 方可基 于 HTTP ( Hyper text Transfer Protocol , 超文本传输协议)接收客户端发送 的流媒体资源请求消息。
当然, 除上述基于 HTTP接收客户端发送的流媒体资源请求消息外, 还可 基于 FTP ( Fi le Transfer Protocol , 文本传输协议)、 RTSP ( Rea l Time Streaming Protocol , 实时流传输协议 )接收客户端发送的流媒体资源请求消 息, 本实施例对此不作具体限定。
此外, 流媒体资源请求消息中除携带请求的流媒体资源片段的 URI夕卜, 还 可以携带其他消息, 例如, 发送流媒体资源请求消息的时间, 本实施例对流媒 体资源请求消息中携带的内容同样不作具体限定。
203: 在本地预先緩存的离散的流媒体资源片段中查询 URI对应的流媒体 资源片段;
针对该步骤, 由于已根据上述步骤 203提供的方式将流媒体资源的多个流 媒体资源片段分别存储在本地緩存、 上层緩存或原始服务器中。 因此, 在接收 到请求的流媒体资源片段的 URI后,先在距离客户端较近的本地緩存中查询该 URI对应的流媒体资源片段。
继续以图 4为例,若请求的流媒体资源片段的 URI为 a5 , 则由于流媒体资 源片段 a5存储在本地緩存中, 则将流媒体资源片段 a5作为查询到的请求的流 媒体资源片段; 若请求的流媒体资源片段的 URI为 a6 , 则由于流媒体资源片段 a6未存储在本地緩存中, 因此, 在本地緩存未查询到请求的流媒体资源。
204: 如果未查询到 URI对应的流媒体资源片段, 则确定与 URI对应的流 媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片段及流媒体资 源片段替换指示发送给客户端 , 流媒体资源片段替换指示中携带了相邻的流媒 体资源片段的 URI ;
针对该步骤, 如果未查询到 URI对应的流媒体资源片段, 则若立即从上层 緩存或原始服务器中获取 URI对应的流媒体资源片段, 向客户端返回流媒体资 源的緩冲时间过长; 因此, 出于用户观看体验的考虑, 可确定与 URI对应的流 媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片段发送给客户 端。 而由于与请求的流媒体资源片段相邻的流媒体资源片段同请求的流媒体资 源片段在时间上相隔不远, 二者的内容不会存在很大的跳跃性, 所以将与请求 的流媒体资源片段相邻的流媒体资源片段发送给客户端, 并不会对客户端侧用 户的观看产生较大影响。 且用户在客户端触发此次发送流媒体资源请求消息 时, 可能仅出于浏览流媒体资源的目的, 以确定其是否有观看价值; 因此, 将 请求的流媒体资源片段替换为与请求的流媒体资源片段相邻的流媒体资源片 段发送给客户端, 并不会影响用户的观看体验。
需要说明的是,在确定与 URI对应的流媒体资源片段相邻的流媒体资源片 段时, 可将与 URI对应的流媒体资源片段在时间轴上的左相邻流媒体资源片段 及右相邻流媒体资源片段中的任意一个确定为与 URI对应的流媒体资源片段相 邻的流媒体资源片段, 具体确定为哪一个, 本实施例对此不作具体限定, 可视 情况而定, 一般来说可以选择时间上最接近的作为替代的流媒体片段。
仍以图 4为例,若请求的流媒体资源片段的 URI为 a6 ,则由于流媒体资源 片段 a6并未存储在本地緩存中, 因此, 为了不影响客户端播放流媒体资源的 流畅度,可确定与流媒体资源片段 a6相邻的流媒体资源片段。从 图 4中可知, 流媒体资源片段 a6的左相邻流媒体资源片段为流媒体资源片段 a5 , 右相邻流 媒体资源片段为流媒体资源片段 a7 , 以确定流媒体资源片段 a7为与流媒体资 源片段 a6相邻的流媒体资源片段为例, 则由于流媒体资源片段 a7与请求的流 媒体资源片段 a6在时间上仅相隔 6秒, 二者的内容不会存在很大的跳跃性, 所以将流媒体资源片段 a7发送给客户端, 并不会对客户端侧用户的观看产生 较大影响。 且用户在客户端触发此次发送流媒体资源请求消息时, 可能仅出于 浏览流媒体资源的目的, 以确定其是否有观看价值; 因此, 将流媒体资源片段 a6替换为流媒体资源片段 a7发送给客户端, 并不会影响用户的观看体验。 且 在发送流媒体资源片段 a7 的同时, 向客户端发送流媒体资源片段替换指示, 以告知用户请求的流媒体资源已被替换。 该指示中包括了流媒体资源片段 a7 的 URI。
当然, 流媒体资源片段替换指示中除包括上述流媒体资源片段 a7 的 URI 外, 还可以包括其他内容, 例如, 流媒体资源片段替换指示的生成时间, 本实 施例对流媒体资源替换指示中携带的内容不作具体限定。
205 : 从上层緩存或原始服务器中获取相邻的流媒体资源片段之后的流媒 体资源片段, 并将相邻的流媒体资源片段之后的流媒体资源片段转发给客户 端。
针对该步骤, 为了客户端能够流畅地播放流媒体资源片段之后的流媒体资 源片段, 以保证用户的观看体验, 需从上层緩存或原始服务器中获取相邻的流 媒体资源片段之后的流媒体资源片段; 在获取相邻的流媒体资源片段之后的流 媒体资源片段时, 可根据相邻的流媒体资源片段之后的流媒体资源片段的 URI 从上层緩存中获取相邻的流媒体资源片段之后的流媒体资源片段, 并将相邻的 流媒体资源片段之后的流媒体资源片段转发给客户端。
仍以图 4及步骤 204为例, 由于步骤 204中已将与请求的流媒体资源片段 a6相邻的流媒体资源片段 a7发送给客户端, 因此, 客户端便可进行流媒体资 源片段 a7的播放。但流媒体资源片段 a7之后的流媒体资源片段中仅流媒体资 源片段 a9存储在本地緩存中, 流媒体资源片段 a8和流媒体资源片段 al O存储 在上层緩存中。 因此, 为了客户端能够流畅地播放流媒体资源片段 a7之后的 流媒体资源片段,可分别根据流媒体资源片段 a8的 URI和流媒体资源片段 al 0 的 URI从上层緩存中获取到流媒体资源片段 a8和流媒体资源片段 al O,并将流 媒体资源片段 a8和流媒体资源片段 al 0转发给客户端, 以保证客户端后续播 放流媒体资源的流畅性。 本实施例提供的方法, 在接收到携带请求的流媒体资源片段的 URI的流媒 体资源请求消息后 , 若在本地预先緩存的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流 媒体资源片段, 并将相邻的流媒体资源片段发送给客户端, 由于无需从上层緩 存或原始服务器中获取请求的流媒体资源片段,从而缩短了向客户端返回流媒 体资源的緩冲时间, 提升了流媒体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度; 且在存储流媒体资源时, 将流媒体资源分段为多个流媒 体资源片段, 且将多个流媒体资源片段进行离散存储, 平衡了本地緩存、 上层 緩存或原始服务器的存储资源量, 加快了获取流媒体资源片段的速度, 进一步 地提供了流媒体资源的管理效率。 本发明另一实施例提供了一种服务器, 用于执行上述两个实施例所提供的 方法, 参见图 6 , 该服务器包括:
接收模块 601 , 用于接收客户端发送的流媒体资源请求消息, 流媒体资源 请求消息中携带了请求的流媒体资源片段的 URI;
查询模块 602 , 用于在本地预先緩存的离散的流媒体资源片段中查询接收 模块 601接收到的 URI对应的流媒体资源片段;
确定模块 603 , 用于当查询模块 602未查询到 URI对应的流媒体资源片段 时, 确定与 URI对应的流媒体资源片段相邻的流媒体资源片段;
第一发送模块 604 , 用于将确定模块 603确定的相邻的流媒体资源片段发 送给客户端。
进一步地, 参见图 7 , 该服务器还包括:
选择模块 605 , 用于从流媒体资源的多个流媒体资源片段中选择预设数目 个离散的流媒体资源片段;
第一存储模块 606 , 用于按照播放时间顺序将选择模块 605选择的预设数 目个离散的流媒体资源片段依次存储在本地緩存中;
其中 , 该流媒体资源预先被分为多个流媒体资源片段。
进一步地, 参见图 8 , 该服务器还包括:
第二存储模块 607 , 用于将预设数目个离散的流媒体资源片段之外的该流 媒体资源的其他流媒体资源片段存储在上层緩存或原始服务器中。
进一步地, 第一发送模块 604 , 还用于向客户端发送流媒体资源片段替换 指示, 流媒体资源片段替换指示中携带了相邻的流媒体资源片段的 URI。
进一步地, 参见图 9 , 该服务器还包括:
获取模块 608 , 用于从上层緩存或原始服务器中获取相邻的流媒体资源片 段之后的流媒体资源片段;
第二发送模块 609 , 用于将获取模块 608获取的相邻的流媒体资源片段之 后的流媒体资源片段转发给客户端。
本实施例提供的服务器,在接收到携带请求的流媒体资源片段的 URI的流 媒体资源请求消息后 , 若在本地预先緩存的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流 媒体资源片段, 并将相邻的流媒体资源片段发送给客户端, 由于无需从上层緩 存或原始服务器中获取请求的流媒体资源片段,从而缩短了向客户端返回流媒 体资源的緩冲时间, 提升了流媒体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度; 且在存储流媒体资源时, 将流媒体资源分段为多个流媒 体资源片段, 且将多个流媒体资源片段进行离散存储, 平衡了本地緩存、 上层 緩存或原始服务器的存储资源量, 加快了获取流媒体资源片段的速度, 进一步 地提供了流媒体资源的管理效率。 本发明另一实施例提供了一种流媒体资源的管理设备的结构示意图, 参见 图 10, 该设备包括至少一个处理器 701 , 例如 CPU, 至少一个网络接口 704或 者其他用户接口 703 , 存储器 705 , 和至少一个通信总线 702。 通信总线 702 用于实现这些装置之间的连接通信。 用户接口 703可以是显示器, 键盘或者点 击设备。 存储器 705可能包含高速 Ram存储器, 也可能还包括非易失性存储器 ( non-vola t i le memory ), 例如至少一个磁盘存储器。
处理器 701用于执行存储器 705存放的程序, 以实现如下方法: 接收客户 端发送的流媒体资源请求消息 , 所述流媒体资源请求消息中携带了请求的流媒 体资源片段的 URI ;
在本地预先緩存的离散的流媒体资源片段中查询所述 URI对应的流媒体资 源片段;
如果未查询到所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的 流媒体资源片段相邻的流媒体资源片段, 并将所述相邻的流媒体资源片段发送 给所述客户端。 进一步地, 处理器 701 , 具体用于从流媒体资源的多个流媒体资源片段中 选择预设数目个离散的流媒体资源片段;
按照播放时间顺序将所述预设数目个离散的流媒体资源片段依次存储在 本地緩存中; 其中, 所述流媒体资源预先被分为多个流媒体资源片段。
进一步地, 处理器 701 , 具体用于将所述预设数目个离散的流媒体资源片 段之外的所述流媒体资源的其他流媒体资源片段存储在上层緩存或原始服务 器中。
进一步地, 处理器 701 , 具体用于向所述客户端发送流媒体资源片段替换 指示, 所述流媒体资源片段替换指示中携带了所述相邻的流媒体资源片段的 URI。
进一步地, 处理器 701 , 具体用于从所述上层緩存或原始服务器中获取所 述相邻的流媒体资源片段之后的流媒体资源片段, 并将所述相邻的流媒体资源 片段之后的流媒体资源片段转发给所述客户端。
在一些实施方式中, 存储器 705存储了如下的元素, 模块或者数据结构, 或者他们的子集, 或者他们的扩展集:
操作系统 707 , 包含各种程序, 用于实现各种基础业务以及处理基于硬件 的任务;
应用模块 707, 包含接收模块 601、 查询模块 602、 确定模块 603、 第一发 送模块 604、 选择模块 605、 第一存储模块 606、 第二存储模块 607、 获取模块 608、第二发送模块 609。上述模块的功能可以参考图 2的工作原理图的说明部 分, 此处不再贅述。
本实施例提供的设备, 在接收到携带请求的流媒体资源片段的 URI的流媒 体资源请求消息后 , 若在本地预先緩存的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流 媒体资源片段, 并将相邻的流媒体资源片段发送给客户端, 由于无需从上层緩 存或原始服务器中获取请求的流媒体资源片段,从而缩短了向客户端返回流媒 体资源的緩冲时间, 提升了流媒体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度; 且在存储流媒体资源时, 将流媒体资源分段为多个流媒 体资源片段, 且将多个流媒体资源片段进行离散存储, 平衡了本地緩存、 上层 緩存或原始服务器的存储资源量, 加快了获取流媒体资源片段的速度, 进一步 地提供了流媒体资源的管理效率。 本发明另一实施例提供了一种流媒体资源的管理方法, 以客户端的角度为 例, 对本发明实施例提供的流媒体资源的管理方法进行解释说明。 参见图 11 , 本实施例提供的方法流程包括:
1101: 向服务器发送流媒体资源请求消息, 流媒体资源请求消息中携带了 请求的流媒体资源片段的 URI , 该 URI用于服务器在本地緩存中查询 URI对应 的流媒体资源片段, 如果在本地緩存中未查询到 URI对应的流媒体资源片段, 则确定与 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒 体资源片段发送给客户端; 其中, 本地緩存中预先緩存了离散的流媒体资源片 段;
1102: 接收服务器发送的相邻的流媒体资源片段;
进一步地, 接收服务器发送的相邻的流媒体资源片段时, 该方法还包括: 接收服务器发送的流媒体资源片段替换指示, 流媒体资源片段替换指示中 携带了相邻的流媒体资源片段的 URI。
本实施例提供的方法, 在向服务器发送流媒体资源请求消息后, 服务器若 接收到该流媒体资源请求消息且根据该流媒体资源请求消息在本地预先緩存 的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片 段发送给客户端, 由于服务器无需从上层緩存或原始服务器中获取请求的流媒 体资源片段, 从而缩短了向客户端返回流媒体资源的緩冲时间, 提升了流媒体 资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度。 本发明另一实施例提供了一种流媒体资源的管理方法, 现结合上述相邻实 施例的内容, 以客户端的角度为例, 对本实施例提供的流媒体资源的管理方式 进行详细地解译说明。 参见图 12 , 本实施例提供的方法流程包括:
1201: 向服务器发送流媒体资源请求消息, 流媒体资源请求消息中携带了 请求的流媒体资源片段的 URI , 该 URI用于服务器在本地緩存中查询 URI对应 的流媒体资源片段, 如果在本地緩存中未查询到 URI对应的流媒体资源片段, 则确定与 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒 体资源片段发送给客户端; 其中, 本地緩存中预先緩存了离散的流媒体资源片 段; 针对该步骤, 在向服务器发送流媒体资源请求消息之前, 需通过三次握手 机制与服务器建立 TCP/ IP连接, 当与服务器建立起 TCP/ IP连接后, 方可基于 HTTP向服务器发送流媒体资源请求消息。
当然, 除上述基于 HTTP向服务器发送流媒体资源请求消息外, 还可基于 FTP , RTSP向服务器发送流媒体资源请求消息, 本实施例对此不作具体限定。
此外, 流媒体资源请求消息中除携带请求的流媒体资源片段的 URI夕卜, 还 可以携带其他消息, 例如, 发送流媒体资源请求消息的时间, 本实施例对流媒 体资源请求消息中携带的内容同样不作具体限定。
1202: 接收服务器发送的相邻的流媒体资源片段及流媒体资源片段替换指 示, 流媒体资源片段替换指示中携带了相邻的流媒体资源片段的 URI。
针对该步骤, 在接收到服务器发送的相邻的流媒体资源片段及流媒体资源 片段替换指示后 , 可将相邻的流媒体资源片段及流媒体资源片段替换指示进行 存储。 例如, 将二者存储在内存中。 当然, 存储介质的类型除上述内存外还可 为其他类型的存储介质, 例如, 緩存或硬盘中, 本实施例对存储介质的类型不 进行具体限定。
需要说明的是, 由于相邻的流媒体资源片段同请求的流媒体资源片段在时 间上相隔不远, 二者的内容不会存在艮大的跳跃性, 所以接收并向用户播放相 邻的流媒体资源片段, 并不会对用户的观看产生较大影响。 且用户在客户端触 发此次发送流媒体资源请求消息时, 可能仅出于浏览流媒体资源的目的, 以确 定其是否有观看价值; 因此, 将请求的流媒体资源片段替换为与请求的流媒体 资源片段相邻的流媒体资源片段, 并不会影响用户的观看体验。 且在接收相邻 的流媒体资源片段时,还将接收到包含该相邻的流媒体资源片段 URI的流媒体 资源替换指示, 以告知用户请求的流媒体资源已被替换, 从而实现了有效地对 流媒体资源进行管理。
此夕卜,流媒体资源片段替换指示中除包括相邻的流媒体资源片段的 URI夕卜, 还可以包括其他内容, 例如, 流媒体资源片段替换指示的生成时间, 本实施例 对流媒体资源替换指示中携带的内容不作具体限定。
本实施例提供的方法, 在向服务器发送流媒体资源请求消息后, 服务器若 接收到该流媒体资源请求消息且根据该流媒体资源请求消息在本地预先緩存 的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片 段发送给客户端, 由于服务器无需从上层緩存或原始服务器中获取请求的流媒 体资源片段, 从而缩短了向客户端返回流媒体资源的緩冲时间, 提升了流媒体 资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度。 本发明另一实施例提供了一种客户端, 用于执行上述相邻两个实施例所提 供的方法, 参见图 13 , 该客户端包括:
发送模块 1301 ,用于向服务器发送流媒体资源请求消息, 流媒体资源请求 消息中携带了请求的流媒体资源片段的 URI , 该 URI用于服务器在本地緩存中 查询 URI对应的流媒体资源片段, 如果在本地緩存中未查询到 URI对应的流媒 体资源片段, 则确定与 URI对应的流媒体资源片段相邻的流媒体资源片段, 并 将相邻的流媒体资源片段发送给客户端;
第一接收模块 1302 , 用于接收服务器发送的相邻的流媒体资源片段; 其中, 本地緩存中预先緩存了离散的流媒体资源片段。
进一步地, 参见图 14 , 该客户端还包括:
第二接收模块 1303 ,用于接收服务器发送的流媒体资源片段替换指示, 流 媒体资源片段替换指示中携带了相邻的流媒体资源片段的 URI。
本实施例提供的客户端, 在向服务器发送流媒体资源请求消息后, 服务器 若接收到该流媒体资源请求消息且根据该流媒体资源请求消息在本地预先緩 存的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与 该 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源 片段发送给客户端, 由于服务器无需从上层緩存或原始服务器中获取请求的流 媒体资源片段, 从而缩短了向客户端返回流媒体资源的緩冲时间, 提升了流媒 体资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度。 本发明另一实施例提供了一种流媒体资源的管理设备的结构示意图, 参见 图 15 , 该设备包括至少一个处理器 701 , 例如 CPU, 至少一个网络接口 704或 者其他用户接口 703 , 存储器 705 , 和至少一个通信总线 702。 通信总线 702 用于实现这些装置之间的连接通信。 用户接口 703可以是显示器, 键盘或者点 击设备。 存储器 705可能包含高速 Ram存储器, 也可能还包括非易失性存储器 ( non-vola t i le memory ), 例如至少一个磁盘存储器。
处理器 701用于执行存储器 705存放的程序, 以实现如下方法: 向服务器 发送流媒体资源请求消息, 所述流媒体资源请求消息中携带了请求的流媒体资 源片段的 URI , 所述 URI用于服务器在本地緩存中查询所述 URI对应的流媒体 资源片段, 如果在所述本地緩存中未查询到所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将所述相 邻的流媒体资源片段发送给所述客户端;
接收所述服务器发送的所述相邻的流媒体资源片段;
其中 , 所述本地緩存中预先緩存了离散的流媒体资源片段。
进一步地, 处理器 701 , 具体用于接收所述服务器发送的流媒体资源片段 替换指示, 所述流媒体资源片段替换指示中携带了所述相邻的流媒体资源片段 的 URI。
在一些实施方式中, 存储器 705存储了如下的元素, 模块或者数据结构, 或者他们的子集, 或者他们的扩展集:
操作系统 707 , 包含各种程序, 用于实现各种基础业务以及处理基于硬件 的任务;
应用模块 707, 包含发送模块 1301、 第一接收模块 1302、 第二接收模块 1303。 上述模块的功能可以参考图 12 的工作原理图的说明部分, 此处不再贅 述。
本实施例提供的设备, 在向服务器发送流媒体资源请求消息后, 服务器若 接收到该流媒体资源请求消息且根据该流媒体资源请求消息在本地预先緩存 的离散的流媒体资源片段中未查询到 URI对应的流媒体资源片段, 则确定与该 URI对应的流媒体资源片段相邻的流媒体资源片段, 并将相邻的流媒体资源片 段发送给客户端, 由于服务器无需从上层緩存或原始服务器中获取请求的流媒 体资源片段, 从而缩短了向客户端返回流媒体资源的緩冲时间, 提升了流媒体 资源的管理效率, 减少了用户的等待时间, 进而提升用户体验度。 需要说明的是: 上述实施例提供的服务器、 客户端及设备在管理流媒体资 源时, 仅以上述各功能模块的划分进行举例说明, 实际应用中, 可以根据需要 而将上述功能分配由不同的功能模块完成, 即将服务器、 客户端及设备的内部 结构划分成不同的功能模块, 以完成以上描述的全部或者部分功能。 另外, 上 述实施例提供的服务器、客户端及设备与流媒体资源的管理方法实施例属于同 一构思, 其具体实现过程详见方法实施例, 这里不再贅述。 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通 过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序可以存储 于一种计算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘 或光盘等。
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发明的 精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的 保护范围之内。

Claims

权 利 要 求 书
1、 一种流媒体资源的管理方法, 其特征在于, 所述方法包括:
接收客户端发送的流媒体资源请求消息 , 所述流媒体资源请求消息中携带 了请求的流媒体资源片段的通用资源标识符 URI;
在本地预先緩存的离散的流媒体资源片段中查询所述 URI 对应的流媒体资 源片段;
如果未查询到所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的 流媒体资源片段相邻的流媒体资源片段, 并将所述相邻的流媒体资源片段发送 给所述客户端。
2、 根据权利要求 1所述的方法, 其特征在于, 所述在本地预先緩存的离散 的流媒体资源片段中查询所述 URI 对应的流媒体资源片段之前, 所述方法还包 括:
从流媒体资源的多个流媒体资源片段中选择预设数目个离散的流媒体资源 片段;
按照播放时间顺序将所述预设数目个离散的流媒体资源片段依次存储在本 地緩存中;
其中 , 所述流媒体资源预先被分为多个流媒体资源片段。
3、 根据权利要求 2所述的方法, 其特征在于, 所述按照播放时间顺序将所 述预设数目个离散的流媒体资源片段依次存储在本地緩存中之后, 所述方法还 包括:
将所述预设数目个离散的流媒体资源片段之外的所述流媒体资源的其他流 媒体资源片段存储在上层緩存或原始服务器中。
4、 根据权利要求 1至 3中任一权利要求所述的方法, 其特征在于, 所述将 所述相邻的流媒体资源片段发送给所述客户端时, 所述方法还包括:
向所述客户端发送流媒体资源片段替换指示, 所述流媒体资源片段替换指 示中携带了所述相邻的流媒体资源片段的 URI。
5、 根据权利要求 4所述的方法, 其特征在于, 所述向所述客户端发送流媒 体资源片段替换指示之后, 所述方法还包括:
从所述上层緩存或所述原始服务器中获取所述相邻的流媒体资源片段之后 的流媒体资源片段, 并将所述相邻的流媒体资源片段之后的流媒体资源片段转 发给所述客户端。
6、 一种服务器, 其特征在于, 所述服务器包括:
接收模块, 用于接收客户端发送的流媒体资源请求消息, 所述流媒体资源 请求消息中携带了请求的流媒体资源片段的通用资源标识符 URI ;
查询模块, 用于在本地预先緩存的离散的流媒体资源片段中查询所述接收 模块接收到的 URI对应的流媒体资源片段;
确定模块, 用于当所述查询模块未查询到所述 URI 对应的流媒体资源片段 时, 确定与所述 URI对应的流媒体资源片段相邻的流媒体资源片段;
第一发送模块, 用于将所述确定模块确定的相邻的流媒体资源片段发送给 所述客户端。
7、 根据权利要求 6所述的服务器, 其特征在于, 所述服务器还包括: 选择模块, 用于从流媒体资源的多个流媒体资源片段中选择预设数目个离 散的流媒体资源片段;
第一存储模块, 用于按照播放时间顺序将所述选择模块选择的预设数目个 离散的流媒体资源片段依次存储在本地緩存中;
其中 , 所述流媒体资源预先被分为多个流媒体资源片段。
8、 根据权利要求 7所述的服务器, 其特征在于, 所述服务器还包括: 第二存储模块, 用于将所述预设数目个离散的流媒体资源片段之外的所述 流媒体资源的其他流媒体资源片段存储在上层緩存或原始服务器中。
9、 根据权利要求 6至 8中任一权利要求所述的服务器, 其特征在于, 所述 第一发送模块, 还用于向所述客户端发送流媒体资源片段替换指示, 所述流媒 体资源片段替换指示中携带了所述相邻的流媒体资源片段的 URI。
10、 根据权利要求 9所述的服务器, 其特征在于, 所述服务器还包括: 获取模块, 用于从所述上层緩存或所述原始服务器中获取所述相邻的流媒 体资源片段之后的流媒体资源片段;
第二发送模块 , 用于将所述获取模块获取的相邻的流媒体资源片段之后的 流媒体资源片段转发给所述客户端。
11、 一种流媒体资源的管理方法, 其特征在于, 所述方法包括:
向服务器发送流媒体资源请求消息 , 所述流媒体资源请求消息中携带了请 求的流媒体资源片段的通用资源标识符 URI ,所述 URI用于所述服务器在本地緩 存中查询所述 URI 对应的流媒体资源片段, 如果在所述本地緩存中未查询到所 述 URI对应的流媒体资源片段, 则确定与所述 URI对应的流媒体资源片段相邻 的流媒体资源片段, 并将所述相邻的流媒体资源片段发送给客户端;
接收所述服务器发送的所述相邻的流媒体资源片段;
其中, 所述本地緩存中预先緩存了离散的流媒体资源片段。
12、 根据权利要求 11所述的方法, 其特征在于, 所述接收所述服务器发送 的所述相邻的流媒体资源片段时, 所述方法还包括:
接收所述服务器发送的流媒体资源片段替换指示, 所述流媒体资源片段替 换指示中携带了所述相邻的流媒体资源片段的 URI。
13、 一种客户端, 其特征在于, 所述客户端包括:
发送模块, 用于向服务器发送流媒体资源请求消息, 所述流媒体资源请求 消息中携带了请求的流媒体资源片段的通用资源标识符 URI ,所述 URI用于所述 服务器在本地緩存中查询所述 URI 对应的流媒体资源片段, 如果在所述本地緩 存中未查询到所述 URI对应的流媒体资源片段, 则确定与所述 URI对应的流媒 体资源片段相邻的流媒体资源片段, 并将所述相邻的流媒体资源片段发送给客 户端;
第一接收模块, 用于接收所述服务器发送的所述相邻的流媒体资源片段; 其中, 所述本地緩存中预先緩存了离散的流媒体资源片段。
14、 根据权利要求 13所述的客户端, 其特征在于, 所述客户端还包括: 第二接收模块, 用于接收所述服务器发送的流媒体资源片段替换指示, 所 述流媒体资源片段替换指示中携带了所述相邻的流媒体资源片段的 URI。
PCT/CN2013/085592 2013-10-21 2013-10-21 流媒体资源的管理方法、服务器及客户端 WO2015058334A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/085592 WO2015058334A1 (zh) 2013-10-21 2013-10-21 流媒体资源的管理方法、服务器及客户端
CN201380002298.3A CN104781807B (zh) 2013-10-21 2013-10-21 流媒体资源的管理方法、服务器及客户端

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/085592 WO2015058334A1 (zh) 2013-10-21 2013-10-21 流媒体资源的管理方法、服务器及客户端

Publications (1)

Publication Number Publication Date
WO2015058334A1 true WO2015058334A1 (zh) 2015-04-30

Family

ID=52992109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/085592 WO2015058334A1 (zh) 2013-10-21 2013-10-21 流媒体资源的管理方法、服务器及客户端

Country Status (2)

Country Link
CN (1) CN104781807B (zh)
WO (1) WO2015058334A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574905A (en) * 1994-05-26 1996-11-12 International Business Machines Corporation Method and apparatus for multimedia editing and data recovery
US20030191812A1 (en) * 2001-12-19 2003-10-09 International Business Machines Corporation Method and system for caching role-specific fragments
CN101785006A (zh) * 2007-06-27 2010-07-21 西门子公司 用于对多媒体数据进行编码和解码的方法和设备
US20110276691A1 (en) * 2010-05-10 2011-11-10 Lianghwa Jou Methods and Systems of Forming the Uniform Resource Identifier of An Arbitrary Segment of A Resource
CN102282825A (zh) * 2010-12-14 2011-12-14 华为技术有限公司 内容传送网络中流媒体请求地址映射的方法及装置、缓存节点
CN103051931A (zh) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 回看节目录制、播放方法、服务器、客户端及系统
CN103281294A (zh) * 2013-04-17 2013-09-04 华为技术有限公司 一种数据共享方法及电子设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101344887B (zh) * 2008-06-06 2011-09-14 网易有道信息技术(北京)有限公司 音频搜索方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574905A (en) * 1994-05-26 1996-11-12 International Business Machines Corporation Method and apparatus for multimedia editing and data recovery
US20030191812A1 (en) * 2001-12-19 2003-10-09 International Business Machines Corporation Method and system for caching role-specific fragments
CN101785006A (zh) * 2007-06-27 2010-07-21 西门子公司 用于对多媒体数据进行编码和解码的方法和设备
US20110276691A1 (en) * 2010-05-10 2011-11-10 Lianghwa Jou Methods and Systems of Forming the Uniform Resource Identifier of An Arbitrary Segment of A Resource
CN102282825A (zh) * 2010-12-14 2011-12-14 华为技术有限公司 内容传送网络中流媒体请求地址映射的方法及装置、缓存节点
CN103051931A (zh) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 回看节目录制、播放方法、服务器、客户端及系统
CN103281294A (zh) * 2013-04-17 2013-09-04 华为技术有限公司 一种数据共享方法及电子设备

Also Published As

Publication number Publication date
CN104781807B (zh) 2018-11-09
CN104781807A (zh) 2015-07-15

Similar Documents

Publication Publication Date Title
US11463550B2 (en) Request management for hierarchical cache
US10771527B2 (en) Caching and streaming of digital media content subsets
JP6698755B2 (ja) セグメント化コンテンツのストリーミング
US10116572B2 (en) Method, device, and system for acquiring streaming media data
US9390200B2 (en) Local caching device, system and method for providing content caching service
US8694675B2 (en) Generalized dual-mode data forwarding plane for information-centric network
EP2088719B1 (en) Method and device for distributing file data
WO2017071228A1 (zh) 基于hls协议的直播方法、系统及客户端
WO2015117570A1 (en) Network acceleration method, apparatus and device based on router device
JP6514217B2 (ja) セグメントに分割されたマルチメディアコンテンツを受信するように構成されたクライアント端末によるネットワーク情報取得方法
WO2019128800A1 (zh) 一种内容服务的实现方法、装置及内容分发网络节点
US20140136644A1 (en) Data storage management in communications
US8817983B2 (en) Streaming video to cellular phones
WO2013029569A1 (en) A Generalized Dual-Mode Data Forwarding Plane for Information-Centric Network
WO2011054319A1 (zh) 一种在httpstreaming系统中实现分层请求内容的方法,装置和系统
EP3120519B1 (en) Method for operating a cache arranged along a transmission path between client terminals and at least one server, and corresponding cache
JP6538061B2 (ja) クライアント端末にマルチメディアコンテンツのコンテンツ部分を提供する方法及び対応するキャッシュ
WO2015058334A1 (zh) 流媒体资源的管理方法、服务器及客户端
WO2016106557A1 (zh) 一种用于视频发送的方法与装置
US20200128103A1 (en) Methods, network node and client device for acquisition and delivery of resources in a communications network
KR20130134911A (ko) 적응형 컨텐츠 제공을 위한 컨텐츠 캐싱 서비스 제공 방법 및 이를 위한 로컬 캐싱 장치
CN110036607B (zh) 用于在内容分发网络中动态汇集资源的方法和请求路由器
US20140108514A1 (en) Method, Device, and System for Judging User Request

Legal Events

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

Ref document number: 13895960

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13895960

Country of ref document: EP

Kind code of ref document: A1