CN112770132B - Method and system for reducing MP4 video outlet flow in proxy cache - Google Patents

Method and system for reducing MP4 video outlet flow in proxy cache Download PDF

Info

Publication number
CN112770132B
CN112770132B CN202110008479.3A CN202110008479A CN112770132B CN 112770132 B CN112770132 B CN 112770132B CN 202110008479 A CN202110008479 A CN 202110008479A CN 112770132 B CN112770132 B CN 112770132B
Authority
CN
China
Prior art keywords
video
file
data
dragging
request
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
CN202110008479.3A
Other languages
Chinese (zh)
Other versions
CN112770132A (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.)
BEIJING NETEAST TECHNOLOGIES CO LTD
Original Assignee
BEIJING NETEAST TECHNOLOGIES CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING NETEAST TECHNOLOGIES CO LTD filed Critical BEIJING NETEAST TECHNOLOGIES CO LTD
Priority to CN202110008479.3A priority Critical patent/CN112770132B/en
Publication of CN112770132A publication Critical patent/CN112770132A/en
Application granted granted Critical
Publication of CN112770132B publication Critical patent/CN112770132B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • 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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • 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/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages
    • H04N21/8113Monomedia components thereof involving special audio data, e.g. different tracks for different languages comprising music, e.g. song in MP3 format

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for reducing MP4 video outlet flow in a proxy cache, wherein the method comprises the following steps: the cache server receives a user request carrying the dragging parameter, removes the dragging parameter in the user request and sends the user request to the video source station; acquiring video head information of an MP4 video file and the length of the MP4 video file from a video source station; creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not; sending a request carrying dragging parameters to a video source station, and receiving data returned by the video source station; forming a new video head file and partial video data based on the structure of the dragged video file; calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file; and returning the new video head file and the video data to the user.

Description

