CN109889917B - Video transmission method based on cache coding - Google Patents

Video transmission method based on cache coding Download PDF

Info

Publication number
CN109889917B
CN109889917B CN201711280964.6A CN201711280964A CN109889917B CN 109889917 B CN109889917 B CN 109889917B CN 201711280964 A CN201711280964 A CN 201711280964A CN 109889917 B CN109889917 B CN 109889917B
Authority
CN
China
Prior art keywords
request
file
client
server
files
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
CN201711280964.6A
Other languages
Chinese (zh)
Other versions
CN109889917A (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.)
Shanghai Jiaotong University
Fujitsu Ltd
Original Assignee
Shanghai Jiaotong University
Fujitsu 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 Shanghai Jiaotong University, Fujitsu Ltd filed Critical Shanghai Jiaotong University
Priority to CN201711280964.6A priority Critical patent/CN109889917B/en
Publication of CN109889917A publication Critical patent/CN109889917A/en
Application granted granted Critical
Publication of CN109889917B publication Critical patent/CN109889917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video transmission method based on cache coding, which comprises the following steps: step S1, the server preprocesses the video file and allocates cache at the client; step S2, before playing the video file, the client sends a request to the server; step S3, the server receives the request and processes the request; step S4, the server encodes the request file requested by the client and sends the encoded request file to the client; step S5, the client receives the request file sent by the server and decodes the request file requested by the client; in step S6, the client plays the video file. The video transmission method based on the cache coding, which is realized by the invention, mixes the transmission modes of unicast and broadcast, reduces the transmission data volume of the server under the condition of meeting the request of the client, adds a retransmission mechanism, eliminates the influence of network packet loss, and can meet the requirement of real-time transmission.

Description

