CN112243136B - Content playing method, video storage method and device - Google Patents

Content playing method, video storage method and device Download PDF

Info

Publication number
CN112243136B
CN112243136B CN201910642018.4A CN201910642018A CN112243136B CN 112243136 B CN112243136 B CN 112243136B CN 201910642018 A CN201910642018 A CN 201910642018A CN 112243136 B CN112243136 B CN 112243136B
Authority
CN
China
Prior art keywords
video
hpd
index file
code rate
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910642018.4A
Other languages
Chinese (zh)
Other versions
CN112243136A (en
Inventor
舒继峰
王易风
余海江
徐舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang 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 China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910642018.4A priority Critical patent/CN112243136B/en
Publication of CN112243136A publication Critical patent/CN112243136A/en
Application granted granted Critical
Publication of CN112243136B publication Critical patent/CN112243136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64784Data processing by the network
    • H04N21/64792Controlling the complexity of the content stream, e.g. by dropping packets

Abstract

The embodiment of the invention relates to the technical field of content distribution networks, and discloses a content playing method, a video storage method and equipment, wherein the method comprises the following steps: receiving a video playing request sent by a user; when the video playing request is to play HPD video, acquiring an index file according to the playing request; acquiring video slice data according to the index file; splicing the video slices into HPD video in real time; and sending the HPD video to the user. By the mode, the embodiment of the invention can save network resources and reduce occupied storage space.

Description

Content playing method, video storage method and device
Technical Field
The embodiment of the invention relates to the technical field of content distribution networks, in particular to a content playing method, a video storage method and equipment.
Background
With the increase of network bandwidth and the development of a distributed file system, a CDN (Content Delivery Network ) system is further widely used as a system for caching video, audio, pictures and web pages in a network. In telecommunication networks, multimedia services such as IPTV (Internet Protocol Television, interactive network television), OTT TV (open internet video service) are being developed, and CDN systems play an increasingly important role.
In the process of implementing the embodiment of the invention, the inventor finds that the conventional service mechanisms in the conventional OTT TV are HPD (HTTP Progressive Download ) and HAS (HTTP Adaptive Streaming, HTTP adaptive streaming), when the content is injected, a user can determine whether the content is HPD content or HLS content, when the service is provided, the user can only provide the corresponding service on the corresponding scene and terminal, and can not provide two types of services for one content at the same time, if the same content needs to provide two types of services, the content must be released once in two ways, and the storage formats are different, so that the resource waste is caused.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a content playing method, a video storing method, an apparatus and a device, which overcome or at least partially solve the above problems.
According to an aspect of an embodiment of the present invention, there is provided a content playing method, including: receiving a video playing request sent by a user; when the video playing request is to play HPD video, acquiring an index file according to the playing request; acquiring video slice data according to the index file; splicing the video slices into HPD video in real time; and sending the HPD video to the user.
In an optional manner, after the receiving the video playing request sent by the user, the method further includes: when the video playing request is a streaming media playing request, acquiring an index file according to the playing request; acquiring video slice data according to the index file; and sending the video slice data to the user.
In an optional manner, the acquiring video slice data according to the index file includes: acquiring code rate information of a playing video according to the index file; and acquiring video slice data of the corresponding code rate according to the code rate information.
In an alternative, the method further comprises: receiving a code rate replacement request sent by a user; acquiring video slice data of a corresponding code rate according to the code rate replacement request; splicing the video slice data into HPD video in real time; and sending the HPD video to the user.
In an alternative, the method further comprises: determining a new video code rate according to the packet loss rate of the current network; acquiring video slice data of a corresponding code rate according to the new video code rate; splicing the video slice data into HPD video in real time; and sending the HPD video to the user.
According to another aspect of the embodiment of the present invention, there is provided a video file storage method, including: acquiring a video file; when the video file is an HPD video file, performing video slicing processing on the HPD video file according to preset video slicing time length; generating an index file according to the video clips; and storing the HPD video file as a video fragment and a corresponding index file.
In an alternative manner, the index file includes playback rate information of its corresponding video clip.
According to another aspect of an embodiment of the present invention, there is provided a video playback apparatus including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the video playing method.
According to another aspect of an embodiment of the present invention, there is provided a video storage device including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the video storage method.
According to still another aspect of the embodiments of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, where the executable instruction causes the processor to perform an operation corresponding to the above-mentioned one video playing method, or causes the processor to perform an operation corresponding to the above-mentioned one video storing method.
According to the embodiment of the invention, the type of the played video is judged and the index file is acquired through the video playing request sent by the user. When the type of the play video is HPD video, video slice data are acquired according to the index file, and are spliced into HPD video, and the HPD video is returned to the client. Through the mode, the embodiment of the invention realizes the content of the same video slice data, and can be simultaneously applicable to two service scenes of HAS and HPD. Therefore, the server only needs to store one content, so that node resources are saved, and the storage space of the server is occupied less.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present invention can be more clearly understood, and the following specific embodiments of the present invention are given for clarity and understanding.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
fig. 1 shows a flowchart of a video playing method according to an embodiment of the present invention;
fig. 2 shows a schematic diagram of a video playing method according to an embodiment of the present invention;
fig. 3 is a flowchart of a video playing method according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a video playing method according to another embodiment of the present invention;
fig. 5 is a flowchart of a video playing method according to another embodiment of the present invention;
fig. 6 is a schematic diagram of a video playing method according to another embodiment of the present invention;
fig. 7 is a flowchart of a video playing method according to still another embodiment of the present invention;
fig. 8 shows a flowchart of a video storage method according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a video storage method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a video playing device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a video storage device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a video playing device according to an embodiment of the present invention.
Fig. 13 is a schematic structural diagram of a video storage device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Currently, OTT TV mainly HAS two implementations of HPD and HAS, and conventional OTT TV generally adopts HPD technology. The HPD-based client only needs to wait a short period of time for downloading and buffering the forefront part of the data of the media file before starting playing, and then can play while downloading. However, HPD technology has a number of limitations, including: the method is not suitable for transmitting live programs with high real-time requirements; the waiting time delay of the initial play is generally longer; when the network bandwidth is unstable, the screen blocking phenomenon is easy to occur; since the client can continue to download video files, when the user gives up watching a program halfway, it can result in wastage of downloaded files (consuming bandwidth).
To overcome the limitations of HPD technology, HAS-based OTT TV technology is increasingly being widely adopted and popularized by the industry. The HAS technique adopts video slicing and adaptive code rate techniques. In the HAS system, a media stream splitter splits the video stream output by an encoder into a series of consecutive small fragmented files of equal length and stores them in a Web content distribution server. The HAS client device may automatically request a fragmented file of appropriate video quality (i.e., different resolution and code rate) from the Web server based on available bandwidth, thereby giving the user the best visual experience.
However, the series of continuous, equally-sized small fragmented files, i.e., video slice data, can only serve HAS client devices, but cannot serve HPD client devices. If the HPD client device is to be serviced, the video content must be stored again in HPD format as HPD content. Storing the same video content twice can occupy network resources while wasting storage space of the Web content distribution server. In addition, the traditional HPD content is stored as a complete large file, the whole file needs to be downloaded again under the condition of fragment loss, and the storage of the HPD large file cannot well utilize the advantages of cloud storage and is stored in different storage systems in a distributed mode. Therefore, the embodiment of the invention provides a video playing method, so that video slice data can also provide services for HPD client equipment.
Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 shows a flowchart of a video playing method according to an embodiment of the present invention, where the method includes the following steps:
step S110: and receiving a video playing request sent by a user.
In this step, the video play request contains a key information content ID and a user ID. As shown in fig. 2, after receiving a video playing request sent by a user, i.e., a client, the CDN user server determines whether the request is an HPD video playing request or a streaming media (HAS) playing request according to a key information content ID in the video playing request.
Step S120: and when the video playing request is to play the HPD video, acquiring an index file according to the playing request.
With continued reference to fig. 2, when the CDN user server determines that the video play request is to play the HPD video, the CDN user server may continue to send the video play request to the content module. After receiving the video playing request, the content module downloads an index file corresponding to the video content from the cloud storage space according to the information of the video content to be played by the user in the video playing request, returns the corresponding index file to the CDN user server, and stores the index file in the CDN user server.
Step S130: and acquiring video slice data according to the index file.
With continued reference to fig. 2, after receiving the corresponding index file, the cdn user server sends a request for acquiring video slice data to the content module according to the download address in the index file and the order of the index file. And then, the content module sequentially downloads video slice data from the cloud storage space according to the sequence of the index file, namely the time sequence of video content playing, and returns the video slice data to the CDN user server. Wherein the video slice data is a series of continuous, equally-sized small slice files of size typically around 10 seconds, divided by the complete video content.
Specifically, the manner in which the content module downloads video slice data from the cloud storage space according to the index file may be: acquiring code rate information of a playing video according to the index file; and acquiring video slice data of the corresponding code rate according to the code rate information.
The index files comprise a primary index file and a secondary index file. The primary index file stores code rate information of the played video and a download address of a video file (secondary index file) corresponding to each code rate. The secondary index file stores the download address of the video slice data with the same code rate. The content module selects a secondary index file corresponding to the code rate from the primary index file according to a preset default code rate, and downloads corresponding video slice data from the cloud storage space through a download address in the secondary index file.
Step S140: and splicing the video slices into HPD video in real time.
Step S150: and sending the HPD video to the user.
With continued reference to fig. 2, when the CDN user server receives the video slice data, the CDN user server splices the video slice data according to the downloading order and splices the video slice data into an HPD video, because the video slice data cannot directly provide services for the HPD client device. And then returning the HPD video to the client for the user to watch the video. While the user watches the video, the CDN user server can continuously splice the video slice data downloaded subsequently, so that the effect of real-time splicing is achieved.
According to the embodiment of the invention, the type of the played video is judged and the index file is acquired through the video playing request sent by the user. When the type of the play video is HPD video, video slice data are acquired according to the index file, and are spliced into HPD video, and the HPD video is returned to the client. Through the mode, the embodiment of the invention realizes the content of the same video slice data, and can be simultaneously applicable to two service scenes of HAS and HPD. Therefore, the server only needs to store one content, so that node resources are saved, and the storage space of the server is occupied less.
Referring to fig. 3, fig. 3 is a flowchart illustrating a video playing method according to another embodiment of the present invention, and the difference between the present embodiment and the above embodiment is that, after step S110, the method further includes:
step S210: and when the video playing request is a streaming media playing request, acquiring an index file according to the playing request.
Step S220: and acquiring video slice data according to the index file.
Step S230: and sending the video slice data to the user.
As shown in fig. 4, when the CDN user server determines that the video play request is a streaming media play request, the CDN user server also continues to send the video play request to the content module as in the above embodiment. The content module also downloads the index file from the cloud storage space and returns the index file to the CDN user server. However, after receiving the index file, the CDN user server returns the index file to the client, where the client selects video slice data of a suitable quality (i.e., different resolutions and code rates) according to the current network situation. The client can select a proper code rate according to the content of the primary index file in the index files, and determine the secondary index file corresponding to the code rate. The client may then send a video slice data acquisition request to the CDN user server based on the secondary index file. The CDN user server forwards the request to the content module, and the content module downloads corresponding video slice data from the cloud storage space according to the download address in the secondary index file determined by the client and returns the video slice data to the CDN user server.
In addition, contrary to the above embodiments, the CDN user server returns the video slicing data to the client immediately after receiving the video slicing data, so that the user can directly watch the video slicing data. While watching, the client side also always sends a video playing request so as to ensure that the client side can continuously receive video slice data.
Referring to fig. 5, fig. 5 shows a flowchart of a video playing method according to another embodiment of the present invention, and the difference between the present embodiment and the above embodiment is that the method further includes:
step S310: and receiving a code rate replacement request sent by a user.
As shown in fig. 6, the user selects a new code rate according to the current network condition to obtain a proper video quality, and sends a code rate replacement request to the CDN user server through the client.
Step S320: and acquiring video slice data of the corresponding code rate according to the code rate replacement request.
After receiving the code rate replacement request, the CDN user server selects a secondary index file corresponding to the new code rate from index files stored in the CDN user server according to the new code rate in the code rate replacement request, and then sends a new code rate video slice data acquisition request to the content module according to the secondary index file. And after receiving the request, the content module downloads the corresponding video slice data from the cloud storage space according to the download address in the secondary index file and returns the video slice data to the CDN user server.
Step S330: and splicing the video slice data into HPD video in real time.
Step S340: and sending the HPD video to the user.
As in step S140 and step S150, the CDN user server will splice the video slice data into an HPD video before sending the HPD video to the client for viewing by the user.
Because the HPD technology has no code rate self-adaption function, the embodiment of the invention replaces the original video slice data with the code rate video slice data required by the user through the code rate replacement request initiated by the user, and splices the video slice data into the HPD video so as to provide service for the HPD client device and promote the user experience of the HPD client device.
Referring to fig. 7, fig. 7 is a flowchart illustrating a video playing method according to still another embodiment of the present invention, where the method further includes:
step S410: and determining a new video code rate according to the packet loss rate of the current network.
Step S420: and acquiring video slice data of the corresponding code rate according to the new video code rate.
Step S430: and splicing the video slice data into HPD video in real time.
Step S440: and sending the HPD video to the user.
With continued reference to fig. 6, the cdn user server may also determine a new video code rate according to a packet loss rate of the current network, i.e., the current network quality. As in the above embodiment, after the CDN user server determines the new video code rate, a secondary index file corresponding to the new code rate is also selected from the index files stored in the CDN user server, and then a new code rate video slice data acquisition request is sent to the content module according to the secondary index file. And after receiving the request, the content module downloads the corresponding video slice data from the cloud storage space according to the download address in the secondary index file and returns the video slice data to the CDN user server. Similarly, as in step S140 and step S150, the CDN user server will splice the video slice data into HPD video before sending the HPD video to the client for viewing by the user.
According to the embodiment of the invention, the code rate is automatically adjusted through the CDN user server, the original video slice data is replaced by the video slice data with the code rate suitable for the current network condition, and the video slice data is spliced into the HPD video, so that service is provided for the HPD client device, and the user of the HPD client device and the user of the HAS client device have the same experience.
Referring to fig. 8, an embodiment of the present invention further provides a video storage method, as shown in fig. 8, including:
step S510: and acquiring a video file.
As shown in fig. 9, the client sends a video cache request to the content module through the CDN management platform, and the content module downloads a video file from the source station after receiving the request, and determines whether the video file is an HPD video file or a HAS video file. The source station is a server of a video website accessed by the client, and stores all video files contained in the video website.
Step S520: when the video file is an HPD video file, performing video slicing processing on the HPD video file according to preset video slicing time.
With continued reference to fig. 9, after the content module determines that the video file is an HPD video file, the video file is divided into a series of video clips with the same duration according to the preset transcoding code rate of the video clip duration, and the video clips are stored with different code rates, and are converted into each preset transcoding code rate and respectively stored in the cloud storage space. For example, the pre-set transcoding rates are a, b, and c, and the series of video slices are stored as a1-an, b1-bn, and c1-cn, respectively.
Step S530: and generating an index file according to the video fragments.
The content module generates a video fragment and generates a corresponding index file according to the video fragment. The index file comprises the playing code rate information of the corresponding video clips. The content module generates a plurality of secondary index files according to the code rate of each video fragment, wherein each secondary index file comprises the download addresses of all video fragments on the cloud storage space under a code rate. The download addresses of the secondary index files and the corresponding code rates form a primary index file. For example, the video slices generated in the above steps have video slices a1-an with a code rate a, video slices b1-bn with a code rate b, and video slices c1-cn with a code rate c. The download addresses of the video clips a1-an are stored in the secondary index file A, the download addresses of the video clips B1-bn are stored in the secondary index file B, and the download addresses of the video clips C1-cn are stored in the secondary index file C. The download address of the secondary index file A on the cloud storage space and the code rate a corresponding to the download address, the download address of the secondary index file B on the cloud storage space and the download address of the secondary index file B and the download address of the secondary index file C on the cloud storage space and the code rate C corresponding to the download address are stored in the primary index file. The primary index file and the secondary index file together form the index file.
Step S540: and storing the HPD video file as a video fragment and a corresponding index file.
In the step, the content module firstly stores the HPD video file in the cloud storage space; generating a secondary index file according to the download address of the HPD video file in the cloud storage space, and storing the secondary index file in the cloud storage space; and finally, generating a primary index file according to the download address of the secondary index file in the cloud storage space, and storing the primary index file in the cloud storage space.
Then, when the HPD user needs to watch the video file, the HPD user can splice the video fragments into HPD video. When the HAS user needs to watch the video file, the content module does not need to download the new video file again, but can directly use the video clip.
In some embodiments, the content module may send various status information (including successful storage of the video file or successful storage of the index file) to the CDN management platform, and then the content module is sent to the client by the CDN management platform, so that the user can understand the storage progress, and user experience is improved.
The embodiment of the invention divides the HPD video file into video fragments, so that the video file can be simultaneously suitable for HPD users and HAS users. Therefore, only the divided HPD video files need to be stored in the cloud storage space, so that the storage space is greatly saved, and network resources for downloading the video files are also saved.
Fig. 10 is a schematic structural diagram of a video playing device according to an embodiment of the present invention. As shown in fig. 7, the apparatus 100 includes: the video slice data processing device comprises a first receiving module 101, an index file obtaining module 102, a video slice data obtaining module 103, a first splicing module 104 and a first sending module 105.
The first receiving module 101: the method comprises the steps of receiving a video playing request sent by a user; index file acquisition module 102: when the video playing request is to play HPD video, the user acquires an index file according to the playing request; video slice data acquisition module 103: the video slice data are acquired according to the index file; the first splicing module 104: the video slice is spliced into HPD video in real time; the first transmitting module 105: for transmitting the HPD video to the user.
In an alternative manner, the video playing device 100 further includes: a first acquisition module 106, a second acquisition module 107 and a second transmission module 108.
A first obtaining module 106, configured to obtain an index file according to the play request when the video play request is a streaming media play request; a second obtaining module 107, configured to obtain video slice data according to the index file; and a second sending module 108, configured to send the video slice data to the user.
In an alternative manner, the video slice data obtaining module 103 specifically includes: acquiring code rate information of a playing video according to the index file; and acquiring video slice data of the corresponding code rate according to the code rate information.
In an alternative manner, the video playing device 100 further includes: a second receiving module 109, a third obtaining module 110, a second splicing module 111 and a third sending module 112.
A second receiving module 109, configured to receive a code rate replacement request sent by a user; a third obtaining module 110, configured to obtain video slice data of a corresponding code rate according to the code rate replacement request; a second splicing module 111, configured to splice the video slice data into HPD video in real time; and a third sending module 112, configured to send the HPD video to the user.
In an alternative manner, the video playing device 100 further includes: a determining module 113, a fourth obtaining module 114, a third splicing module 115 and a fourth splicing module 116.
A determining module 113, configured to determine a new video code rate according to a packet loss rate of the current network; a fourth obtaining module 114, configured to obtain video slice data of a corresponding code rate according to the new video code rate; a third splicing module 115, configured to splice the video slice data into HPD video in real time; and a fourth splicing module 116, configured to send the HPD video to the user.
According to the embodiment of the invention, the first receiving module 101 receives the video playing request sent by the user, judges the type of the played video and acquires the index file. When the type of the played video is HPD video, the video slice data is acquired by the video slice data acquisition module 103 according to the index file, and spliced into HPD video by the first splicing module 104, and returned to the client. Through the mode, the embodiment of the invention realizes the content of the same video slice data, and can be simultaneously applicable to two service scenes of HAS and HPD. Therefore, the server only needs to store one content, so that node resources are saved, and the storage space of the server is occupied less.
The embodiment of the invention provides a non-volatile computer storage medium, which stores at least one executable instruction, and the computer executable instruction can execute the video playing method or the video storage method in any of the method embodiments.
Fig. 11 is a schematic structural diagram of a video storage device according to an embodiment of the present invention. As shown in fig. 9, the apparatus 200 includes a video file receiving module 201, a video slicing module 202, an index file generating module 203, and a storage module 204.
Video file receiving module 201: the method comprises the steps of obtaining a video file; video slicing module 202: when the video file is an HPD video file, performing video slicing processing on the HPD video file according to preset video slicing time length; index file generation module 203: the method comprises the steps of generating an index file according to the video clips; the storage module 204: and storing the HPD video file as a video slice and a corresponding index file.
In an alternative manner, the index file includes playback rate information of its corresponding video clip.
The embodiment of the invention divides the HPD video file into video fragments through the video fragmentation module 202, so that the video file can be simultaneously applied to HPD users and HAS users. Therefore, only the divided HPD video files need to be stored in the cloud storage space, so that the storage space is greatly saved, and network resources for downloading the video files are also saved.
Fig. 12 is a schematic structural diagram of a video playing device according to an embodiment of the present invention, and the specific embodiment of the present invention is not limited to the specific implementation of the device.
As shown in fig. 12, the video playback device may include: a processor (processor) 302, a communication interface (Communications Interface) 304, a memory (memory) 306, and a communication bus 303.
Wherein: processor 302, communication interface 304, and memory 306 perform communication with each other via communication bus 303. A communication interface 304 for communicating with network elements of other devices, such as clients or other servers. The processor 302 is configured to execute the program 310, and may specifically perform relevant steps in the above-described video playing method embodiment.
In particular, program 310 may include program code including computer-operating instructions.
The processor 302 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the video playback device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 306 for storing programs 310. Memory 306 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Program 310 may be specifically operable to cause processor 302 to:
receiving a video playing request sent by a user;
when the video playing request is to play HPD video, acquiring an index file according to the playing request;
acquiring video slice data according to the index file;
splicing the video slices into HPD video in real time;
and sending the HPD video to the user.
In an alternative, program 310 may be specifically further configured to cause processor 302 to:
when the video playing request is a streaming media playing request, acquiring an index file according to the playing request;
acquiring video slice data according to the index file;
and sending the video slice data to the user.
In an alternative, program 310 may be specifically further configured to cause processor 302 to:
acquiring code rate information of a playing video according to the index file;
and acquiring video slice data of the corresponding code rate according to the code rate information.
In an alternative, program 310 may be specifically further configured to cause processor 302 to:
receiving a code rate replacement request sent by a user;
acquiring video slice data of a corresponding code rate according to the code rate replacement request;
splicing the video slice data into HPD video in real time;
and sending the HPD video to the user.
In an alternative, program 310 may be specifically further configured to cause processor 302 to:
determining a new video code rate according to the packet loss rate of the current network;
acquiring video slice data of a corresponding code rate according to the new video code rate;
splicing the video slice data into HPD video in real time;
and sending the HPD video to the user.
According to the embodiment of the invention, the type of the played video is judged and the index file is acquired through the video playing request sent by the user. When the type of the play video is HPD video, video slice data are acquired according to the index file, and are spliced into HPD video, and the HPD video is returned to the client. Through the mode, the embodiment of the invention realizes the content of the same video slice data, and can be simultaneously applicable to two service scenes of HAS and HPD. Therefore, the server only needs to store one content, so that node resources are saved, and the storage space of the server is occupied less.
As shown in fig. 13, the video playback device may include: a processor 402, a communication interface (Communications Interface) 404, a memory 406, and a communication bus 403.
Wherein: processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 403. A communication interface 404 for communicating with network elements of other devices, such as clients or other servers. The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the above-described video playing method embodiment.
In particular, program 410 may include program code including computer-operating instructions.
The processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the video playback device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
Memory 406 for storing programs 410. Memory 406 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Program 410 may be specifically operable to cause processor 402 to:
acquiring a video file;
when the video file is an HPD video file, performing video slicing processing on the HPD video file according to preset video slicing time length;
generating an index file according to the video clips;
and storing the HPD video file as a video fragment and a corresponding index file.
The embodiment of the invention divides the HPD video file into video fragments, so that the video file can be simultaneously suitable for HPD users and HAS users. Therefore, only the divided HPD video files need to be stored in the cloud storage space, so that the storage space is greatly saved, and network resources for downloading the video files are also saved.
The embodiment of the invention provides an executable program, which can execute the video playing method or the video storing method in any of the method embodiments.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It will be appreciated that the teachings of the present invention described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present invention.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specifically stated.

Claims (7)

1. A video playing method, comprising:
receiving a video playing request sent by a user;
when the video playing request is to play HPD video, acquiring an index file according to the playing request; the index file comprises a primary index file and a secondary index file; the primary index file stores code rate information of a playing video and a downloading address of a video file corresponding to each code rate; the secondary index file stores the download address of video slice data with the same code rate;
acquiring code rate information of a playing video according to the index file and a code rate replacement request sent by the user;
acquiring video slice data of a corresponding code rate according to the code rate information;
splicing the video slices into HPD video in real time;
and sending the HPD video to the user.
2. The video playing method according to claim 1, wherein after receiving the video playing request sent by the user, the method further comprises:
when the video playing request is a streaming media playing request, acquiring an index file according to the playing request;
acquiring video slice data according to the index file;
and sending the video slice data to the user.
3. The video playback method of claim 1, the method further comprising:
determining a new video code rate according to the packet loss rate of the current network;
acquiring video slice data of a corresponding code rate according to the new video code rate;
splicing the video slice data into HPD video in real time;
and sending the HPD video to the user.
4. A video storage method, comprising:
acquiring a video file;
when the video file is an HPD video file, performing video slicing processing on the HPD video file according to preset video slicing time length;
generating an index file according to the video clips; the index file comprises a primary index file and a secondary index file; the primary index file stores code rate information of a playing video and a downloading address of a video file corresponding to each code rate; the secondary index file stores the download address of video slice data with the same code rate;
storing the HPD video file as a video fragment and a corresponding index file;
receiving a video playing request sent by a user;
when the video playing request is to play HPD video, acquiring the index file according to the playing request;
acquiring code rate information of a playing video according to the index file and a code rate replacement request sent by the user;
acquiring video slice data of a corresponding code rate according to the code rate information;
splicing the video slices into HPD video in real time;
and sending the HPD video to the user.
5. A video playback device comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform the video playing method according to any one of claims 1-3.
6. A video storage device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform the video storage method of any of claims 4.
7. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform the video playing method of any one of claims 1-3 or for causing a processor to perform the video storage method of any one of claim 4.
CN201910642018.4A 2019-07-16 2019-07-16 Content playing method, video storage method and device Active CN112243136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910642018.4A CN112243136B (en) 2019-07-16 2019-07-16 Content playing method, video storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910642018.4A CN112243136B (en) 2019-07-16 2019-07-16 Content playing method, video storage method and device

Publications (2)

Publication Number Publication Date
CN112243136A CN112243136A (en) 2021-01-19
CN112243136B true CN112243136B (en) 2023-06-30

Family

ID=74167033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910642018.4A Active CN112243136B (en) 2019-07-16 2019-07-16 Content playing method, video storage method and device

Country Status (1)

Country Link
CN (1) CN112243136B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114025201A (en) * 2021-10-29 2022-02-08 恒安嘉新(北京)科技股份公司 Video playing method, device, equipment and storage medium
CN114401441B (en) * 2022-01-12 2024-04-02 深圳市酷开网络科技股份有限公司 Short video play processing method and device, intelligent terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012171507A1 (en) * 2011-06-16 2012-12-20 华为技术有限公司 Method and device for transmitting data file to client
CN103024603A (en) * 2012-12-27 2013-04-03 合一网络技术(北京)有限公司 Device and method used for solving short-time pause during network video playing
CN106331763A (en) * 2016-09-12 2017-01-11 北京小度互娱科技有限公司 Method of playing slicing media files seamlessly and device of realizing the method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118428B (en) * 2010-12-29 2012-12-26 天脉聚源(北京)传媒科技有限公司 Method and system for playing streaming media
CN105657466A (en) * 2014-12-04 2016-06-08 中国移动通信集团公司 Video playing method and apparatus
CN104796796B (en) * 2015-04-21 2018-03-16 范文鲜 Improve the fault-tolerant method of the HLS streaming players of Android platform
CN105491397B (en) * 2015-12-01 2019-02-22 深圳市福云明网络科技有限公司 The method pushed in real time based on the video that UDT agreement and TS slice combine
CN108271039B (en) * 2016-12-30 2021-11-12 中兴通讯股份有限公司 File sending method and device
CN107566851B (en) * 2017-09-05 2020-07-03 成都索贝数码科技股份有限公司 Video slice storage method and system applied to media data access

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012171507A1 (en) * 2011-06-16 2012-12-20 华为技术有限公司 Method and device for transmitting data file to client
CN103024603A (en) * 2012-12-27 2013-04-03 合一网络技术(北京)有限公司 Device and method used for solving short-time pause during network video playing
CN106331763A (en) * 2016-09-12 2017-01-11 北京小度互娱科技有限公司 Method of playing slicing media files seamlessly and device of realizing the method

Also Published As

Publication number Publication date
CN112243136A (en) 2021-01-19

Similar Documents

Publication Publication Date Title
US10764623B2 (en) Method and system for media adaption
US10616301B2 (en) Request-based encoding for streaming content portions
CN110933517B (en) Code rate switching method, client and computer readable storage medium
CN108063769B (en) Method and device for realizing content service and content distribution network node
US10432690B1 (en) Manifest partitioning
US20080160911A1 (en) P2P-based broadcast system and method using the same
EP2493191B1 (en) Method, device and system for realizing hierarchically requesting content in http streaming system
CN108810657B (en) Method and system for setting video cover
CA2840106A1 (en) Offline download method, multimedia file download method and system thereof
US10104143B1 (en) Manifest segmentation
US9356985B2 (en) Streaming video to cellular phones
CN113141522B (en) Resource transmission method, device, computer equipment and storage medium
US10116719B1 (en) Customized dash manifest
CN107920258B (en) Data processing method and device
CN111447455A (en) Live video stream playback processing method and device and computing equipment
CN112104885B (en) System and method for accelerating M3U8 initial playing speed in live broadcasting
CN103747285A (en) Program playing method, server side and client
CN112243136B (en) Content playing method, video storage method and device
CN113727199A (en) HLS slice rapid playing starting method
CN106331763B (en) Method for seamlessly playing fragmented media file and device for implementing method
EP2538629A1 (en) Content delivering method
US20150026711A1 (en) Method and apparatus for video content distribution
WO2016110324A1 (en) An improved method and apparatus for trick-play in abr streaming
CN116527992A (en) Video playing resolution switching method and device
CN115914670A (en) Live broadcast playback processing method and device and storage medium

Legal Events

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