Method and system for reducing MP4 video outlet flow in proxy cache
Technical Field
The invention relates to the field of computers, in particular to a method and a system for reducing MP4 video outlet flow in a proxy cache.
Background
With the improvement of the bandwidth and the speed of the internet, the internet is rapidly changed from originally focusing on webpage flow and text transmission of instant messaging to focusing on services such as high-speed downloading, video on demand while playing high-rate video, and the like, and the requirement on the video is also changed from no pursuit to pursuit of high-definition and high-rate video content.
For medium and small-sized operators, most network video resources are not stored in a local network, but can be acquired only by purchasing an outlet of the connected telecom, and the outlet congestion may be caused between the peak periods of the online, so that the online experience of users is influenced.
The cache system has two modes, one mode is a hotspot triggering mode, if the resources reach corresponding heat degree, the cache system can go out of the network to download one resource independently, which can cause that one extra download flow is occupied. The second one is a proxy mode, which guides the 302 redirection mode of the user request HTTP protocol or the dns mode to the cache server, the cache server uses the proxy mode to serve the user, and stores the resources in the proxy to the local, if the user accesses HTTP:// www.you u.com/kele.mp4, the proxy cache server will store the file to the local while replacing the user proxy resources, and when there is a user request next time, the user can be served directly from the disk without going to the source station again for downloading.
The second mode can reduce an extra download resource, but the user may sometimes download in a dragging manner, for example, using start =100 (meaning starting from the 100 th second of the video), and for an MP4 file, an independent MP4 file may be generated, which has different video head information, completely different from the original file, and this results in that the file after dragging cannot be saved by the cache system, because the dragging of the user is unpredictable, it is impossible to cache the dragged file every second, and thus the disk space is inevitably insufficient. Therefore, the cache system can only become a pure proxy for the drag file, and cannot store the downloaded content on the disk, which causes waste of the outgoing traffic.
The structure of the MP4 file is divided into 2 parts, where the first part of the file is the description information of the video, specifically corresponding to the description and position of each video frame, and becomes the video head, and the last part of the video head is the specific video data, which is divided into audio frames and video frames.
MP4 supports the generation of dragging by using time, and according to specific seconds, a specific position of video data in a file can be calculated from a video head, and the video content after dragging is obtained from the position to the end of the file. And because of the change of the video content, a new video header must be formed, and the new video header can re-describe the data information of the dragged video file.
Disclosure of Invention
The invention aims at a second proxy cache mode, which can only serve as a stored proxy service for dragged video files and can not write actual downloaded data into a disk, thereby wasting the traffic of the outgoing network. Therefore, the invention provides a method for reducing MP4 video outlet flow in a proxy cache, which can calculate the position of the resource in a complete video file by analyzing the video content of the video resource dragged according to time, write the data into the actual position of the complete video file, and record the data in a bitmap form.
To achieve the above object, embodiment 1 of the present invention provides a method for reducing MP4 video egress traffic in a proxy cache, where the method includes:
the cache server receives a user request carrying the dragging parameters, removes the dragging parameters in the user request and sends the user request to the video source station; acquiring video head information of the MP4 video file and the length of the MP4 video file from a video source station;
creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
sending a request carrying dragging parameters to a video source station, and receiving data returned by the video source station;
forming a new video head file and partial video data based on the structure of the dragged video file;
calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file;
and returning the new video head file and the video data to the user.
As an improvement of the above method, the method further comprises:
a scheduling server intercepts a request sent to a video source station by a user, wherein the request carries a dragging parameter; the dragging parameter is dragging time corresponding to the video displacement dragged by the user;
the scheduling server sends a redirection request to the user;
the cache server establishes a connection with the user.
As an improvement of the above method, the cache server calculates a position of the dragged video in the MP4 video file, and writes the data into an assigned position of the local cache file, specifically including:
aligning the video data of the MP4 video file with part of the video data of the dragged video file, and acquiring the position of the dragged video file in a local cache file;
and writing the data into the local cache file at the position.
As an improvement of the above method, the method further comprises: when a cache server receives a request carrying a dragging parameter of a user, and finds that a local cache file corresponding to the request is stored locally, but existing data in the local cache file cannot meet the dragging request, a new video head file is generated according to the dragging parameter, then a new dragging parameter is calculated according to a mapping mark file and the position of data lacking in the local cache file, a request carrying the new dragging parameter is sent to a video source station, and video data returned by the video source station is received; and calculating the position of the video data in the local cache file, writing the video data into the position, updating the mapping mark file, and returning the new video head file, the locally cached video data and the video data returned by the video source station to the user.
As an improvement of the above method, the method further comprises: when the cache server receives a request carrying a dragging parameter from a user, a local cache file corresponding to the request is found to be stored locally, and existing data in the local cache file can meet the dragging request, a new video head is generated according to the dragging parameter; calculating the position of the local cache file according to the dragging parameter; acquiring video data from a local cache file based on the position; and returning the video head and the video data to the user.
Embodiment 2 of the present invention further provides a system for reducing MP4 video egress traffic in a proxy cache, where the system includes a first data request module, a file creation module, a second data request module, a file update module, and a video data output module, which are arranged on a cache server;
the first data request module is used for receiving a user request carrying dragging parameters, removing the dragging parameters in the user request and sending the user request to the video source station; acquiring video head information of the MP4 video file and the length of the MP4 video file from a video source station;
the file creating module is used for creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
the second data request module is used for sending a request carrying the dragging parameter to the video source station and receiving data returned by the video source station;
the file updating module is used for forming a new video head file and partial video data based on the structure of the dragged video file; calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file;
and the video data output module is used for returning the new video head file and the video data to the user.
As an improvement of the above system, the system further comprises: the scheduling server is used for intercepting a request sent by a user to the video source station, wherein the request carries a dragging parameter, and the dragging parameter is dragging time corresponding to the displacement of a video dragged by the user; a redirect request is sent to the user.
As an improvement of the above system, the specific implementation process of the file update module includes:
aligning the video data of the MP4 video file with part of the video data of the dragged video file, and acquiring the position of the dragged video file in a local cache file;
and writing the data into the local cache file at the position.
As an improvement of the above system, the cache server is further configured to: receiving a request carrying dragging parameters of a user, and if the local cache file corresponding to the request is locally stored but the existing data in the local cache file cannot meet the dragging request, firstly generating a new video head file according to the dragging parameters, then calculating a new dragging parameter according to the mapping mark file and the data position lacking in the local cache file, sending the request carrying the new dragging parameters to a video source station, and receiving the video data returned by the video source station; and calculating the position of the video data in the local cache file, writing the video data into the position, updating the mapping mark file, and returning the new video head file, the locally cached video data and the video data returned by the video source station to the user.
As an improvement of the above system, the cache server is further configured to: receiving a request carrying dragging parameters from a user, and generating a new video head according to the dragging parameters when a local cache file corresponding to the request is found to be locally stored and existing data in the local cache file can meet the dragging request; calculating the position of the local cache file according to the dragging parameter; acquiring video data from a local cache file based on the position; and returning the video head and the video data to the user.
The invention has the advantages that:
1. the method of the invention carries out accurate combination on fragmented MP4 (Moving Picture Experts Group 4) on the proxy cache system, thus reducing the traffic of the network;
2. the method writes the video dragging data which cannot be written into the disk originally into the mapping position of the local cache file through calculation, can reduce the network outlet flow and avoid increasing the network congestion condition of small and medium-sized operators;
3. by the method, the dragged video data which cannot be stored originally can be effectively stored, so that the outgoing flow of the cache system is reduced; after the technology is used, the network outlet flow of a single cache server is reduced by 10%, and the outlet pressure of an operator is reduced.
Drawings
Fig. 1 is a proxy flow of a general cache server (the proxy server does not have the video file);
FIG. 2is a service flow of a general cache server (the proxy server has the video file);
fig. 3 is a flow of a general cache server facing dragging a video (only proxy, video data cannot be written into a local file);
fig. 4 is a timing diagram illustrating a method for reducing MP4 video egress traffic in a proxy cache according to embodiment 1 of the present invention;
fig. 5 is a timing diagram illustrating a method for reducing MP4 video egress traffic in a proxy cache according to embodiment 2 of the present invention;
fig. 6 is a timing diagram illustrating a method for reducing MP4 video egress traffic in a proxy cache according to embodiment 3 of the present invention;
FIG. 7 is a diagram of the data structure of an MP4 file;
FIG. 8 is a diagram illustrating a data structure of a dragged MP4 file;
fig. 9 is a schematic diagram of a merging process of an MP4 file before being dragged and an MP4 file after being dragged;
fig. 10 is a schematic structural diagram of the merged MP4 file before the dragging and the MP4 file after the dragging.
Detailed Description
The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
Example 1
If the cache server has no information of the original video file, when the user uses the drag parameter to access the video, the cache server removes the drag parameter, and separately downloads a piece of video header information of the complete MP4 file and obtains the length of the complete file (content-length data of the HTTP protocol) from the source station server.
As shown in fig. 4, a method for reducing MP4 video egress traffic in a proxy cache according to embodiment 1 of the present invention includes:
step 101) a user requests a video file from a source station (video content provider); and carrying dragging parameters;
step 102), a dispatching server intercepts a request of a user;
step 103) the dispatching server sends a redirection request to the user;
step 104) the user establishes connection with a cache server;
step 105), the cache server finds that no complete video file exists locally;
step 106) the cache server removes the dragging parameter and requests the original video from the source station;
step 107) the source station returns original video data to the cache server;
step 108) the cache server obtains the length of the original video file and the header information of the video;
creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
step 109) a request for disconnecting the cache server from the source station is sent;
step 1010) the cache server initiates a request to the source station by using the dragging parameter;
step 1011) the source station returns data to the cache server;
step 1012) the cache server calculates the position of the dragged video in the original video;
step 1013) the cache server writes the data into the designated position of the local cache file;
step 1014) the cache server updates the mapping mark file;
step 1015) the cache server returns the data to the user;
step 1016) the cache server determines whether the mapping flag file is 100%, i.e. all video file data is cached locally.
If the cache server already has the information of the original video file, when a user accesses the video by using the dragging parameter, the stored data is found to be not satisfied with the dragging according to the mapping mark file, the cache server can calculate a new dragging parameter from the position of the lacking data according to the mapping mark file, perform the proxy of the network, calculate the position of the video in the complete file, write the local cache file, and update the mapping mark file.
As shown in fig. 5, the method further comprises:
step 201) a user requests a video file from a source station (video content provider); and carrying dragging parameters;
step 202), intercepting a request of a user by a scheduling server;
step 203), the dispatching server sends a redirection request to the user;
step 204), establishing connection between the user and a cache server;
step 205) the cache server finds that the local cache file of the video is stored locally;
step 206), the cache server judges that the existing data can not meet the dragging request according to the mapping mark file;
step 207) the cache server calculates a new dragging parameter according to the mapping tag file;
step 208) the cache server initiates an agent request to the source station by using the new dragging parameter;
step 209) the source station returns data to the cache server;
step 2010), the cache server calculates the position of the dragged video in the original video;
step 2011) the cache server writes the data into the designated position of the local cache file;
step 2012) the cache server updates the mapping tag file;
step 2013) the cache server returns the data to the user;
step 2014) the cache server determines whether the mapping tag file is 100%, that is, all the video file data is cached locally.
If the cache server already has the information of the original video file, when a user accesses the video by using the dragging parameter, the stored data can meet the dragging according to the mapping mark file, the cache server forms a new video head according to the dragging parameter, calculates the data position of the file according to the dragging parameter, combines the video head and the data and sends the combined data to the user.
As shown in fig. 6, the method further comprises:
step 301) a user requests a video file from a source station (video content provider); and carrying dragging parameters;
step 302) the dispatching server intercepts the request of the user;
step 303) the dispatching server sends a redirection request to the user;
step 304) the user establishes connection with the cache server;
step 305), the cache server finds a local cache file locally storing the video;
step 306), the cache server judges that the existing data can meet the dragging request according to the mapping mark file;
step 307) the cache server generates a new video head according to the dragging parameter;
step 308), the cache server calculates the position of the video data according to the dragging parameter;
step 309), the cache server returns the video head and the video data to the user;
MP4 (MPEG-4 part 14) is a common multimedia container format, defined in the "ISO/IEC 14496-14" standard file, which is part of MPEG-4, an implementation of the media format defined in the "ISO/IEC 14496-12 (MPEG-4 part 12ISO base media file format)" standard, which defines a common media file structure standard. MP4 is a more fully described container format that is believed to embed any form of data, including various encoded video, audio, etc., in its entirety, although most MP4 files commonly store AVC (h.264) or MPEG-4 (Part 2) encoded video and AAC encoded audio. MP4, and other MP 4-based extensions or contracted versions of the format include: M4V,3GP, F4V, etc.
MP4 is composed of several boxes, the big box stores small boxes, and the first level nests the first level to store media information. The basic structure of the box is: a header portion and a data portion, wherein the size of the header portion indicates the size occupied by the entire box, including the header portion. If the box is large (e.g., mdat box storing a particular video data), the maximum value of the uint32 is exceeded, the size is set to 1, and the next 8-bit uint64 is used to store the size.
An MP4 file may contain a very large number of boxes, where the box data corresponds to the video data one-to-one, and if the video data changes the start position, the header file needs to be regenerated. The invention does not modify the definition and structure of MP4, but adds a method for merging MP4 in the process of caching proxy.
The structure of the complete MP4 file is shown in fig. 7. The structure of the MP4 file after dragging forms a new video header file and a part of video data, as shown in fig. 8. At this time, because the video head is different from the original video head, the conventional proxy cache will abandon the file, and cannot cache the file, and if the file needs to be cached, only a complete file can be downloaded again. Dragging is only carried out from a certain position of the video file to be intercepted backwards, so that the end of the video file is consistent, 2 groups of files are aligned with the tail of the file, and the position of the dragged video file in the complete video is positioned. As shown in fig. 9.
As shown in fig. 10, the position of the dragged video position in the complete video is calculated, the specified position of the complete video file is written according to the calculated position of the dragged video data in the complete video, new video data can be formed after other dragging operations are performed, and the video file is considered to be downloaded after the whole video data is filled.
MP4 operation function
int64_t mp4_getHead_getPos(const char*filename,uint64_t pos,int*time);
And obtaining the dragging time corresponding to the displacement of the video in the displacement through the displacement of the file and the expected required video content.
Parameters are as follows:
MP4 file path
Video data displacement
Video time (output) of the position pair
int64_t mp4_GetKeyPos(const char*filename,uint64_t reqtime,int*headlen,uint64_t*offset,void**buf);
And returning the displacement of the corresponding video content and the new MP4 header content through the file and the dragging time.
Parameters are as follows:
MP4 file path
Drag time of video
New MP4 head length (output)
Corresponding video data displacement (output)
New MP4 content (output)
Bitmap class structure
Figure BDA0002884050660000081
Figure BDA0002884050660000091
And judging whether the file is complete.
Example 2
Embodiment 2 of the present invention further provides a system for reducing MP4 video egress traffic in a proxy cache, where the system includes a first data request module, a file creation module, a second data request module, a file update module, and a video data output module, which are arranged on a cache server;
the first data request module is used for receiving a user request carrying the dragging parameters, removing the dragging parameters in the user request and sending the user request to the video source station; acquiring video head information of the MP4 video file and the length of the MP4 video file from a video source station;
the file creating module is used for creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
the second data request module is used for sending a request carrying the dragging parameter to the video source station and receiving data returned by the video source station;
the file updating module is used for forming a new video head file and partial video data based on the structure of the dragged video file; calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file;
and the video data output module is used for returning the new video head file and the video data to the user.
The system further comprises: the scheduling server is used for intercepting a request sent to the video source station by a user, wherein the request carries a dragging parameter, and the dragging parameter is dragging time corresponding to the video displacement dragged by the user; a redirect request is sent to the user.
The cache server is further configured to: receiving a request carrying dragging parameters of a user, and if the local cache file corresponding to the request is found to be stored locally but existing data in the local cache file cannot meet the dragging request, firstly generating a new video head file according to the dragging parameters, then calculating a new dragging parameter according to a mapping mark file and a data position lacking in the local cache file, sending the request carrying the new dragging parameters to a video source station, and receiving video data returned by the video source station; and calculating the position of the video data in the local cache file, writing the video data into the position, updating the mapping mark file, and returning the new video head file, the locally cached video data and the video data returned by the video source station to the user.
The cache server is further configured to: receiving a request carrying dragging parameters from a user, and generating a new video head according to the dragging parameters when a local cache file corresponding to the request is found to be locally stored and existing data in the local cache file can meet the dragging request; calculating the position of the local cache file according to the dragging parameter; acquiring video data from a local cache file based on the position; and returning the video head and the video data to the user.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and are not limited. Although the present invention has been described in detail with reference to the embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (7)

