WO2017035786A1 - Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu - Google Patents

Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu Download PDF

Info

Publication number
WO2017035786A1
WO2017035786A1 PCT/CN2015/088765 CN2015088765W WO2017035786A1 WO 2017035786 A1 WO2017035786 A1 WO 2017035786A1 CN 2015088765 W CN2015088765 W CN 2015088765W WO 2017035786 A1 WO2017035786 A1 WO 2017035786A1
Authority
WO
WIPO (PCT)
Prior art keywords
data block
file
streaming media
data
server
Prior art date
Application number
PCT/CN2015/088765
Other languages
English (en)
Chinese (zh)
Inventor
周逻理
Original Assignee
深圳好视网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳好视网络科技有限公司 filed Critical 深圳好视网络科技有限公司
Priority to PCT/CN2015/088765 priority Critical patent/WO2017035786A1/fr
Publication of WO2017035786A1 publication Critical patent/WO2017035786A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received

Definitions

  • the invention belongs to the field of the Internet, and in particular relates to a method, device and system for playing and verifying streaming media files.
  • the currently used streaming media protocols mainly include HTTP progressive download and RTSP/RTP-based.
  • Real-time streaming protocol mainly include HTTP progressive download and RTSP/RTP-based.
  • HTTP progressive download mainly include HTTP progressive download and RTSP/RTP-based.
  • Real-time streaming protocol mainly include HTTP progressive download and RTSP/RTP-based.
  • HTTP Live Streaming is a method of using the more typical HTTP progressive download.
  • the encoder compresses and encodes the collected audio and video data into an audio/video elementary stream conforming to a specific standard, and can also use the encoded file.
  • the files after the encoding is complete must be H.264 video and AAC audio.
  • the encoded video and audio are then packaged into an MPEG TS format.
  • the encapsulated MPEGTS is stream-divided to split the MPEG transport stream into a plurality of ts. Fragmentation of the file.
  • the segmentation process usually divides the slice by time, for example, it is divided into one slice for 10s duration, and if the code stream is high, the slice can be divided into 5 segments.
  • Second. And generate an index file (suffix m3u8) containing pointers to these small TS fragments, and put the index file and the cut TS fragments into a common WEB server.
  • the index and the slice are downloaded through the standard HTTP protocol, and the video can be clicked or broadcasted. Since the data is transmitted through the HTTP protocol, there is no firewall or proxy problem, and the segment file is in the HLS technology. The duration is very short, and the client can quickly select and switch the bit rate to accommodate playback under different bandwidth conditions.
  • the current HLS playback technology is usually used for data transfer between a single server and a client. If the data on the server is damaged, it will affect the video playback quality of all clients.
  • the currently used streaming media protocols mainly include HTTP progressive download and RTSP/RTP-based.
  • Real-time streaming protocol mainly include HTTP progressive download and RTSP/RTP-based.
  • HTTP progressive download mainly include HTTP progressive download and RTSP/RTP-based.
  • Real-time streaming protocol mainly include HTTP progressive download and RTSP/RTP-based.
  • HTTP Live Streaming is a method of using the more typical HTTP progressive download.
  • the encoder compresses and encodes the collected audio and video data into an audio/video elementary stream conforming to a specific standard, and can also use the encoded file.
  • the files after the encoding is complete must be H.264 video and AAC audio.
  • the encoded video and audio are then packaged into an MPEG TS format.
  • the encapsulated MPEGTS is stream-divided to split the MPEG transport stream into a plurality of ts. Fragmentation of the file.
  • the segmentation process usually divides the slice by time, for example, it is divided into one slice for 10s duration, and if the code stream is high, the slice can be divided into 5 segments.
  • Second. And generate an index file (suffix m3u8) containing pointers to these small TS fragments, and put the index file and the cut TS fragments into a common WEB server.
  • the index and the slice are downloaded through the standard HTTP protocol, and the video can be clicked or broadcasted. Since the data is transmitted through the HTTP protocol, there is no firewall or proxy problem, and the segment file is in the HLS technology. The duration is very short, and the client can quickly select and switch the bit rate to accommodate playback under different bandwidth conditions.
  • the current HLS playback technology is usually used for data transfer between a single server and a client. If the data on the server is damaged, it will affect the video playback quality of all clients.
  • an embodiment of the present invention provides a method for playing and verifying a streaming media file, where the method includes:
  • the data block whose check information does not match is downloaded to the check server.
  • the Obtaining a merged file generated after the streaming media fragmentation according to the HLS technology, and cutting the preset size of the merged file license into a plurality of data blocks, and including, in each data block, a sequence number corresponding to the data block and a verification information step specific include:
  • the merged file is sequentially cut according to a preset size to obtain a plurality of data blocks, where the data block includes a serial number corresponding to the data block and corresponding verification information.
  • the method further includes:
  • the shards are formed according to the acquired data blocks, and are sent to the player for playback.
  • the step of storing the data block to the calibration server and the plurality of P2P servers includes:
  • a partial data block or all data blocks of the streaming media file are stored in a plurality of P2P servers, and all data blocks of the streaming media files are stored in a correction server.
  • the step of the P2P client downloading a data block from the P2P server includes:
  • the data block download task of the corresponding size is allocated to each P2P server, and the data block is downloaded according to the allocated download task.
  • the method Before the step of acquiring the merged file generated after the streaming media is fragmented according to the HLS technology, the method further includes:
  • the encoder Encoding the video, the encoder encodes the collected video data into a video of H.264 format, and encodes the collected audio data into audio of ACC format;
  • the encoded video and audio are packaged into a streaming media file in MPEG format.
  • an embodiment of the present invention provides a playback verification device for a streaming media file, where the device includes:
  • a streaming media file cutting unit configured to acquire a merged file generated after the streaming media fragmentation according to the HLS technology, and cut the preset size of the merged file license into a plurality of data blocks, and include the data block corresponding to each data block.
  • a data block storage unit configured to store the data block to a calibration server and a plurality of P2P servers;
  • a first downloading unit configured to download, by the P2P client, the data block from the P2P server according to the sequence number of the data block;
  • a check unit configured to calculate a check value for the downloaded data block, and determine whether the calculated check value matches the check information stored in the data block;
  • a second downloading unit configured to: if the check value does not match the verification information stored in the data block, download a data block that does not match the verification information to the verification server.
  • the streaming media file cutting unit specifically includes:
  • a first segmentation subunit configured to acquire a streaming media file, and divide the streaming media file according to a preset duration, to obtain a plurality of fragments corresponding to the streaming media file, and an offset including the fragmentation And an index file pointing to the pointer of the shard;
  • a merging sub-unit configured to merge the index file with the shard that is divided by the streaming media file to generate a merged file
  • the second segmentation sub-unit is configured to sequentially cut the merged file according to a preset size to obtain a plurality of data blocks, where the data block includes a sequence number corresponding to the data block and corresponding verification information.
  • the device further includes:
  • An index file generating unit configured to generate an index file according to the obtained data block if the check value matches the check information stored in the data block;
  • a data block obtaining unit configured to calculate and acquire a data block corresponding to the fragment according to the fragment pointed by the pointer in the index file, and the size of the data block and the offset of the fragment;
  • the slice sending and playing unit is configured to form a slice according to the acquired data block, and send it to the player for playing.
  • the data storage unit is specifically configured to:
  • a partial data block or all data blocks of the streaming media file are stored in a plurality of P2P servers, and all data blocks of the streaming media files are stored in a correction server.
  • the first downloading unit includes:
  • a communication speed information obtaining subunit configured to acquire communication speed information between the P2P client and the plurality of P2P servers
  • a task allocation subunit configured to allocate a data block download task of a corresponding size to each P2P server according to the communication speed information between the P2P client and the plurality of P2P servers, and perform data block according to the allocated download task. download.
  • the method further includes:
  • a coding unit configured to encode the video, and encode the collected video data into a video of H.264 format, and encode the collected audio data into audio of ACC format;
  • a closed unit for encapsulating the encoded video and audio into a streaming media file in MPEG format A closed unit for encapsulating the encoded video and audio into a streaming media file in MPEG format.
  • an embodiment of the present invention provides a playback verification system for a streaming media file, where the playback verification system includes:
  • the P2P server is configured to store the cut data block, where the data block includes a sequence number corresponding to the data block, where the file to be cut is a segment after the segmentation of the streaming media file and an index corresponding to the segment a file after the file is merged, the index file includes an offset of the slice and a pointer to the slice;
  • the verification server stores all the data blocks after the stream media file is cut, and the data block includes a sequence number corresponding to the data block, wherein the file to be cut is a segmentation of the stream media file and the segmentation a merged file of the index file corresponding to the fragment, where the index file includes an offset of the fragment and a pointer to the fragment;
  • the P2P client is configured to obtain a data block from one or more P2P servers, calculate a check value for the obtained data block, and determine whether the calculated check value matches the check information stored in the data block. If the check value does not match the verification information stored in the data block, downloading a data block whose verification information does not match to the verification server, and obtaining an index file according to the serial number of the downloaded verified data block, The index file is parsed to obtain the size of the fragment of the streaming media file to be played and the data block to be read, and the downloaded data block is sent to the player for playback.
  • the streaming media file is cut into a plurality of data blocks according to a preset size, and then the data blocks are stored in a plurality of P2P servers, and since each data block includes a corresponding data block number, the P2P
  • the client can download the required data block from different P2P servers according to the sequence number of the data block, and perform verification according to the verification information in the data block.
  • the server re-downloads, so that the data in the P2P server is damaged, the undamaged data can be automatically verified and downloaded, thereby improving the quality of the playback.
  • FIG. 1 is a flowchart showing an implementation process of a playback verification method for a streaming media file according to a first embodiment of the present invention
  • FIG. 2 is a flowchart showing an implementation process of a method for generating a merged file according to a second embodiment of the present invention
  • FIG. 3 is a flowchart of implementing a method for playing a streaming media file according to a third embodiment of the present invention.
  • FIG. 4 is a flowchart showing an implementation process of a playback verification method for a streaming media file according to a fourth embodiment of the present invention.
  • FIG. 5 is a flowchart of an implementation process of a playback verification method for a streaming media file according to a fifth embodiment of the present invention.
  • FIG. 6 is a flowchart showing an implementation process of a playback verification method for a streaming media file according to a sixth embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a playback verification device for a streaming media file according to a seventh embodiment of the present invention.
  • the purpose of the embodiment of the present invention is to solve the problem of data transmission between a single server and a client when using the HLS technology for video playback in the prior art. If the data on the server is damaged, the video playback of all the clients will be affected. quality.
  • the present invention cuts a streaming media file into a plurality of data blocks according to a preset size, and then stores the data blocks in a plurality of P2P servers, since each data block includes a corresponding data block serial number. Therefore, the P2P client can download the required data block from different P2P servers according to the sequence number of the data block, and perform verification according to the verification information in the data block, and cannot pass the verification when the data block is damaged, and When the data is re-downloaded in the verification server, so that the data in the P2P server is damaged, the undamaged data can be automatically verified and downloaded, thereby improving the quality of the playback.
  • the details will be described below with reference to the drawings.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • FIG. 1 is a flowchart showing an implementation process of a method for storing a streaming media file according to a first embodiment of the present invention, which is described in detail as follows:
  • step S101 the merge file generated after the streaming media fragmentation according to the HLS technology is acquired, and the preset file license preset size is cut into a plurality of data blocks, and the data sequence corresponding to the data block is included in each data block. Verify the information.
  • the streaming media file obtained in the embodiment of the present invention is used for storing in a P2P server for downloading by the P2P client.
  • the streaming file fragment file and the index file are set in the same server. If the fragment file is damaged, if the file cannot be repaired effectively, all the client downloads the damaged fragment file. Playback will affect the playback quality of streaming media files.
  • the present invention proposes to further cut the merged file after the streaming media file fragmentation by the HLS technology, generate a plurality of data blocks, and include the sequence number of the data block and the verification information in each data block.
  • sequence numbers of the data blocks are sequentially sorted according to the set starting values. For example, the numbers can be numbered starting from 1, and the data blocks are cut according to the order, such as data block 1, data block 2, data block 3, etc. Data block N.
  • Cutting the merged file may be performed by the user using a cutting tool to cut the data, or the cutting algorithm may be integrated into the software to automatically cut the merged file.
  • the user uses the cutting tool method, for example, after generating the merged file, importing the merged file into the cutting tool, generating the required data block in the specified folder, and the name of the folder can be set to correspond to the streaming media file.
  • the name is a name.
  • the cut data block can be stored in the disk or the memory. If it is stored in the memory, the data block can be sent to other P2P servers or the verification server relatively quickly.
  • the merged file described in the embodiment of the present invention may be a file composed of all the fragments, or may be a file including a slice file and an index file. If the merged file is a full slice file, the first sequence number of the data block corresponds to the start position of the first slice.
  • the data block generated by the index file needs to be considered when calculating the correspondence between the sequence number and the slice of the data block.
  • the size of the index file is 10K
  • the size of each data block is 1K
  • the data block number corresponding to the starting position of the first fragment is number 11.
  • step S102 the data block is stored in a correction server and a plurality of P2P servers.
  • the difference from the traditional P2P server structure is that the present invention further includes a verification server, and the data block can be stored in the P2P server and the verification server.
  • the data block stored in the P2P server and the verification server includes a data block sequence number and an identifier of the stream media corresponding to each data block, and the plurality of data blocks may be stored in a folder including a stream file identifier name. Achieve the distinction between different streaming media files.
  • the P2P server described in the embodiment of the present invention may be each terminal when performing streaming media file transmission and playback.
  • the terminal where the user A is located can serve as a P2P server, and provides the downloaded data, which is downloaded by other P2P clients. That is, the terminal where the user is located can serve as both a P2P client and a P2P server.
  • step S103 the P2P client downloads the data block from the P2P server according to the sequence number of the data block.
  • the data block that needs to be downloaded in the embodiment of the present invention may be generally determined according to the size of the data block sequence number. For example, when the sequence number of the currently downloaded data block is N, the sequence number of the data block that needs to be downloaded most currently is N+1.
  • the sequence number of the data block downloaded in the first P2P server may be set to ab, and the data block downloaded in the second P2P server.
  • the sequence number interval is bc
  • the sequence number of the data block downloaded in the third P2P server is cd, and a ⁇ b ⁇ c ⁇ d, then when the data block is downloaded, the priority is lower from the data block number interval.
  • the P2P server performs downloading, such as preferentially downloading data blocks from the first P2P server.
  • step S104 a check value is calculated for the downloaded data block, and it is determined whether the calculated check value matches the check information stored in the data block.
  • each data block for example, a 4-byte CRC check value storage space can be allocated.
  • a CRC check calculation is performed to obtain each data block. CRC check information and store the check information at a predetermined location.
  • the specific verification process is as follows:
  • the client performs check calculation on the data in the received data block, for example, can calculate the CRC, obtains the CRC calculation result, and compares it with the verification information stored in the data block. If the two are consistent, the data block is described. It is complete and has not been damaged. If the two are inconsistent, the data is corrupted. If you use a corrupted block for playback, the playback quality will be affected.
  • step S105 if the check value does not match the check information stored in the data block, the data block whose check information does not match is downloaded to the check server.
  • the data block is damaged, and after obtaining the serial number of the damaged data block, according to the data block Serial number, re-download the data block corresponding to the serial number to other servers.
  • the embodiment of the present invention may also perform statistics on the integrity of the data downloaded by the P2P server.
  • the damage rate of the data downloaded from a P2P server reaches a predetermined value, Then, the download of the data block from the P2P server can be suspended, thereby improving the efficiency of the complete high data block download.
  • the message may also be sent to the P2P server, and the message content may be information such as a data block number indicating the damage.
  • the streaming media file is cut into a plurality of data blocks according to a preset size, and then the data block is stored in a plurality of P2P servers. Since each data block includes a corresponding data block serial number, the P2P is The client can download the required data block from different P2P servers according to the sequence number of the data block, and perform verification according to the verification information in the data block. When the data block is damaged, the verification cannot be passed, and the verification is performed. When the server re-downloads, so that the data in the P2P server is damaged, the undamaged data can be automatically verified and downloaded, thereby improving the quality of the playback.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • FIG. 2 is a flowchart showing an implementation process of a method for generating a merged file according to the first embodiment of the present invention, which is described in detail as follows:
  • step S201 the streaming media file is obtained, and the streaming media file is segmented according to a preset duration to obtain a plurality of fragments corresponding to the streaming media file, and an offset and a pointing point including the fragment.
  • the index file of the pointer of the fragment is obtained, and the streaming media file is segmented according to a preset duration to obtain a plurality of fragments corresponding to the streaming media file, and an offset and a pointing point including the fragment.
  • the index file of the pointer of the fragment is obtained, and the streaming media file is segmented according to a preset duration to obtain a plurality of fragments corresponding to the streaming media file, and an offset and a pointing point including the fragment.
  • the current video source generally includes two categories: an on-demand VOD video data source and a live data source. If it is an on-demand VOD video data source, determine whether the format is MPEG. If not, the video data source needs to be performed. Format conversion.
  • the existing video data source needs to be converted accordingly, and the conversion method can select an existing conversion tool according to the format to be converted and the MPEG format, and the user can call The existing tools are completed, and other formats and MPEG conversion algorithms can be integrated in the system. After the format of the source video data source is judged, the corresponding algorithm is called to complete the format conversion.
  • the format conversion process may include a direct conversion algorithm, and may also include an indirect conversion algorithm, for example, a video data source of an MP4 format or a DVD format may be directly converted into video data of an MPEG format. It is also possible to convert the video data source of the DVD format into the video data of the MP4 format, and then convert the video data of the MP4 format into the video data of the MPEG format.
  • the preset duration of the segmentation of the streaming media file may be based on a different duration value according to the code rate. For example, the correspondence between different code rate ranges and durations can be set.
  • the first duration and the second duration decrease as the code rate increases. That is, the file size of each slice is controlled. For example, for a streaming media file with a normal bit rate, you can use a preset duration of 10s for segmentation. .
  • the streaming media can be divided into 540 fragments.
  • Each shard is formatted as ts, usually with a suffix of '.ts' appended to each file.
  • it also includes generating an index file corresponding to the shards, including an offset of each shard and a pointer to each shard in the index file.
  • the offset of the slice can be understood as the offset of the time or size of each slice from the starting position. Taking the time offset as an example, for example, the offset of the Nth slice is a time. Point, the offset of the N+1th slice is the b time point, then the size of the N+1th slice is the video data within the duration of ba.
  • the size of the slice can be directly obtained by subtracting the offset. For example, if the offset of the Nth slice is a, and the offset of the N+1th slice is b, then the size of the N+1th slice is b-a.
  • the pointer to the slice is used to sequentially play the slice according to the pointer in the index file.
  • the preset duration may be set in an index file, and multiple pointers included in the index file may be used to indicate the name and order of the play.
  • the shard can be associated with a pointer in the index file, and the pointers are sequentially stored in chronological order.
  • step S202 the index file is merged with the slice segmented by the streaming media file to generate a merged file.
  • the index file and the shards are combined, so that a large number of shards can be collectively managed, for example, for one streaming media file, including hundreds of shards, in the prior art.
  • a large number of shards can be collectively managed, for example, for one streaming media file, including hundreds of shards, in the prior art.
  • the present application solves the problem of complicated file management by re-segmenting after packaging and combining, and will be further explained in step S103.
  • the index file and the segmented slice of the streaming media file are merged, and the index file may be selected first, and the segmented slice of the streaming media file may be merged in a later manner. That is, in the merged file, the index file corresponding to the fragment of the streaming media file can be preferentially read. It can be understood that this is only a preferred combination, but it is not limited to this combination.
  • the size information of the index file needs to be included to facilitate distinguishing from the fragmentation of the streaming media file in the merged file.
  • step S203 the merged file is sequentially cut according to a preset size to obtain a plurality of data blocks, where the data block includes a serial number corresponding to the data block and corresponding verification information.
  • the cut is required, and the cut object may be a set of fragments in the merged file, or the entire merged file may be cut, and the entire merged file is performed by Han.
  • the cut object may be a set of fragments in the merged file, or the entire merged file may be cut, and the entire merged file is performed by Han.
  • it is necessary to record the size information of the index file, so as to facilitate the subsequent calculation of the correspondence between the cut data block and the position of the slice.
  • the merged file is cut to obtain a data block, and the preset size of the data block may be 1 KB or the like.
  • the data block after the cutting is 1 KB.
  • the sliced data block is much smaller than the slice, and therefore, one slice consists of a plurality of data blocks.
  • the size and offset of each slice can be obtained, and the starting point of the data block included in each slice can be obtained by combining the sequence numbers of each data block. position.
  • the cut object may be a set of fragments in the merged file, and the starting position of each slice is calculated according to the manner described in step S101. For example, for one of the fragments, the starting point of the data is 56.52M. The end position is 58.2M, then the size of the fragment can be calculated to be 1.68M, and the corresponding data includes 1680. If the sequence number of the first data block is 1, the corresponding data block of the fragment is the number 56520. A block of data between the serial numbers 58200.
  • the object to be cut includes the index file, it is necessary to remove the data block number occupied by the index file, such as the size of the index file 5K, then if for one of the fragments, the starting point of the data is 56.52M, and the ending position is 58.2M. Then, the size of the slice can be calculated to be 1.68M, and the corresponding data includes 1680. If the sequence number of the first data block is 1, the data block corresponding to the slice is the sequence number 56520+50 to the serial number 58200+50. Data block between.
  • the present invention specifically introduces a process of generating a merged file, by cutting the merged file, so that each data block after cutting corresponds to a slice file and an index file of the streaming media file, thereby conveniently transmitting the data block at most P2P servers are managed to improve the download efficiency of P2P clients based on HLS technology.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 3 is a flowchart showing an implementation process of playing according to a data block after determining whether the calculated check value matches the verification information stored in the data block according to the first embodiment of the present invention, as follows:
  • step S301 if the check value matches the check information stored in the data block, an index file is generated according to the acquired data block.
  • a data block number is stored in the data block, and the data block is downloaded from one or more P2P servers according to the size of the serial number in the data block.
  • a task of downloading a sequence number range of different P2P servers can be set, thereby realizing simultaneous downloading of required data blocks in a plurality of P2P servers, and the downloaded data blocks are not repeated.
  • the downloaded data blocks need to be combined into slices, so the downloaded data blocks can be preferentially stored in the memory and quickly combined through the memory.
  • the index file can be downloaded before the data block is downloaded.
  • the index file may be obtained according to the serial number in the downloaded data and the size of the index file.
  • step S302 the data block corresponding to the fragment is calculated and acquired according to the fragment pointed to by the pointer in the index file, and the size of the data block and the offset of the fragment.
  • the index file in the downloaded data block is parsed. Since the index sequence of the slice is included in the index file, the play sequence of the slice can be obtained by the pointer sequence. In addition, the offset of each slice is included in the index file, and the size of the slice can be calculated according to the offset.
  • step S303 a slice is formed according to the acquired data block, and sent to the player for playback.
  • the sequence number range of the data block corresponding to each slice can be obtained.
  • the fragment to be played can be obtained, and the corresponding data block number is searched according to the played fragment, and the request for acquiring the corresponding data block is sent to the P2P server, according to the data block returned by the P2P server.
  • the piece to be played can be obtained, and the piece can be sent to the player to play the streaming file.
  • the embodiment of the present invention specifically introduces the playback of the streaming media file by using the acquired data block.
  • the data block can be quickly downloaded to obtain better image or sound playback quality.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 4 is a schematic diagram of an implementation procedure of a playback verification method for a streaming media file according to Embodiment 4 of the present invention, which is as follows:
  • step S401 the merged file generated after the streaming media fragmentation according to the HLS technology is acquired, and the preset file license preset size is cut into a plurality of data blocks, and the data sequence corresponding to the data block is included in each data block. Verify the information.
  • step S402 a partial data block or all data blocks of the streaming media file are stored in a plurality of P2P servers, and all data blocks of the streaming media files are stored in a correction server.
  • the data stored in the P2P server is specifically limited in the embodiment of the present invention, including the following storage manners:
  • all the data blocks cut by the streaming media file are stored in a plurality of P2P servers, and when the P2P client downloads and plays the streaming media file, the data block of any serial number can be downloaded from any P2P server.
  • the advantage of this method is that when any one of the P2P servers fails, the impact on the P2P client is relatively small, but the P2P server requires a large space for data storage;
  • each P2P server stores only a part of data blocks, for example, in the server 1, the data block numbers are 1-3, 10-12, and the server 2 stores 4-6. 13-15... Store 7-9, 16-18... in server 3.
  • the server 1 stores only a part of data blocks, for example, in the server 1, the data block numbers are 1-3, 10-12, and the server 2 stores 4-6. 13-15... Store 7-9, 16-18... in server 3.
  • P2P clients can be quickly accessed from different P2P servers. Download the data block to improve the smoothness of playback.
  • the third method is a collection of the first mode and the second mode, that is, storing all the data blocks cut by the streaming media file in a part of the P2P server, and storing a part of the data blocks in another part of the P2P server, It can improve the download speed of P2P terminals, and can also reduce the impact on P2P clients when some P2P servers fail.
  • step S403 the P2P client downloads the data block from the P2P server according to the sequence number of the data block.
  • step S404 a check value is calculated for the downloaded data block, and it is determined whether the calculated check value matches the check information stored in the data block.
  • step S405 if the check value does not match the check information stored in the data block, the data block whose check information does not match is downloaded to the check server.
  • the embodiment of the present invention specifically describes the storage of data, and according to specific needs, different data block storage modes may be selected, which may be beneficial to improve data download speed or save storage space.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • FIG. 5 is a schematic diagram of an implementation procedure of a playback verification method for a streaming media file according to a fifth embodiment of the present invention, which is described in detail as follows:
  • step S501 a merge file generated after the streaming media fragmentation according to the HLS technology is acquired, and the preset file license preset size is cut into a plurality of data blocks, and the data sequence corresponding to the data block is included in each data block. Verify the information.
  • step S502 the data block is stored to a correction server and a plurality of P2P servers.
  • step S503 communication speed information between the P2P client and the plurality of P2P servers is acquired.
  • step S504 according to the communication speed information between the P2P client and the plurality of P2P servers, a data block download task of a corresponding size is allocated to each P2P server, and the data block is downloaded according to the allocated download task.
  • the connection speed of the P2P server can be tested before downloading, the number of download tasks of the server with high transmission speed is set, and the number of servers with low transmission speed is set less. By downloading the amount of tasks, the download speed can be further improved, and the network resources of the P2P client can be fully utilized.
  • step S505 a check value is calculated for the downloaded data block, and it is determined whether the calculated check value matches the check information stored in the data block.
  • step S506 if the check value does not match the check information stored in the data block, the data block whose check information does not match is downloaded to the check server.
  • the embodiment of the present invention corresponds to the method for storing a streaming media file according to the first embodiment.
  • the P2P playback of the HLS based on the HTTP protocol can be realized, that is, the playback speed can be improved, and the data management is facilitated.
  • fast switching of different code rates can be achieved.
  • FIG. 6 is a flowchart of an implementation procedure of a playback verification method for a streaming media file according to Embodiment 6 of the present invention, which is as follows:
  • step S601 the video is encoded, and the encoded video data is encoded into a video of H.264 format by the encoder, the collected audio data is encoded into audio of ACC format, and the encoded video and audio are encapsulated into MPEG format. Streaming media files.
  • the video source is a live data source, it needs to include encoding and encapsulating the live data source to generate MPEG (English full name: Moving Picture Experts) Group, Chinese full name: Dynamic Image Experts Group) format streaming media files.
  • MPEG English full name: Moving Picture Experts
  • the encoding process of the collected live data source can be generally performed by an encoder.
  • the encoder can be a hardware device or a software program.
  • the encoder of the hardware device is connected to the satellite receiver or camera to encode the input signal to generate video and AAC conforming to the H.264 standard (English full name is Advanced) Audio Coding, the full name of Chinese: Advanced Audio Coding, standard audio format, and package it as an MPEG TS file.
  • step S602 the merged file generated after the streaming media fragmentation according to the HLS technology is acquired, and the preset file license preset size is cut into a plurality of data blocks, and the serial number corresponding to the data block is included in each data block.
  • step S603 the data block is stored to a correction server and a plurality of P2P servers;
  • step S604 according to the sequence number of the data block, the P2P client downloads the data block from the P2P server;
  • step S605 a check value is calculated for the downloaded data block, and it is determined whether the calculated check value matches the check information stored in the data block;
  • step S606 if the check value does not match the check information stored in the data block, the data block whose check information does not match is downloaded to the check server.
  • the video source file is judged.
  • the format of the source file is automatically converted, thereby improving the adaptability of the streaming media file playing verification according to the present invention.
  • FIG. 7 is a schematic structural diagram of a playback verification device for a streaming media file according to an embodiment of the present invention, which is described in detail as follows:
  • the streaming media file cutting unit 701 is configured to obtain a merged file generated after the streaming media fragmentation according to the HLS technology, and cut the preset file license preset size into a plurality of data blocks, and include the data block in each data block. Corresponding serial number and verification information;
  • a data block storage unit 702 configured to store the data block to a calibration server and a plurality of P2P servers;
  • a first downloading unit 703, configured to download, by the P2P client, a data block from the P2P server according to the sequence number of the data block;
  • the checking unit 704 is configured to calculate a check value for the downloaded data block, and determine whether the calculated check value matches the check information stored in the data block;
  • the second downloading unit 705 is configured to download, to the verification server, a data block whose verification information does not match if the check value does not match the verification information stored in the data block.
  • the streaming media file cutting unit specifically includes:
  • a first segmentation subunit configured to acquire a streaming media file, and divide the streaming media file according to a preset duration, to obtain a plurality of fragments corresponding to the streaming media file, and an offset including the fragmentation And an index file pointing to the pointer of the shard;
  • a merging sub-unit configured to merge the index file with the shard that is divided by the streaming media file to generate a merged file
  • the second segmentation sub-unit is configured to sequentially cut the merged file according to a preset size to obtain a plurality of data blocks, where the data block includes a sequence number corresponding to the data block and corresponding verification information.
  • the device further comprises:
  • An index file generating unit configured to generate an index file according to the obtained data block if the check value matches the check information stored in the data block;
  • a data block obtaining unit configured to calculate and acquire a data block corresponding to the fragment according to the fragment pointed by the pointer in the index file, and the size of the data block and the offset of the fragment;
  • the slice sending and playing unit is configured to form a slice according to the acquired data block, and send it to the player for playing.
  • the data storage unit is specifically configured to:
  • a partial data block or all data blocks of the streaming media file are stored in a plurality of P2P servers, and all data blocks of the streaming media files are stored in a correction server.
  • the first download unit comprises:
  • a communication speed information obtaining subunit configured to acquire communication speed information between the P2P client and the plurality of P2P servers
  • a task allocation subunit configured to allocate a data block download task of a corresponding size to each P2P server according to the communication speed information between the P2P client and the plurality of P2P servers, and perform data block according to the allocated download task. download.
  • the method further includes:
  • a coding unit configured to encode the video, and encode the collected video data into a video of H.264 format, and encode the collected audio data into audio of ACC format;
  • a closed unit for encapsulating the encoded video and audio into a streaming media file in MPEG format A closed unit for encapsulating the encoded video and audio into a streaming media file in MPEG format.
  • the streaming media file playback verification device in the embodiment of the present invention corresponds to the streaming media file playback verification method in the first embodiment to the sixth embodiment, and details are not described herein.
  • an embodiment of the present invention provides a playback verification system for a streaming media file, where the system includes:
  • the P2P server is configured to store the cut data block, where the data block includes a sequence number corresponding to the data block, where the file to be cut is a segment after the segmentation of the streaming media file and an index corresponding to the segment a file after the file is merged, the index file includes an offset of the slice and a pointer to the slice;
  • the verification server stores all the data blocks after the stream media file is cut, and the data block includes a sequence number corresponding to the data block, wherein the file to be cut is a segmentation of the stream media file and the segmentation a merged file of the index file corresponding to the fragment, where the index file includes an offset of the fragment and a pointer to the fragment;
  • the P2P client is configured to obtain a data block from one or more P2P servers, calculate a check value for the obtained data block, and determine whether the calculated check value matches the check information stored in the data block. If the check value does not match the verification information stored in the data block, downloading a data block whose verification information does not match to the verification server, and obtaining an index file according to the serial number of the downloaded verified data block, The index file is parsed to obtain the size of the fragment of the streaming media file to be played and the data block to be read, and the downloaded data block is sent to the player for playback.
  • the streaming media file play verification system in the embodiment of the present invention may be used to perform the play verification of the streaming media files in the first to seventh embodiments, and details are not described herein.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.