Video transmission method based on cache coding
Technical Field
The invention relates to the technical field of wireless communication, in particular to a video transmission method based on cache coding.
Background
Video on demand has pushed the growth of network traffic today, and this trend is expected to continue for decades. In fact, some studies predict that video traffic will increase 12-fold between 2010 and 2020. Video traffic is essentially time-varying with a peak at night. This feature burdens service providers with having to extend their networks to handle the increased peak traffic even in cases where the network is still underutilized during off-peak hours. Caching is a key technique to alleviate this problem by smoothing traffic over time and throughout the network. Caching repeats popular content during off-peak hours using memory distributed throughout the network. During peak flow times, these memories are then used to transfer the requested content over the network with less pressure.
In the conventional video cache on demand technology, when a plurality of clients simultaneously request files from a server, the server responds to the request of each client one by one, and when the number of the clients increases, the data volume transmitted by the server increases, and the burden is increased accordingly.
For prior art search, the Fundamental L instances of Caching, published by Mohammad Ali Maddah-Ali et al in IEEETransactions on Information Theory 2014, proposed a cache coding scheme that, unlike the traditional uncoded scheme, creates a linear combination of blocks of content required by different users, such a combination allows each user to recover his requested blocks using the contents of the local cache.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a video transmission method based on cache coding.A server side codes a file requested by a client side according to a local cache file of each client side and sends the requested file to the client side in a unicast or broadcast mode, and the client side decodes the received requested file by using a local cache to obtain the requested video file.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a video transmission method based on buffer coding is operated according to the following steps:
step S1, the server preprocesses the video file and allocates cache at the client;
limited by a transmission protocol, the size of a video file transmitted each time is limited within a certain size range, and the video file cannot be directly played after being cut into small files, so that the video file is firstly cut into ts files capable of being played, then each ts file is cut into small files (cut files) with equal size, and the small files are numbered; at least a portion of the small files (cut files) are distributed to the client as a cached file. The cache file and the request file in the following text refer to small files after cutting;
storing all small files of each video as request files in the server, and knowing a cache file of each client, specifically, knowing the cache file of each client about each video; each client stores a part of cache files of each video, and since the size of the last small file generated by cutting each ts file is usually smaller than the specified file size, each client is specified to cache the last small file of each ts file, so that the number of the small files after the ts file is cut is conveniently obtained, and the ts file is recovered.
Step S2, before playing the video file, the client sends a request to the server;
before playing a certain video file, a client generates a request list of request files required to be requested to a server according to a local existing cache file of the video, and the client sends the requests in the list to the server in a unicast mode one by one;
after the client sends each request, the client adds the request to the queue of sent requests. The client sets a timer for each request added into the transmitted request queue, and before the timer is finished, if the client does not receive the request file of the request, the client will transmit the request again when the timer is finished.
Step S3, the server receives the request and processes the request;
after receiving a request sent by a client, the server judges whether the request is a first request from a corresponding client.
If the request is the first request from the corresponding client, the server adds the request into a request queue to be sent; otherwise, the server immediately sends information to the client in a unicast mode, wherein the information comprises a request file requested by the client, the information of the client and the request of the client.
The server sets a timer for each request and for the elements in the queue. When a first-time arriving request is added into a request queue to be sent, each element in the queue is compared with the first-time arriving request from a queue head element, and whether the current element can be merged with the first-time arriving request or not is judged. If the current element is merged with the first arriving request, the timer of the merged element is kept consistent with the timer of the current element before merging; otherwise, the first arriving request is added to the end of the queue as a new element whose timer is consistent with the timer of the first arriving request.
When the element in the request queue to be sent is compared with the first arrival request, if the cache file of the client corresponding to the first arrival request contains the request files of all the clients in the current element, and the cache file of each client in the current element contains the request file of the first arrival request, the element can be merged with the first arrival request; otherwise, it cannot be merged.
Step S4, the server encodes the request file requested by the client and sends the encoded request file to the client;
when the timer of the queue head element of the request queue to be sent reaches the specified time, the server judges the number of the client requests contained in the element. If the element only contains the request of one client, the server sends information to the client in a unicast mode, wherein the information comprises a request file of the client, the information of the client and the request of the client; if the element contains the requests of two or more clients, the request file contained in the element is encoded, specifically, the content of all the request files in the element is subjected to exclusive-or to obtain a new file, and the content of the new file, the information of all the clients in the element and the requests of the corresponding clients are used as sending information and sent to the clients in a broadcasting mode.
Step S5, the client receives the request file sent by the server and decodes the request file requested by the client
After receiving the information, the client first judges whether the information contains the request of the client. If the request of the client is included, the request is removed from the sent request queue, then all the request file contents included in the information are extracted, finally the received request file is decoded according to the request files requested by other clients existing in the local cache file to obtain the request file requested by the client, and specifically, the received request file contents and the request files requested by other clients existing in the local cache file are subjected to exclusive or to obtain the request file requested by the client.
Step S6, the client plays the video file
After the client decodes the requested request file, whether all the files after the ts file is cut are obtained locally is judged according to the last file after each ts file is cut. And after all the cut files of a ts file are obtained, the ts file is recovered, the information of the ts file is written into the m3u8 file according to the serial number of the ts file, and the video file can be played after the m3u8 file is written into the information of the first ts file.
Compared with the prior art, the invention has the following beneficial effects:
firstly, the invention utilizes the characteristics of wireless broadcast and mixes the transmission modes of unicast and broadcast, thereby reducing the transmission times and the transmission data volume of the server;
secondly, the requirements of real-time video transmission are considered, a timer is set for the request of the client, and the fluency of the client for playing the video is ensured;
thirdly, the invention considers the situation of network packet loss, adds a retransmission mechanism and ensures the integrity of the video played by the client.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a flow chart of the operation of the present invention;
FIG. 2 is a working architecture of the present invention;
FIG. 3 is a specific example of a file merge process of the present invention;
FIG. 4 is a specific example of a video file transmission including two clients according to the present invention;
FIG. 5 shows the results of the experiment according to the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications can be made by persons skilled in the art without departing from the spirit of the invention. All falling within the scope of the present invention.
Referring to fig. 1, the practice of the present invention is illustrated in more detail below.
The first step is to process the video file, cut the video file into playable ts files, then cut each ts file into equal sized small files (cut files), and number the small files. Storing all the cut files of each video as request files in the server, and knowing the caching scheme (caching file) of each client; the client stores a partial cache file for each video and must cache the last file of each ts file.
Secondly, before playing a certain video, the client generates a request list of files needing to be requested to the server according to the local existing cache file of the video, and the client sends the requests in the list to the server in a unicast mode one by one; after the client sends each request, the client adds the request to the queue of sent requests. The client sets a timer for each request added into the transmitted request queue, and before the timer is finished, if the client does not receive the file of the request, the client will send the request again when the timer is finished.
And thirdly, after receiving the request sent by the client, the server adds the request into a request queue to be sent if the request is the first request from the client, otherwise, the server immediately sends information to the client in a unicast mode, wherein the information comprises a request file of the client, the information of the client and the request of the client. The server sets a timer for each request and for the elements in the queue. When a first arriving request is added into a request queue to be added, elements in each queue are compared with the request to be added from a queue head element, if a cache file of the request client to be added contains request files of all clients in the elements, and the cache file of each client in the elements contains the request file of the request to be added, the elements can be merged with the request to be added, the current elements are merged with the request to be added, and a timer of the merged elements is consistent with a timer of the elements before merging; otherwise, the request to be added is added to the tail of the queue as an element, and the timer of the element is consistent with the timer of the request to be added.
Fourthly, when the timer of the head element of the request queue to be sent reaches the specified time, the element only contains the request of one client, and the server sends information to the client in a unicast mode, wherein the information comprises the request file of the client, the information of the client and the request of the client; if the element contains the requests of two or more clients, the server performs exclusive OR on the contents of all the request files in the element to obtain a new file, and sends the contents of the new file, the information of all the clients in the element and the corresponding requests to the clients in a broadcasting mode as sending information.
Fifthly, after the client receives the information, if the information contains the request of the client, the request is removed from the sent request queue, then all the requests and the file contents contained in the information are extracted, and finally the received file contents are subjected to XOR with the files requested by other clients in the local cache file, so that the file requested by the client can be obtained.
And sixthly, after the client decodes the requested files, judging whether all the files after the ts files are cut are obtained locally or not according to the last file after each ts file is cut. And after all the ts files of a certain ts file are obtained, recovering the ts file, writing the information of the ts file into the m3u8 file according to the serial number of the ts file, and playing the video after the m3u8 file is written into the information of the first ts file.
In this embodiment, a file merging process is described with reference to fig. 3, where the method includes a server and two clients, and the server caches all files, including file 1, file 2, file 3, and file 4; client a caches file 1 and file 2, and client B caches file 1 and file 3. Client a requests file 3 and file 4 from the server, and client B requests file 2 and file 4 from the server. After receiving the requests of the two clients, the server adds all the requests into a request queue to be sent, and because the client A caches the file 2 requested by the client B and the client B caches the file 3 requested by the client A, the two requests can be combined and the encoded file is broadcast and sent to the two clients; and the files 4 requested by the client a and the client B are not in the cache of the other side, so the server needs to send the files 4 to the two clients one by one.
In this embodiment, a video file transmission system including two clients is described with reference to fig. 4, where the system includes a server and two clients, before the clients send requests, the two video files are processed according to the requirements of the embodiment, the server stores all the cut files of the two videos, each client randomly caches about 50% of the cut files of each video file, the client a plays video 1, and the client B plays video 2, and sends corresponding requests to the server. Experimental results as shown in fig. 5, in a laboratory environment, the system using the video transmission method provided in this embodiment can obtain a gain of about 25% compared with the conventional scheme, and the video playing process is smooth.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (6)