1. A method of reducing MP4 video egress traffic in a proxy cache, the method comprising:
the cache server receives a user request carrying the dragging parameters, removes the dragging parameters in the user request and sends the user request to the video source station; acquiring video head information of the MP4 video file and the length of the MP4 video file from a video source station;
creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
sending a request carrying dragging parameters to a video source station, and receiving data returned by the video source station;
forming a new video head file and partial video data based on the structure of the dragged video file; calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file;
returning the new video head file and the video data to the user;
the method further comprises the following steps: when a cache server receives a request carrying a dragging parameter of a user, and finds that a local cache file corresponding to the request is stored locally, but existing data in the local cache file cannot meet the dragging request, a new video head file is generated according to the dragging parameter, then a new dragging parameter is calculated according to a mapping mark file and the position of data lacking in the local cache file, a request carrying the new dragging parameter is sent to a video source station, and video data returned by the video source station is received; and calculating the position of the video data in the local cache file, writing the video data into the position, updating the mapping mark file, and returning the new video head file, the locally cached video data and the video data returned by the video source station to the user.
2. The method of claim 1, wherein the method further comprises:
a scheduling server intercepts a request sent to a video source station by a user, wherein the request carries a dragging parameter; the dragging parameter is dragging time corresponding to the displacement of the video dragged by the user;
the scheduling server sends a redirection request to the user;
the cache server establishes a connection with the user.
3. The method according to claim 1, wherein the calculating a position of the dragged video in the MP4 video file based on the partial video data and writing the partial video data into the local cache file at the position includes:
aligning the video data of the MP4 video file and part of the video data of the dragged video file, and acquiring the position of the dragged video file in the local cache file;
and writing the data into the local cache file at the position.
4. A system for reducing MP4 video outlet flow in a proxy cache is characterized by comprising a first data request module, a file creation module, a second data request module, a file updating module and a video data output module which are arranged on a cache server;
the first data request module is used for receiving a user request carrying the dragging parameters, removing the dragging parameters in the user request and sending the user request to the video source station; acquiring video head information of the MP4 video file and the length of the MP4 video file from a video source station;
the file creating module is used for creating a local cache file with the same length as the MP4 video file and a corresponding mapping mark file; the mapping mark file is used for marking whether each data block of the local cache file has data or not;
the second data request module is used for sending a request carrying the dragging parameter to the video source station and receiving data returned by the video source station;
the file updating module is used for forming a new video head file and partial video data based on the structure of the dragged video file; calculating the position of the dragged video in the MP4 video file based on part of the video data, writing part of the video data into the position of the local cache file, and then updating the mapping mark file;
and the video data output module is used for returning the new video head file and the video data to the user.
5. The system of claim 4, wherein the system further comprises: the scheduling server is used for intercepting a request sent to the video source station by a user, wherein the request carries a dragging parameter, and the dragging parameter is dragging time corresponding to the video displacement dragged by the user; a redirect request is sent to the user.
6. The system for reducing MP4 video egress traffic in a proxy cache according to claim 4, wherein the specific implementation process of the file update module includes:
aligning the video data of the MP4 video file with part of the video data of the dragged video file, and acquiring the position of the dragged video file in a local cache file;
and writing the data into the local cache file at the position.
7. The system for reducing MP4 video egress traffic in a proxy cache of claim 4, wherein the cache server is further configured to: receiving a request carrying dragging parameters of a user, and if the local cache file corresponding to the request is locally stored but the existing data in the local cache file cannot meet the dragging request, firstly generating a new video head file according to the dragging parameters, then calculating a new dragging parameter according to the mapping mark file and the data position lacking in the local cache file, sending the request carrying the new dragging parameters to a video source station, and receiving the video data returned by the video source station; and calculating the position of the video data in the local cache file, writing the video data into the position, updating the mapping mark file, and returning the new video head file, the locally cached video data and the video data returned by the video source station to the user.
CN202110008479.3A 2021-01-05 2021-01-05 Method and system for reducing MP4 video outlet flow in proxy cache Active CN112770132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110008479.3A CN112770132B (en) 2021-01-05 2021-01-05 Method and system for reducing MP4 video outlet flow in proxy cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110008479.3A CN112770132B (en) 2021-01-05 2021-01-05 Method and system for reducing MP4 video outlet flow in proxy cache