Abstract

L'invention concerne un procédé de lecture et de vérification d'un fichier multimédia de diffusion en continu qui consiste à : acquérir un fichier combiné généré par segmentation du contenu multimédia en continu selon la technologie HLS, et couper le fichier combiné en une pluralité de blocs de données conformément à une taille prédéfinie (S101) ; stocker les blocs de données sur un serveur de correction et une pluralité de serveurs P2P (S102) ; télécharger, par un client P2P, les blocs de données à partir des serveurs P2P (S103) ; calculer des valeurs de vérification pour les blocs de données téléchargés et déterminer si les valeurs de vérification calculées sont cohérentes avec des informations de vérification stockées dans les blocs de données (S104) ; si les valeurs de vérification ne sont pas cohérentes avec les informations de vérification stockées dans les blocs de données, télécharger, à partir du serveur de correction, des blocs de données dont les informations de vérification ne sont pas cohérentes avec les valeurs de vérification (S105). Grâce à la solution, lorsque les données dans les serveurs P2P sont corrompues, une vérification et un téléchargement de données non corrompues peuvent être réalisés automatiquement, ce qui permet d'améliorer la qualité de lecture.
PCT/CN2015/088765 2015-09-01 2015-09-01 Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu WO2017035786A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/088765 WO2017035786A1 (fr) 2015-09-01 2015-09-01 Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/088765 WO2017035786A1 (fr) 2015-09-01 2015-09-01 Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu

Publications (1)

Publication Number Publication Date
WO2017035786A1 true WO2017035786A1 (fr) 2017-03-09

Family

ID=58186600

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088765 WO2017035786A1 (fr) 2015-09-01 2015-09-01 Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu

Country Status (1)

Country Link
WO (1) WO2017035786A1 (fr)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597153A (zh) * 2020-05-13 2020-08-28 湖南国科微电子股份有限公司 基于hls的文件管理方法、装置、电子设备和存储介质
CN112822260A (zh) * 2020-12-31 2021-05-18 北京天融信网络安全技术有限公司 文件传输方法及装置、电子设备、存储介质
CN113438513A (zh) * 2021-06-25 2021-09-24 深圳Tcl新技术有限公司 一种视频分辨率切换方法、装置、设备及存储介质
CN113556583A (zh) * 2021-07-19 2021-10-26 杭州国芯科技股份有限公司 一种机顶盒开机广告播放方法
CN114363321A (zh) * 2021-12-30 2022-04-15 支付宝(杭州)信息技术有限公司 文件传输方法、设备及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100332621A1 (en) * 2008-02-22 2010-12-30 Telefonaktiebolaget Lm Ericsson (Publ) Method and Apparatus for Obtaining Media Over a Communications Network
CN102255695A (zh) * 2011-07-22 2011-11-23 乐视网信息技术(北京)股份有限公司 一种应用于p2p网络分发系统的数据校验方法与系统
CN102546731A (zh) * 2010-12-30 2012-07-04 中国移动通信集团公司 点对点流媒体系统的子块完整性校验方法和系统
CN103079116A (zh) * 2012-12-31 2013-05-01 乐视网信息技术(北京)股份有限公司 一种应用于对等网络的数据被动校验系统及方法
CN104796796A (zh) * 2015-04-21 2015-07-22 范文鲜 提高Android平台的HLS流播放器容错的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100332621A1 (en) * 2008-02-22 2010-12-30 Telefonaktiebolaget Lm Ericsson (Publ) Method and Apparatus for Obtaining Media Over a Communications Network
CN102546731A (zh) * 2010-12-30 2012-07-04 中国移动通信集团公司 点对点流媒体系统的子块完整性校验方法和系统
CN102255695A (zh) * 2011-07-22 2011-11-23 乐视网信息技术(北京)股份有限公司 一种应用于p2p网络分发系统的数据校验方法与系统
CN103079116A (zh) * 2012-12-31 2013-05-01 乐视网信息技术(北京)股份有限公司 一种应用于对等网络的数据被动校验系统及方法
CN104796796A (zh) * 2015-04-21 2015-07-22 范文鲜 提高Android平台的HLS流播放器容错的方法

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597153A (zh) * 2020-05-13 2020-08-28 湖南国科微电子股份有限公司 基于hls的文件管理方法、装置、电子设备和存储介质
CN112822260A (zh) * 2020-12-31 2021-05-18 北京天融信网络安全技术有限公司 文件传输方法及装置、电子设备、存储介质
CN112822260B (zh) * 2020-12-31 2023-06-09 北京天融信网络安全技术有限公司 文件传输方法及装置、电子设备、存储介质
CN113438513A (zh) * 2021-06-25 2021-09-24 深圳Tcl新技术有限公司 一种视频分辨率切换方法、装置、设备及存储介质
CN113438513B (zh) * 2021-06-25 2023-05-02 深圳Tcl新技术有限公司 一种视频分辨率切换方法、装置、设备及存储介质
CN113556583A (zh) * 2021-07-19 2021-10-26 杭州国芯科技股份有限公司 一种机顶盒开机广告播放方法
CN114363321A (zh) * 2021-12-30 2022-04-15 支付宝(杭州)信息技术有限公司 文件传输方法、设备及系统