1. A video transmission method based on buffer coding, comprising the steps of:
step S1, the server preprocesses the video file and distributes the cache file at the client;
step S2, before playing the video file, the client sends a request to the server;
step S3, the server receives the request from the client and processes the request;
step S4, the server encodes the request file requested by the client and sends the encoded request file to the client;
step S5, the client receives the request file sent by the server and decodes the request file requested by the client;
step S6, the client plays the video file;
the step S3 includes the following steps:
after receiving a request sent by a client, a server judges whether the request is a first request from a corresponding client; if the request is the first request from the corresponding client, the server adds the request into a request queue to be sent; otherwise, the server immediately sends information to the client in a unicast mode, wherein the information comprises a request file requested by the client, information of the client and a request of the client;
the server sets a timer for each request and elements in a request queue to be sent; when a first-time arriving request is added into a request queue to be sent, each element in the queue is compared with the first-time arriving request from a queue head element, and whether the current element can be merged with the first-time arriving request or not is judged; if the current element is merged with the first arriving request, the timer of the merged element is kept consistent with the timer of the current element before merging; otherwise, adding the first arriving request as a new element to the tail of the queue, wherein the timer of the new element is consistent with the timer of the first arriving request;
when the element in the request queue to be sent is compared with the first arriving request, if the cache file of the client corresponding to the first arriving request contains the request files of all the clients in the current element, and the cache file of each client in the current element contains the request file of the first arriving request, the element is merged with the first arriving request; otherwise, it cannot be merged.
2. The method for transmitting video based on buffer coding according to claim 1, wherein the step S1 comprises the following steps:
step S1.1, firstly, cutting a video file into ts files capable of being played, then cutting each ts file into equal-size cut files, and numbering the cut files; distributing at least one part of the cutting file to the client as a cache file;
step S1.2, storing all the cut files of each video file as request files in a server, and knowing the cache file of each client, specifically knowing the cache file of each client about each video file; each client stores part of the cache files of each video file, and the last cut file of each ts file is specified to be cached by each client, so that the number of the cut files after the ts file is cut can be obtained, and the ts file can be recovered.
3. The method for transmitting video based on buffer coding according to claim 1, wherein the step S2 comprises the following steps:
step S2.1, before playing a certain video file, the client generates a request list of request files required to be requested to the server according to the existing cache file of the video file, and the client sends the requests in the list to the server in a unicast mode one by one;
step S2.2, after the client sends each request, adding the request into a sent request queue; the client sets a timer for each request added into the transmitted request queue, and before the timer is finished, if the client does not receive the request file of the request, the client will transmit the request again when the timer is finished.
4. The method for transmitting video based on buffer coding according to claim 1, wherein the step S4 comprises the following steps:
when the timer of the queue head element of the request queue to be sent reaches the specified time, the server judges the number of client requests contained in the element; if the element only contains the request of one client, the server sends information to the client in a unicast mode, wherein the information comprises a request file requested by the client, the information of the client and the request of the client; if the element contains requests of two or more clients, the request file contained in the element is encoded, specifically, the content of all the request files in the element is subjected to exclusive-or to obtain a new file, and the content of the new file, the information of all the clients in the element and the requests of the corresponding clients are used as sending information and sent to the clients in a broadcasting manner.
5. The method for video transmission based on buffer coding according to claim 4, wherein the step S5 includes the following steps:
after receiving the information, the client firstly judges whether the information contains the request of the client; if the request of the client is included, the request is removed from the sent request queue, then all the request file contents included in the information are extracted, finally the received request file is decoded according to the request files requested by other clients existing in the local cache file to obtain the request file requested by the client, and specifically, the received request file contents and the request files requested by other clients existing in the local cache file are subjected to exclusive or to obtain the request file requested by the client.
6. The method for transmitting video based on buffer coding according to claim 2, wherein the step S6 includes the following steps:
s6.1, after the client decodes the requested request file, judging whether the local all the cut files of the ts file after cutting are obtained according to the last cut file of each ts file after cutting, wherein the specific mode is that the number of the last cut file contains the information of the number of the cut files of the ts file, and whether the number of the last cut file is equal to the number of the cut files of the ts file existing locally;
and S6.2, after all the cut files of a ts file are obtained, recovering the ts file, writing the information of the ts file into the m3u8 file according to the serial number of the ts file, and playing the video file after the m3u8 file is written into the information of the first ts file.
CN201711280964.6A 2017-12-06 2017-12-06 Video transmission method based on cache coding Active CN109889917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711280964.6A CN109889917B (en) 2017-12-06 2017-12-06 Video transmission method based on cache coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711280964.6A CN109889917B (en) 2017-12-06 2017-12-06 Video transmission method based on cache coding