Publications (2)

Publication Number Publication Date
CN112770132A CN112770132A (en) 2021-05-07
CN112770132B true CN112770132B (en) 2023-01-24

Family

ID=75699277

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110008479.3A Active CN112770132B (en) 2021-01-05 2021-01-05 Method and system for reducing MP4 video outlet flow in proxy cache

Country Status (1)

Country Link
CN (1) CN112770132B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013075342A1 (en) * 2011-11-26 2013-05-30 华为技术有限公司 Video processing method and device
WO2014015168A2 (en) * 2012-07-18 2014-01-23 Skyfire Labs, Inc. Just-in-time distributed video cache
CN105893429A (en) * 2015-12-08 2016-08-24 乐视云计算有限公司 Method and system for optimizing WEB cache
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN110062274A (en) * 2019-04-30 2019-07-26 深圳市迅雷网络技术有限公司 A kind of video file caching method, device, equipment and readable storage medium storing program for executing
CN111464757A (en) * 2019-01-21 2020-07-28 西安诺瓦电子科技有限公司 Video processing method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013075342A1 (en) * 2011-11-26 2013-05-30 华为技术有限公司 Video processing method and device
WO2014015168A2 (en) * 2012-07-18 2014-01-23 Skyfire Labs, Inc. Just-in-time distributed video cache
CN105893429A (en) * 2015-12-08 2016-08-24 乐视云计算有限公司 Method and system for optimizing WEB cache
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN111464757A (en) * 2019-01-21 2020-07-28 西安诺瓦电子科技有限公司 Video processing method, device and system
CN110062274A (en) * 2019-04-30 2019-07-26 深圳市迅雷网络技术有限公司 A kind of video file caching method, device, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN112770132A (en) 2021-05-07