Similar Documents

Publication Publication Date Title
WO2017035787A1 (fr) Procédé, dispositif et système pour stocker un fichier de contenu multimédia de diffusion en continu
WO2017035786A1 (fr) Procédé, dispositif et système de lecture et de vérification d'un fichier multimédia de diffusion en continu
WO2011059272A2 (fr) Procédé et appareil permettant d'offrir un service trick play
WO2012011724A2 (fr) Procédé de transmission/réception de fichiers multimédia et dispositif de transmission/réception correspondant
WO2012177041A2 (fr) Procédé de transmission et de réception de contenu multimédia et appareil de transmission et de réception utilisant ce procédé
WO2012030178A2 (fr) Procédé et dispositif pour fournir un flux de données de contenu
WO2015012565A1 (fr) Appareil d'émission, appareil de réception et procédé de traitement de signal associé
WO2016129974A1 (fr) Appareil émetteur, appareil récepteur et leur procédé de commande
WO2015034245A1 (fr) Appareil d'émission, appareil de réception, et procédé de traitement de signal de ceux-ci
WO2013162312A1 (fr) Procédé et appareil permettant l'émission-réception de données destinées à un système de transmission multimédia
WO2013089437A1 (fr) Dispositif et procédé pour recevoir un contenu multimédia
WO2011071290A2 (fr) Procédé et appareil de diffusion en continu fonctionnant par insertion d'un autre contenu dans un contenu principal
WO2011059273A2 (fr) Procédé et appareil de diffusion adaptative en flux qui utilise la segmentation
WO2013141666A1 (fr) Procédé de transmission et procédé de réception hybrides pour un contenu vidéo svc empaqueté dans un mmt
WO2011059291A2 (fr) Procédé et appareil permettant de transmettre et de recevoir des données
WO2011155776A2 (fr) Procédé pour fournir un service de transmission multimédia en continu à base de fragments et dispositif associé, et procédé pour recevoir un service de transmission multimédia en continu à base de fragments et dispositif associé
WO2016010229A1 (fr) Procédé de fonctionnement d'un client et d'un serveur pour service de lecture en flux continu
WO2017084311A1 (fr) Procédé et dispositif pour accélérer la lecture d'une vidéo à fragment unique
WO2016111560A1 (fr) Appareil de transmission et appareil de réception, et procédé de traitement de signaux associé
WO2016175564A1 (fr) Procédé et dispositif de reconnaissance de contenu audio
WO2017035783A1 (fr) Procédé de transmission et de lecture multimédias à diffusion en continu, et dispositif de transmission et de lecture
WO2020076058A1 (fr) Procédé et appareil de génération d'un fichier multimédia comprenant un contenu vidéo tridimensionnel et procédé et appareil de relecture de contenu vidéo tridimensionnel
WO2016195354A1 (fr) Appareil de transmission, appareil de réception, et procédé de commande correspondant
WO2016111563A1 (fr) Procédé et appareil d'émission et de réception d'informations de média dans un système de communications
WO2012011722A2 (fr) Procédé de transmission/réception d'un flux de transport multimédia et dispositif de transmission/réception correspondant

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: 15902593

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: 15902593

Country of ref document: EP

Kind code of ref document: A1