Publications (2)

Publication Number Publication Date
CN109889917A CN109889917A (en) 2019-06-14
CN109889917B true CN109889917B (en) 2020-07-14

Family

ID=66924586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711280964.6A Active CN109889917B (en) 2017-12-06 2017-12-06 Video transmission method based on cache coding

Country Status (1)

Country Link
CN (1) CN109889917B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113163446B (en) * 2020-12-29 2022-07-26 杭州电子科技大学 Joint optimization method for code caching and channel coding under multi-relay wireless network
CN113259056A (en) * 2021-06-16 2021-08-13 上海交通大学 Code cache transmission method based on cache channel joint coding

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515945A (en) * 2009-04-07 2009-08-26 四川长虹电器股份有限公司 On-line application method and system of P2P resource files
CN104320681A (en) * 2014-11-07 2015-01-28 百视通网络电视技术发展有限责任公司 CDN back-to-source service method and system
CN105847941A (en) * 2016-03-17 2016-08-10 央广视讯传媒股份有限公司 Audio and video stream direct broadcast method based on HLS protocol
CN105898380A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Rapid network video play starting method and device
CN105933799A (en) * 2016-05-19 2016-09-07 成都虚拟世界科技有限公司 Method and device for playing video
CN106550263A (en) * 2015-09-16 2017-03-29 深圳市腾讯计算机***有限公司 Media playing method and device
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN107295070A (en) * 2017-05-31 2017-10-24 上海交通大学 The distributed coding caching laying method and system of file size isomery

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170339242A1 (en) * 2016-05-20 2017-11-23 Futurewei Technologies, Inc. Content Placements for Coded Caching of Video Streams

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101515945A (en) * 2009-04-07 2009-08-26 四川长虹电器股份有限公司 On-line application method and system of P2P resource files
CN104320681A (en) * 2014-11-07 2015-01-28 百视通网络电视技术发展有限责任公司 CDN back-to-source service method and system
CN106550263A (en) * 2015-09-16 2017-03-29 深圳市腾讯计算机***有限公司 Media playing method and device
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN105898380A (en) * 2015-12-14 2016-08-24 乐视云计算有限公司 Rapid network video play starting method and device
CN105847941A (en) * 2016-03-17 2016-08-10 央广视讯传媒股份有限公司 Audio and video stream direct broadcast method based on HLS protocol
CN105933799A (en) * 2016-05-19 2016-09-07 成都虚拟世界科技有限公司 Method and device for playing video
CN107295070A (en) * 2017-05-31 2017-10-24 上海交通大学 The distributed coding caching laying method and system of file size isomery

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Coded Caching for Delay-Sensitive Content;Urs Niesen;Mohammad Ali Maddah-Ali;《2015IEEE International conference on communication(ICC)》;20150612;全文 *
fundamental limits of caching;Maddah-Ali, Mohammad Ali , Niesen, Urs;《2013IEEE International Symposium on Information Theory》;20130615;全文 *
在线多播编码缓存的研究;肖孝云;《中国优秀硕士学位论文全文数据库》;20170715;全文 *
基于分布式编码缓存的视频多播技术;汪子琦;《中国优秀硕士学位论文全文数据库》;20170115;全文 *