Similar Documents

Publication Publication Date Title
US10616301B2 (en) Request-based encoding for streaming content portions
Ma et al. Framework for adaptive content delivery in heterogeneous network environments
US7941553B2 (en) Method and device for streaming a media file over a distributed information system
JP6014870B2 (en) Method and system for real-time transmax conversion of streaming media content
CN106878315B (en) Variable rate media delivery system
US9183576B2 (en) Methods and systems for inserting media content
KR101330052B1 (en) Method for providing content caching service in adapted content streaming and local caching device thereof
EP2521369A2 (en) Media file storage format and adaptive delivery system
EP2779658A2 (en) Segmented content delivery
US9794375B2 (en) Method, apparatus, and non-transitory computer medium for obtaining a required frame size for a compressed data frame
US20040010613A1 (en) Storage and distribution of segmented media data
US11310550B2 (en) System and method for storing multimedia files using an archive file format
EP2779537A1 (en) A method, apparatus and computer program for encoding data of a media file
CN110870282A (en) Processing media data using file tracks of web content
CN109104614A (en) A kind of live streaming caching system and method
CN108513162A (en) Caching, playback method and the system reviewed is broadcast live
CN109089175B (en) Video cache acceleration method and device
US20020147827A1 (en) Method, system and computer program product for streaming of data
WO2014072739A1 (en) Video distribution
CN112770132B (en) Method and system for reducing MP4 video outlet flow in proxy cache
KR20060113678A (en) System, method, and computer program product for remotely determining the configuration of a multi-media content user
KR100733247B1 (en) Systems and methods for selecting a provider
JP5180196B2 (en) Method, system and device for reporting user agent profile information
EP4391559A1 (en) Method for delivering an audio and/or video content and transcoding proxy implementing said method
WO2024006810A1 (en) Media content boundary-aware encoding

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