CN113473247A - Video playing request processing method, device and system and electronic equipment - Google Patents

Video playing request processing method, device and system and electronic equipment Download PDF

Info

Publication number
CN113473247A
CN113473247A CN202010235484.3A CN202010235484A CN113473247A CN 113473247 A CN113473247 A CN 113473247A CN 202010235484 A CN202010235484 A CN 202010235484A CN 113473247 A CN113473247 A CN 113473247A
Authority
CN
China
Prior art keywords
target video
fragment
video
target
key information
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.)
Granted
Application number
CN202010235484.3A
Other languages
Chinese (zh)
Other versions
CN113473247B (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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology 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 Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202010235484.3A priority Critical patent/CN113473247B/en
Publication of CN113473247A publication Critical patent/CN113473247A/en
Application granted granted Critical
Publication of CN113473247B publication Critical patent/CN113473247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23103Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion using load balancing strategies, e.g. by placing or distributing content on different disks, different memories or different servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the application provides a video playing request processing method, a video playing request processing device, a video playing request processing system and electronic equipment, wherein an nginx server can receive a video playing request sent by a client, and send an identifier of a target playing progress and an identifier of a target video file to a cache memory; the cache memory acquires key information of the target video file based on the identification of the target video file, determines a video fragment corresponding to the target playing progress based on the key information, and sends fragment data of the target video fragment to the nginx server; and the nginx server forwards the fragment data of the target video fragment to the client. Based on the processing, the time delay of playing the video by the client can be reduced.

Description

Video playing request processing method, device and system and electronic equipment
Technical Field
The present application relates to the field of computer network technologies, and in particular, to a method, an apparatus, a system, and an electronic device for processing a video playing request.
Background
With the rapid development of computer Network technology, the use of a CDN (Content Delivery Network) is also becoming more and more widespread, for example, a video on demand service can be realized based on the CDN. In the related art, the CDN may segment a video file to obtain segment data of a plurality of video segments, and store the segment data.
In the process of watching a video by a user, if uninteresting video content needs to be skipped over, the user can drag a playing progress bar in the client, and correspondingly, the client can send a video playing request corresponding to the playing progress dragged by the user to the CDN. After receiving the video playing request, the nginx server in the CDN may request, from a cache (cache) memory, key information of a video file requested to be played by the client, where the key information of the video may include a correspondence between video segments and a playing progress. After obtaining the key information of the video file from the cache memory, the nginx server may determine, according to the key information, a video segment corresponding to the playing progress dragged by the user, and request segment data of the determined video segment from the cache memory. After receiving the fragment data sent by the cache memory, the nginx server may forward the fragment data to the client.
However, the nginx server may need to request the cache memory multiple times to obtain the complete key information of the video file, which may consume a long time and further may cause a long time delay for the client to play the video.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, a system, and an electronic device for processing a video playing request, which can reduce the delay of playing a video by a client. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present application discloses a video playing request processing system, where the system includes an nginx server and a cache memory, where:
the nginx server is used for receiving a video playing request sent by a client, wherein the video playing request is generated by the client when a user drags a playing progress bar, the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client, and the identifier of the target playing progress and the identifier of the target video file are sent to the cache memory;
the cache memory is used for acquiring key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and playing progress, determining the video fragments corresponding to the target playing progress as target video fragments based on the key information, and sending fragment data of the target video fragments to the nginx server;
the nginx server is further configured to forward the fragment data of the target video fragment to the client.
Optionally, the cache memory is specifically configured to determine whether key information of the target video file is cached locally based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
Optionally, the cache memory is further configured to determine whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
Optionally, the cache memory is further configured to send a source return request to a preset node, where the source return request is used to request fragment data of the uncached video fragment; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
In a second aspect, to achieve the above object, an embodiment of the present application further discloses a method for processing a video playing request, where the method is applied to a cache memory, and the method includes:
receiving an identifier of a target playing progress and an identifier of a target video file sent by a nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
acquiring key information of the target video file based on the identification of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
determining a video fragment corresponding to the target playing progress based on the key information, and taking the video fragment as a target video fragment;
and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
Optionally, the obtaining key information of the target video file based on the identifier of the target video file includes:
judging whether key information of the target video file is cached locally or not based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
Optionally, before the sending the fragment data of the target video fragment to the nginx server, the method further includes:
judging whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
Optionally, after obtaining the key information of the target video file based on the identifier of the target video file, the method further includes:
sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
In order to achieve the above object, an embodiment of the present application further discloses a method for processing a video playing request, where the method is applied to an nginx server, and the method includes:
receiving a video playing request sent by a client, wherein the video playing request is generated by the client when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
sending the identifier of the target playing progress and the identifier of the target video file to a cache memory so that the cache memory obtains key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and playing progress, determining the video fragments corresponding to the target playing progress as target video fragments based on the key information, and sending fragment data of the target video fragments to the nginx server;
and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
In a fourth aspect, in order to achieve the above object, an embodiment of the present application further discloses a video playing request processing apparatus, where the apparatus is applied to a cache memory, and the apparatus includes:
the receiving module is used for receiving an identifier of a target playing progress and an identifier of a target video file which are sent by an nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
the acquisition module is used for acquiring key information of the target video file based on the identifier of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
the determining module is used for determining the video fragments corresponding to the target playing progress based on the key information and taking the video fragments as target video fragments;
and the sending module is used for sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
Optionally, the obtaining module is specifically configured to determine whether key information of the target video file is cached locally based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
Optionally, the apparatus further comprises:
the processing module is used for judging whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
Optionally, the apparatus further comprises:
the request module is used for sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
In a fifth aspect, in order to achieve the above object, an embodiment of the present application further discloses a video playing request processing apparatus, where the apparatus is applied to an nginx server, and the apparatus includes:
the system comprises a receiving module and a processing module, wherein the receiving module is used for receiving a video playing request sent by a client, the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
a sending module, configured to send an identifier of the target playing progress and an identifier of the target video file to a cache memory, so that the cache memory obtains key information of the target video file based on the identifier of the target video file, where the key information includes a correspondence between video segments and playing progress, determines, based on the key information, a video segment corresponding to the target playing progress as a target video segment, and sends segment data of the target video segment to the nginx server;
and the forwarding module is used for forwarding the fragment data of the target video fragment to the client when receiving the fragment data of the target video fragment sent by the cache memory.
In a sixth aspect, to achieve the above object, an embodiment of the present application further discloses an electronic device, where the electronic device includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the video playing request processing method according to the second aspect when executing the program stored in the memory.
In a seventh aspect, to achieve the above object, an embodiment of the present application further discloses an electronic device, where the electronic device includes a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to implement the video playing request processing method according to the third aspect when executing the program stored in the memory.
In an eighth aspect, in order to achieve the above object, an embodiment of the present application further discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method for processing a video playing request according to the second aspect is implemented.
In a ninth aspect, to achieve the above object, an embodiment of the present application further discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method for processing a video playing request according to the third aspect is implemented.
In a tenth aspect, to achieve the above object, an embodiment of the present application further discloses a computer program product containing instructions, which when run on a computer, causes the computer to execute the video playing request processing method according to the second aspect.
In an eleventh aspect, to achieve the above object, an embodiment of the present application further discloses a computer program product containing instructions, which when run on a computer, causes the computer to execute the video playing request processing method in the above three aspects.
The embodiment of the application provides a video playing request processing method, a nginx server can receive a video playing request sent by a client, wherein, the video playing request is generated when a user drags a playing progress bar, the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client, the nginx server can send the identifier of the target playing progress and the identifier of the target video file to the cache memory, the cache memory obtains key information of the target video file based on the identifier of the target video file, further, based on the key information, determining the video segment corresponding to the target playing progress as the target video segment, and sending the fragment data of the target video fragment to the nginx server, and then forwarding the fragment data of the target video fragment to the client by the nginx server.
Based on the processing, the cache memory is responsible for determining the target video fragment corresponding to the target playing progress dragged by the user based on the key information, and sending the fragment data of the target video fragment to the nginx server, and the cache memory does not need to send the key information of the target video file to the nginx server.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an architecture diagram of a video play request processing system according to an embodiment of the present application;
fig. 2 is a flowchart of a video playing request processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a video playing request processing method according to an embodiment of the present application;
fig. 4 is an architecture diagram of a network provided by an embodiment of the present application;
fig. 5 is an architecture diagram of an edge node according to an embodiment of the present application;
fig. 6 is a signaling interaction diagram for processing a video playing request according to an embodiment of the present application;
fig. 7 is a structural diagram of a video playing request processing apparatus according to an embodiment of the present application;
fig. 8 is a structural diagram of a video playing request processing apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, when a user drags a playing progress bar through a client, the client can send a corresponding video playing request to the CDN, in order to respond to the video playing request, the nginx server in the CDN may need to request the cache memory multiple times to obtain the complete key information of the video file, and then obtain the fragment data requested by the client from the cache memory according to the key information, which may consume a long time in the above processing process, and further may cause a long time delay for the client to play the video.
In order to solve the above problem, an embodiment of the present application provides a video playing request processing system, and referring to fig. 1, fig. 1 is an architecture diagram of a video playing request processing system provided in an embodiment of the present application, and the system may include an nginx server and a cache memory.
The nginx server can receive a video playing request sent by the client, wherein the video playing request is generated when the client drags a playing progress bar, the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client, and then the nginx server can send the identifier of the target playing progress and the identifier of the target video file to the cache memory.
Correspondingly, the cache memory can obtain key information of the target video file based on the identifier of the target video file, further determine video fragments (namely target video fragments) corresponding to the target playing progress based on the key information, and send fragment data of the target video fragments to the nginx server.
Further, the nginx server may forward the fragment data of the target video fragment to the client.
Based on the system, the cache memory is responsible for determining the target video fragment corresponding to the target playing progress dragged by the user based on the key information, and sending the fragment data of the target video fragment to the nginx server, and the cache memory does not need to send the key information of the target video file to the nginx server.
With regard to other related embodiments of the video playing request processing system, reference may be made to the related descriptions in the following method embodiments.
Referring to fig. 2, fig. 2 is a flowchart of a video playing request processing method provided in an embodiment of the present application, where the method may be applied to a cache memory in the video playing request processing system, and the method may include the following steps:
s201: and receiving the identifier of the target playing progress and the identifier of the target video file sent by the nginx server.
The identifier of the target playing progress and the identifier of the target video file are sent by the nginx server when the video playing request sent by the client is received, and the video playing request is generated by the client when a user drags the playing progress bar of the target video file to the target playing progress.
S202: and acquiring key information of the target video file based on the identifier of the target video file.
The key information may include a corresponding relationship between video clips and a playing progress.
S203: and determining the video fragment corresponding to the target playing progress as the target video fragment based on the key information.
S204: and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
It can be seen that, based on the video playing request processing method provided by the embodiment of the present application, the cache memory is responsible for determining, based on the key information, a target video fragment corresponding to a target playing progress dragged by a user, and sending fragment data of the target video fragment to the nginx server, and the cache memory does not need to send the key information of the target video file to the nginx server.
In one implementation, in step S201, the identifier of the target video file may be a URL (Uniform Resource Locator) of the target video file, but is not limited thereto.
In the process that the user watches the target video file through the client, the user can drag a playing progress bar of the video in the client to skip uninteresting video content. The client may determine a target video file currently viewed by the user and a play progress (i.e., a target play progress) dragged by the user.
For example, if the video file viewed by the user is in the mp4 format, the user may drag the play progress bar to the 20 th minute, and accordingly, the client may determine that the target play progress is at the 20 th minute, and may further determine that the video file viewed by the user is in the mp4 format.
For another example, if the video file watched by the user is in the flv format, when the user drags the play progress bar to a position, the client may determine that the video data at the position is the 1 st GB data in the video file, and the target play progress may be at the 1 st GB position, and in addition, may also determine that the video file watched by the user is in the flv format.
Furthermore, the client may send a video playing request carrying an identifier of the target playing progress and an identifier of the target video file to the CDN, and the nginx server in the CDN may receive the video playing request and forward the identifier of the target playing progress and the identifier of the target video file to the cache memory.
The video playing request may also carry a suffix name used to indicate the format of the target video file, for example, the field of. mp4 or. flv may be carried.
In an implementation manner, the nginx server may be deployed in an edge node of the CDN, and in addition, a cache memory may be deployed in the edge node. In the CDN domain, an edge node may be a cluster that contains multiple servers.
For example, one edge node may include a plurality of cache servers, the nginx server and the cache memory may be deployed in the cache servers in the form of services, and the nginx server deployed in one cache server may interact with the cache memory deployed in any other cache server in the edge node where the nginx server is located.
In addition, the edge node may further include a LVS (Linux Virtual Server) for implementing load balancing.
In an implementation manner, after receiving a video playing request sent by a client, an LVS may determine, based on a preset load balancing policy, one cache server from a plurality of cache servers in an edge node where the cache server is located, where the cache server is used to process the video playing request, and forward the video playing request to the determined cache server.
Correspondingly, the nginx server in the cache server can receive the video playing request, obtain the identifier of the target video file and the identifier of the target playing progress, and forward the identifier of the target video file and the identifier of the target playing progress to the cache memory.
In one implementation manner, in step S202, the complete data of the target video file may include: the video data portion of the target video file and key information of the target video file. The key information of the target video file may be located at the front end of the complete data of the target video file, or may be located at the tail end of the complete data of the target video file.
For example, if the target video file is in mp4 format, the key information of the target video file may be moov (metadata) information of the target video file; if the target video file is in flv format, the key information of the target video file may be script tag (script tag) information of the target video file.
After the identifier of the target video file is obtained, the cache memory can determine the target video file requested by the client according to the identifier of the target video file and obtain key information of the target video file.
In one implementation, in step S203, after obtaining key information of the target video file, the cache memory may query the key information to determine video segments corresponding to the target playing progress (i.e., target video segments).
For example, the target video file is in an mp4 format, the target playing progress is at the 20 th minute, and the cache memory can determine that the video segment corresponding to the 20 th minute is the 100 th video segment according to the key information of the target video file.
In an implementation manner, in step S204, after the target video fragment is determined, the cache memory may obtain fragment data of the target video fragment and send the fragment data to the nginx server, and accordingly, the nginx server may forward the fragment data of the target video fragment to the client.
In one embodiment, S202 may include the steps of:
judging whether key information of a target video file is cached locally or not based on an identifier of the target video file; if not, executing the step two; if yes, executing step three.
Step two, sending a source returning request for requesting key information to a preset node; and receiving key information sent by a preset node.
And step three, if the key information is cached locally, reading the key information from the local.
In one implementation, the preset node may be a source node, and the source node may store complete data of the target video file (including a video data portion of the target video file and key information of the target video file).
In the application embodiment, if the cache memory does not locally cache the key information of the target video file, the cache memory may request the source station node for the key information of the target video file.
When the source station node receives the source returning request, the key information of the target video file can be sent to the cache memory, and then the cache memory can obtain the key information of the target video file.
In another implementation, a middle node and an upper node may be further included between the edge node and the source station node. In this case, the preset node may be a source node, or may be a middle node or an upper node.
The middle-layer node can receive a source returning request sent by a cache memory in the edge node, if the middle-layer node locally caches key information of a target video file, the source returning request can be responded, and if the middle-layer node locally does not cache key information of the target video file, the source returning request can be forwarded to the upper-layer node.
Similarly, if the upper node locally caches key information of the target video file, the back-to-source request can be responded, and if the upper node does not locally cache key information of the target video file, the back-to-source request can be forwarded to the source station node and processed by the source station node.
In addition, even if the cache memory locally caches key information of the target video file, the cache memory does not necessarily locally cache fragment data of the target video fragment, and in order to ensure a normal video playing service, in one embodiment, before sending the fragment data of the target video fragment to the nginx server, the method may further include the following steps:
step 1, judging whether fragment data of target video fragments are cached locally; if not, executing the step 2, and if so, executing the step 3.
Step 2, sending a back-to-source request for requesting fragment data of the target video fragment to a preset node; and receiving fragment data of the target video fragment sent by a preset node.
And 3, locally reading the fragment data of the target video fragment.
The preset node may refer to the detailed description in the above embodiments.
In the embodiment of the application, after the target video fragment requested by the client is determined, the cache memory can judge whether fragment data of the target video fragment is cached locally.
If the fragment data of the target video fragment is not cached locally, the cache memory can request the fragment data of the target video fragment from a preset node. The preset node can send the fragment data of the target video fragment to the cache memory, correspondingly, the cache memory can forward the fragment data of the target video fragment to the nginx server, and in addition, the cache memory can also store the fragment data of the target video fragment in the local.
Subsequently, when the nginx server requests the cache memory to acquire the fragment data of the target video fragment again, the cache memory can directly acquire the fragment data of the target video fragment from the local and send the fragment data to the nginx server, and therefore the efficiency of processing the video playing request can be improved, and the time delay of playing the video by the client side is reduced.
In an embodiment, in order to further improve the efficiency of processing a video playing request and reduce the delay of playing a video by a client, after obtaining the key information of a target video file, the method may further include the following steps:
sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; and receiving fragment data of the uncached video fragments sent by the preset node, and caching the fragment data to the local.
The preset node may refer to the detailed description in the above embodiments. The uncached video slices may include locally uncached video slices in the target video file.
In an implementation manner, after the cache memory obtains key information of a target video file, the cache memory may request, to a preset node, segment data of a video segment of the target video file that is not cached (i.e., the video segment that is not cached in the embodiment of the present application), and then the cache memory may obtain complete data of the target video file and store the complete data in the local.
Subsequently, when the nginx server requests the cache memory for the fragment data of other video fragments of the target video file, the cache memory can directly obtain the corresponding fragment data from the local without returning to the source again, so that the efficiency of processing the video playing request can be further improved, and the time delay of playing the video by the client is reduced.
In an implementation manner, for a case that the length of the target video file viewed by the user is limited, for example, the target video file only provides a trial view of the first 6 minutes, if the user drags the play progress bar to the 4 th minute, the video play request sent by the client may also carry an identifier for terminating the play progress (i.e., 6 minutes), correspondingly, the cache memory may obtain the identifier for terminating the play progress, and determine that the play progress is terminated for 6 minutes, and subsequently, the cache memory may not return fragment data of the video fragments after 6 minutes to the nginx server.
In this example, if a video fragment corresponding to 4 minutes to 6 minutes is not cached locally, the cache memory may request, from a preset node, a video fragment (including a video fragment corresponding to 4 minutes to 6 minutes) that is not currently cached in the target video file, instead of requesting only a video fragment corresponding to 4 minutes to 6 minutes, that is, a source return request sent by the cache memory may not carry an identifier corresponding to 4 minutes and 6 minutes.
When requesting the uncached video fragment from the preset node, the source return request sent by the cache memory may carry an offset corresponding to the uncached video fragment.
For example, the total size of the target video file is 2G, if the video fragment of the first 1G is cached locally, the cache memory may determine that the offset corresponding to the uncached video fragment is 1G-2G, and the cache memory may carry two offset values corresponding to 1G and 2G in the source return request sent to the preset node.
Referring to fig. 3, fig. 3 is a flowchart of a video playing request processing method provided in this embodiment, where the method may be applied to an nginx server in the video playing request processing system, and the method may include the following steps:
s301: and receiving a video playing request sent by a client.
The video playing request is generated by a client when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client.
S302: and sending the identifier of the target playing progress and the identifier of the target video file to a cache memory.
And enabling the cache memory to acquire key information of the target video file based on the identifier of the target video file, determining a video fragment corresponding to the target playing progress based on the key information, taking the video fragment as the target video fragment, and sending fragment data of the target video fragment to the nginx server.
The key information comprises the corresponding relation between the video fragments and the playing progress.
S303: and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
It can be seen that, based on the video playing request processing method provided by the embodiment of the present application, the cache memory is responsible for determining, based on the key information, a target video fragment corresponding to a target playing progress dragged by a user, and sending fragment data of the target video fragment to the nginx server, and the cache memory does not need to send the key information of the target video file to the nginx server.
In one implementation, in step S301, during the process that the user views the target video file through the client, the user may drag a playing progress bar of the video in the client to skip over the video content that is not of interest.
Accordingly, the client may determine the target video file currently viewed by the user and the playing progress dragged by the user (i.e., the target playing progress).
Furthermore, the client may send a video playing request carrying an identifier of the target playing progress and an identifier of the target video file to the CDN, and the nginx server in the CDN may receive the video playing request.
In one implementation manner, in step S302, after receiving a video playing request sent by the client, the nginx server may extract an identifier of a target playing progress and an identifier of a target video file, and send the identifiers to the cache memory.
For example, the nginx server may process the identifier of the target video file based on a Hash (Hash) algorithm to obtain a corresponding Hash value, determine an edge node corresponding to the obtained Hash value based on a preset correspondence between the Hash value and the edge node, and further, the nginx server may forward the identifier of the target video file and the identifier of the target playing progress to a cache memory in the determined edge node.
In one implementation, the nginx server may encapsulate the identifier of the target video file and the identifier of the target playing progress in the request header, and send a video data acquisition request that encapsulates the identifier of the target video file and the identifier of the target playing progress to the cache memory.
Correspondingly, the cache memory may obtain key information of the target video file based on the identifier of the target video file, determine the target video fragment corresponding to the target playing progress based on the key information, and send fragment data of the target video fragment to the nginx server, where the processing method of the cache memory is described in detail in the above embodiments, and is not described here again.
In one implementation manner, in step S303, after receiving the fragment data of the target video fragment returned by the cache memory, the nginx server may forward the fragment data of the target video fragment to the client, and accordingly, the client may display a video picture for the user based on the fragment data of the target video fragment.
Referring to fig. 4, fig. 4 is an architecture diagram of a network according to an embodiment of the present application.
In fig. 4, when a user drags a play progress bar in a client, the client may send a Domain Name resolution request for an edge node to a Domain Name System (DNS), the Domain Name System may send a network address corresponding to a requested Domain Name (that is, a network address of the edge node) to the client, and the client may send a video play request to the edge node according to the network address.
If the edge node locally caches the data of the target video file, the edge node can directly respond to the video playing request, and if the edge node does not locally cache the data of the target video file, the edge node can send a corresponding back-to-source request to the source station node.
The middle layer node may receive the back-source request sent by the edge node, may respond to the back-source request if the middle layer node locally caches the data of the target video file, and may forward the back-source request to the upper layer node if the middle layer node does not locally cache the data of the target video file.
If the upper node locally caches the data of the target video file, the back-source request can be responded, and if the upper node does not locally cache the data of the target video file, the back-source request can be forwarded to the source station node and responded by the source station node.
Referring to fig. 5, fig. 5 is an architecture diagram of an edge node according to an embodiment of the present application.
In fig. 5, the edge node may include an LVS (Linux virtual server), a cache server 1 and a cache server 2, where the cache server 1 may be deployed with an nginx server 1 and a cache memory 1, and the cache server 2 may be deployed with an nginx server 2 and a cache memory 2. The embodiment of the present application is described by taking an example that an edge node includes two cache servers, but is not limited thereto.
The nginx server 1 can interact with the cache memory 1 and the cache memory 2, and similarly, the nginx server 2 can also interact with the cache memory 1 and the cache memory 2.
In an implementation manner, after receiving a video playing request sent by a client, an LVS may determine, based on a preset load balancing policy, one cache server (for example, the cache server 1) from the cache server 1 and the cache server 2 to be used for processing the video playing request, and forward the video playing request to the cache server 1.
Correspondingly, the nginx server 1 may obtain an identifier of the target video file and an identifier of the target playing progress, process the identifier of the target video file based on a Hash (Hash) algorithm to obtain a corresponding Hash value, and determine, based on a preset correspondence between the Hash value and the edge node, a cache server (e.g., the cache server 2) corresponding to the obtained Hash value, and further, the nginx server 1 may forward the identifier of the target video file and the identifier of the target playing progress to the cache memory 2.
The cache memory 2 may obtain the fragment data of the target video fragment according to the method of the embodiment of the present application, and send the fragment data of the target video fragment to the nginx server 1, and the nginx server 1 may forward the fragment data of the target video fragment to the client.
Referring to fig. 6, fig. 6 is a signaling interaction diagram for processing a video playing request according to an embodiment of the present application, where the signaling interaction diagram may include the following steps:
s601: and the client sends a video playing request to the nginx server.
The video playing request is generated by a client when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client.
S602: and the nginx server sends the identifier of the target playing progress and the identifier of the target video file to the cache memory.
S603: and the cache memory acquires key information of the target video file based on the identifier of the target video file, and determines a video fragment corresponding to the target playing progress as a target video fragment based on the key information.
The key information comprises the corresponding relation between the video fragments and the playing progress.
S604: and the cache memory sends the fragment data of the target video fragment to the nginx server.
S605: and the nginx server forwards the fragment data of the target video fragment to the client.
Based on the processing, the fragment data of the target video fragment can be obtained through one-time interaction between the nginx server and the cache memory, the interaction times between the nginx server and the cache memory can be reduced, the consumed duration is reduced, and further the time delay of the client for playing the video can be reduced.
Based on the same inventive concept, referring to fig. 7, fig. 7 is a structural diagram of a video playing request processing device provided in an embodiment of the present application, where the device is applied to a cache memory, and the device includes:
the receiving module 701 is configured to receive an identifier of a target playing progress and an identifier of a target video file sent by the nginx server, where the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
an obtaining module 702, configured to obtain key information of a target video file based on an identifier of the target video file, where the key information includes a correspondence between video segments and a playing progress;
a determining module 703, configured to determine, based on the key information, a video segment corresponding to the target playing progress as a target video segment;
a sending module 704, configured to send the fragment data of the target video fragment to the nginx server, so that the nginx server forwards the fragment data of the target video fragment to the client.
Optionally, the obtaining module 702 is specifically configured to determine whether key information of the target video file is cached locally based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving key information sent by a preset node;
and if the key information is cached locally, reading the key information from the local.
Optionally, the apparatus further comprises:
the processing module is used for judging whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a back-source request for requesting the fragment data of the target video fragment to a preset node; receiving fragment data of a target video fragment sent by a preset node;
and if the fragment data of the target video fragment is cached locally, reading the fragment data of the target video fragment from the local.
Optionally, the apparatus further comprises:
the request module is used for sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; the uncached video fragments comprise local uncached video fragments in the target video file;
and receiving fragment data of the uncached video fragments sent by the preset node, and caching the fragment data to the local.
Based on the same inventive concept, referring to fig. 8, fig. 8 is a structural diagram of a video playing request processing device provided in an embodiment of the present application, where the device is applied to a nginx server, and the device includes:
a receiving module 801, configured to receive a video playing request sent by a client, where the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
a sending module 802, configured to send an identifier of a target playing progress and an identifier of a target video file to a cache memory, so that the cache memory obtains key information of the target video file based on the identifier of the target video file, where the key information includes a correspondence between video segments and playing progress, determines, based on the key information, a video segment corresponding to the target playing progress as a target video segment, and sends segment data of the target video segment to a nginx server;
the forwarding module 803 is configured to forward the fragment data of the target video fragment to the client when receiving the fragment data of the target video fragment sent by the cache memory.
An embodiment of the present application further provides an electronic device, as shown in fig. 9, including a memory 901 and a processor 902;
a memory 901 for storing a computer program;
the processor 902 is configured to implement the video playing request processing method provided in the embodiment of the present application when executing the program stored in the memory 901.
Specifically, the video play request processing method includes:
receiving an identifier of a target playing progress and an identifier of a target video file sent by a nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
acquiring key information of the target video file based on the identification of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
determining a video fragment corresponding to the target playing progress based on the key information, and taking the video fragment as a target video fragment;
and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
An embodiment of the present application further provides an electronic device, as shown in fig. 10, including a memory 1001 and a processor 1002;
a memory 1001 for storing a computer program;
the processor 1002 is configured to implement the video playing request processing method provided in the embodiment of the present application when executing the program stored in the memory 1001.
Specifically, the video play request processing method includes:
receiving a video playing request sent by a client, wherein the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
sending an identifier of a target playing progress and an identifier of a target video file to a cache memory so that the cache memory can obtain key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and the playing progress, determining video fragments corresponding to the target playing progress based on the key information to serve as the target video fragments, and sending fragment data of the target video fragments to a nginx server;
and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
The electronic device may be provided with a communication interface for realizing communication between the electronic device and another device.
The processor, the communication interface, and the memory are configured to communicate with each other through a communication bus, where the communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the video playing request processing method provided by the embodiment of the present application.
Specifically, the video play request processing method includes:
receiving an identifier of a target playing progress and an identifier of a target video file sent by a nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
acquiring key information of the target video file based on the identification of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
determining a video fragment corresponding to the target playing progress based on the key information, and taking the video fragment as a target video fragment;
and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the video playing request processing method provided by the embodiment of the present application.
Specifically, the video play request processing method includes:
receiving a video playing request sent by a client, wherein the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
sending an identifier of a target playing progress and an identifier of a target video file to a cache memory so that the cache memory can obtain key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and the playing progress, determining video fragments corresponding to the target playing progress based on the key information to serve as the target video fragments, and sending fragment data of the target video fragments to a nginx server;
and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
The embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the video playing request processing method provided by the embodiment of the present application.
Specifically, the video play request processing method includes:
receiving an identifier of a target playing progress and an identifier of a target video file sent by a nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
acquiring key information of the target video file based on the identification of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
determining a video fragment corresponding to the target playing progress based on the key information, and taking the video fragment as a target video fragment;
and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
The embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the video playing request processing method provided by the embodiment of the present application.
Specifically, the video play request processing method includes:
receiving a video playing request sent by a client, wherein the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
sending an identifier of a target playing progress and an identifier of a target video file to a cache memory so that the cache memory can obtain key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and the playing progress, determining video fragments corresponding to the target playing progress based on the key information to serve as the target video fragments, and sending fragment data of the target video fragments to a nginx server;
and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
It should be noted that other implementation manners of the video play request processing method are the same as those of the foregoing method embodiment, and are not described herein again.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, system, electronic device, computer-readable storage medium, and computer program product embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (18)

1. A video playback request processing system, said system comprising a nginx server and a cache memory, wherein:
the nginx server is used for receiving a video playing request sent by a client, wherein the video playing request is generated by the client when a user drags a playing progress bar, the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client, and the identifier of the target playing progress and the identifier of the target video file are sent to the cache memory;
the cache memory is used for acquiring key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and playing progress, determining the video fragments corresponding to the target playing progress as target video fragments based on the key information, and sending fragment data of the target video fragments to the nginx server;
the nginx server is further configured to forward the fragment data of the target video fragment to the client.
2. The system according to claim 1, wherein the cache memory is specifically configured to determine whether key information of the target video file has been cached locally based on an identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
3. The system according to claim 1, wherein the cache memory is further configured to determine whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
4. The system according to claim 1, wherein the cache memory is further configured to send a back-to-source request for requesting fragment data of the uncached video fragment to a preset node; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
5. A video playing request processing method is applied to a cache memory, and comprises the following steps:
receiving an identifier of a target playing progress and an identifier of a target video file sent by a nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
acquiring key information of the target video file based on the identification of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
determining a video fragment corresponding to the target playing progress based on the key information, and taking the video fragment as a target video fragment;
and sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
6. The method according to claim 5, wherein the obtaining key information of the target video file based on the identification of the target video file comprises:
judging whether key information of the target video file is cached locally or not based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
7. The method according to claim 5, wherein prior to said sending the slice data of the target video slice to the nginx server, the method further comprises:
judging whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
8. The method of claim 5, wherein after obtaining key information of the target video file based on the identification of the target video file, the method further comprises:
sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
9. A video playing request processing method is applied to a nginx server, and comprises the following steps:
receiving a video playing request sent by a client, wherein the video playing request is generated by the client when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
sending the identifier of the target playing progress and the identifier of the target video file to a cache memory so that the cache memory obtains key information of the target video file based on the identifier of the target video file, wherein the key information comprises a corresponding relation between video fragments and playing progress, determining the video fragments corresponding to the target playing progress as target video fragments based on the key information, and sending fragment data of the target video fragments to the nginx server;
and when receiving the fragment data of the target video fragment sent by the cache memory, forwarding the fragment data of the target video fragment to the client.
10. A video playback request processing apparatus, wherein the apparatus is applied to a cache memory, and the apparatus comprises:
the receiving module is used for receiving an identifier of a target playing progress and an identifier of a target video file which are sent by an nginx server, wherein the identifier of the target playing progress and the identifier of the target video file are sent when the nginx server receives a video playing request sent by a client, and the video playing request is generated when a user drags a playing progress bar of the target video file to the target playing progress by the client;
the acquisition module is used for acquiring key information of the target video file based on the identifier of the target video file, wherein the key information comprises the corresponding relation between video fragments and playing progress;
the determining module is used for determining the video fragments corresponding to the target playing progress based on the key information and taking the video fragments as target video fragments;
and the sending module is used for sending the fragment data of the target video fragment to the nginx server so that the nginx server forwards the fragment data of the target video fragment to the client.
11. The apparatus according to claim 10, wherein the obtaining module is specifically configured to determine whether key information of the target video file is cached locally based on the identifier of the target video file;
if the key information is not cached locally, sending a source returning request for requesting the key information to a preset node; receiving the key information sent by the preset node;
and if the key information is cached locally, reading the key information from the local.
12. The apparatus of claim 10, further comprising:
the processing module is used for judging whether fragment data of the target video fragment is cached locally;
if the fragment data of the target video fragment is not cached locally, sending a request for requesting the return source of the fragment data of the target video fragment to a preset node; receiving fragment data of the target video fragment sent by the preset node;
and if the fragment data of the target video fragment is cached locally, the fragment data of the target video fragment is read locally.
13. The apparatus of claim 10, further comprising:
the request module is used for sending a back-to-source request for requesting fragment data of the uncached video fragments to a preset node; wherein the uncached video clips comprise local uncached video clips in the target video file;
and receiving the fragment data of the uncached video fragment sent by the preset node, and caching the fragment data to the local.
14. A video playback request processing apparatus, applied to a nginx server, the apparatus comprising:
the system comprises a receiving module and a processing module, wherein the receiving module is used for receiving a video playing request sent by a client, the video playing request is generated when a user drags a playing progress bar, and the video playing request carries an identifier of a target playing progress dragged by the user and an identifier of a target video file requested by the client;
a sending module, configured to send an identifier of the target playing progress and an identifier of the target video file to a cache memory, so that the cache memory obtains key information of the target video file based on the identifier of the target video file, where the key information includes a correspondence between video segments and playing progress, determines, based on the key information, a video segment corresponding to the target playing progress as a target video segment, and sends segment data of the target video segment to the nginx server;
and the forwarding module is used for forwarding the fragment data of the target video fragment to the client when receiving the fragment data of the target video fragment sent by the cache memory.
15. An electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, is configured to perform the method steps of any of claims 5-8.
16. An electronic device comprising a memory and a processor;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, performs the method steps of claim 9.
17. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 5-8.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of claim 9.
CN202010235484.3A 2020-03-30 2020-03-30 Video playing request processing method, device and system and electronic equipment Active CN113473247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010235484.3A CN113473247B (en) 2020-03-30 2020-03-30 Video playing request processing method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010235484.3A CN113473247B (en) 2020-03-30 2020-03-30 Video playing request processing method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN113473247A true CN113473247A (en) 2021-10-01
CN113473247B CN113473247B (en) 2022-11-04

Family

ID=77864708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010235484.3A Active CN113473247B (en) 2020-03-30 2020-03-30 Video playing request processing method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN113473247B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114051152A (en) * 2022-01-17 2022-02-15 飞狐信息技术(天津)有限公司 Video playing method and device, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006500A (en) * 2010-10-29 2011-04-06 蓝汛网络科技(北京)有限公司 Video dragging method and device applied to cache server
CN103348690A (en) * 2011-11-26 2013-10-09 华为技术有限公司 Video processing method and device
CN105763960A (en) * 2016-03-01 2016-07-13 青岛海信传媒网络技术有限公司 Method and apparatus for network video playing
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN110913272A (en) * 2019-12-03 2020-03-24 腾讯科技(深圳)有限公司 Video playing method and device, computer readable storage medium and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006500A (en) * 2010-10-29 2011-04-06 蓝汛网络科技(北京)有限公司 Video dragging method and device applied to cache server
CN103348690A (en) * 2011-11-26 2013-10-09 华为技术有限公司 Video processing method and device
US20140105576A1 (en) * 2011-11-26 2014-04-17 Huawei Technologies Co., Ltd. Video processing method apparatus
CN105763960A (en) * 2016-03-01 2016-07-13 青岛海信传媒网络技术有限公司 Method and apparatus for network video playing
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN110913272A (en) * 2019-12-03 2020-03-24 腾讯科技(深圳)有限公司 Video playing method and device, computer readable storage medium and computer equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114051152A (en) * 2022-01-17 2022-02-15 飞狐信息技术(天津)有限公司 Video playing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113473247B (en) 2022-11-04

Similar Documents

Publication Publication Date Title
US10313726B2 (en) Distributing media content via media channels based on associated content being provided over other media channels
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
WO2017096830A1 (en) Content delivery method and scheduling proxy server for cdn platform
US11729249B2 (en) Network address resolution
US9356985B2 (en) Streaming video to cellular phones
US20210400317A1 (en) Method for processing video-dragging data, and proxy server
CN105100818A (en) Website video playing method and system and website server
CN112468839B (en) Playback method, system, device and readable storage medium of live content
CN112584200B (en) Screen projection method, system, electronic equipment and storage medium
CN109525622B (en) Fragment resource ID generation method, resource sharing method, device and electronic equipment
CN113473247B (en) Video playing request processing method, device and system and electronic equipment
CN110708402A (en) Accessible resource display method and device and resource access system
CN111225248B (en) On-demand content management method and content distribution network on-demand server
US9674220B2 (en) System and method thereof for optimizing delivery of content over a network
JP2007527067A (en) Hierarchical distribution of UI assets
WO2018188073A1 (en) Content deployment method and distribution controller
CN113453062B (en) Video metadata acquisition and processing method, device, system and electronic equipment
WO2022057935A1 (en) Method and apparatus for obtaining data based on content delivery network
CN111147888B (en) Streaming media video data processing method and device, computer equipment and storage medium
CN117632861A (en) Remote file access system and method
CN115714766A (en) File conversion method, system and device and electronic equipment
CN114422831A (en) Media playing method and device, electronic equipment and readable storage medium
US20110145212A1 (en) Method and system for providing media service

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