Also Published As

Publication number Publication date
CN109889917A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
CN104737518B (en) The system and method for indicating and transmitting for data
JP4980567B2 (en) Multimedia server with simple adaptation to dynamic network loss conditions
JP5147950B2 (en) Apparatus and method for performing simulcast over variable bandwidth channel
JP4321284B2 (en) Streaming data transmission apparatus and information distribution system
US7461161B2 (en) Information processing apparatus and method for decoding encoded data
JP2006074781A5 (en)
CN110022482B (en) Video playing starting method, video service system and storage medium
CN102130886B (en) Network video streaming media system, transmission processing method, transmitting end
EP3047627B1 (en) Dash representations adaptations in network
CN101690078A (en) Bandwidth allocation control in multiple video streaming
CN106911699B (en) Method for realizing I frame retransmission based on RTP protocol
CN109889917B (en) Video transmission method based on cache coding
EP2058968A1 (en) Method and apparatus for FEC encoding and decoding
CN111093083B (en) Data transmission method and device
CN106790005B (en) Realize the system and method for low delay HLS live streaming
CN1898962A (en) Method of transmitting content with adaptation of encoding characteristics
US20170339242A1 (en) Content Placements for Coded Caching of Video Streams
KR102439595B1 (en) Adaptive video streaming system using receiver caching
DE112011101908T5 (en) Quality adjustment using a fragmented media stream
JP2011082977A (en) P2p network system and data transmitting and receiving method therefor
CN106791860A (en) A kind of adaptive video coding control system and method
CN100568956C (en) The method that a kind of Streaming Media is play fast
CN107801049A (en) A kind of real-time video transmission, player method and device
KR20050071568A (en) System and method for providing error recovery for streaming fgs encoded video over an ip network
CN101577695A (en) Method for downloading data based on P2P technology

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