CN113453062A - Video metadata obtaining and processing method, device and system and electronic equipment - Google Patents

Video metadata obtaining and processing method, device and system and electronic equipment Download PDF

Info

Publication number
CN113453062A
CN113453062A CN202010219906.8A CN202010219906A CN113453062A CN 113453062 A CN113453062 A CN 113453062A CN 202010219906 A CN202010219906 A CN 202010219906A CN 113453062 A CN113453062 A CN 113453062A
Authority
CN
China
Prior art keywords
target video
video
metadata
response
response data
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
CN202010219906.8A
Other languages
Chinese (zh)
Other versions
CN113453062B (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 CN202010219906.8A priority Critical patent/CN113453062B/en
Publication of CN113453062A publication Critical patent/CN113453062A/en
Application granted granted Critical
Publication of CN113453062B publication Critical patent/CN113453062B/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/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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • H04N21/26216Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, a system, an electronic device and a computer readable storage medium for acquiring and processing video metadata. The acquisition method comprises the following steps: under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station; acquiring first response data sent by the source station in response to the second video source returning request; and analyzing the first response data to obtain metadata of the target video, and adding the metadata into a response head of the first response data so that the response head received by the lower-layer node carries the metadata.

Description

Video metadata obtaining and processing method, device and system and electronic equipment
Technical Field
Embodiments of the present disclosure relate to the field of content distribution network technologies, and in particular, to a method and an apparatus for acquiring video metadata, a method and an apparatus for processing video metadata, a processing system, an electronic device, and a computer-readable storage medium.
Background
In the CDN (Content Delivery Network), a layer of intelligent virtual Network based on the existing internet is formed by placing node servers at various places in the Network, and the CDN system can redirect a user's request to a service node closest to the user in real time according to Network traffic, connection of each node, load conditions, and comprehensive information such as a distance to the user and response time. The method aims to enable a user to obtain needed content nearby, most requests are completed at the CDN edge node, the CDN plays a shunting role, the load of a source station is reduced, the problem of network congestion of the Internet is solved, and the response speed of the user for accessing a website is improved.
When a user requests to obtain a video file through a CDN network, the corresponding video file resource in the local cache is usually responded directly to the user. When the resource requested by the user is not cached locally, the resource is returned to the source station through a reverse proxy server (Nginx) and a Cache device (Cache) of the CDN node to pull the corresponding request resource and then respond to the user.
However, the above-mentioned local cache or the video file pulled from the source station back to the source is only to provide the requested target video resource to the user, and cannot acquire or collect the metadata information of the video file.
In addition, under the condition of no video metadata support, differentiated services cannot be provided according to specific information of video files, and personalized services which are most suitable for each user cannot be provided for each user, so that the user experience is influenced.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method, an apparatus, a system, an electronic device, and a computer-readable storage medium for acquiring video metadata, so as to acquire metadata information of a source video.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for acquiring video metadata, the method including:
under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station;
acquiring first response data sent by the source station in response to the second video source returning request;
and analyzing the first response data to obtain metadata of the target video, and adding the metadata into a response head of the first response data so that the response head received by the lower-layer node carries the metadata.
Optionally, the method further includes:
under the condition that a first video source returning request for requesting a target video is received and the target video exists in a local cache, responding to the first video source returning request, and sending second response data added with the metadata of the target video in a response head to the lower node, so that the response head received by the lower node carries the metadata of the target video.
Optionally, before sending, to the lower node, second response data with metadata of the target video added to a response header in response to the first video source return request, the method further includes:
detecting whether metadata of the target video exists in a response header of the second response data to be sent;
under the condition that the metadata of the target video does not exist in the response header of the second response data, analyzing the target video to obtain the metadata of the target video, and adding the metadata of the target video to the data header of the second response data;
and if the metadata of the target video exists in the response header of the second response data, executing a step of sending the second response data with the metadata of the target video added in the response header to the lower node in response to the first video source return request.
Optionally, the method further includes:
sending a second video source returning request for requesting a target video to a source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in a local cache but metadata of the target video exists, wherein the metadata is obtained by analyzing a first source returning fragment of the target video; and
and third response data sent by the source station in response to the second video source return request is obtained, and the metadata is added to a response head of the third response data, so that the response head received by the lower node carries the metadata.
Optionally, the analyzing the first response data to obtain the metadata of the target video includes:
according to the video file format of the target video, correspondingly analyzing the first response data to obtain metadata of the target video, wherein the metadata of the target video comprises: at least one of an encoding format of the target video, a file size of the target video, a duration of the target video, and a resolution of the target video.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for acquiring video metadata, which is applied to a reverse proxy server, the method including:
receiving a first video source returning request of a lower layer node for requesting a target video;
adding a request header which represents the video file format of the target video to the first video back-source request;
sending the first video source returning request added with the request header to cache equipment matched with the reverse proxy server so that the cache equipment obtains the video file format of the target video by analyzing the request header of the first video source returning request;
receiving first response data sent by the cache device, wherein metadata of the target video obtained by the cache device correspondingly analyzing the first response data according to the video file format of the target video is added into a response header of the first response data;
and responding to the first video back-to-source request, and sending the first response data to a lower node.
According to a third aspect of the embodiments of the present disclosure, there is provided a method for obtaining video metadata, which is applied to a caching device, the method including:
receiving a first video source returning request sent by a reverse proxy server, wherein the first video source returning request carries a request header of a video file format used for representing a target video requested by a lower node, and the request header is added to the first video source returning request by the reverse proxy server;
analyzing a request head of the first video source returning request to obtain a video file format of the target video;
sending a second video source returning request for requesting the target video to the source station;
acquiring first response data sent by the source station in response to the second video source returning request;
correspondingly analyzing the first response data according to the video file format of the target video to obtain metadata of the target video;
and adding the metadata of the target video into a response header of the first response data, and sending the metadata to the reverse proxy server, so that the reverse proxy server sends the first response data to a lower node in response to the first video back-to-source request.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a method for processing video metadata, the method including:
receiving response data sent by an upper node in response to a source return request requesting a target video, wherein a response head of the response data carries metadata of the target video;
calculating to obtain the code rate of the target video according to the file size of the target video and the duration of the target video, wherein the file size of the target video and the duration of the target video are included in the metadata of the target video; and
and adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an apparatus for acquiring video metadata, the apparatus including:
the sending module is used for sending a second video source returning request for requesting the target video to the source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in the local cache;
the acquisition module is used for acquiring first response data sent by the source station in response to the second video source returning request;
and the analysis module is used for analyzing the first response data to obtain metadata of the target video and adding the metadata into a response head of the first response data so that the response head received by the lower-layer node carries the metadata.
According to a sixth aspect of the embodiments of the present disclosure, there is provided an apparatus for processing video metadata, the apparatus including:
a receiving module, configured to receive response data sent by an upper node in response to a request target video, where a response header of the response data carries metadata of the target video;
the calculation module is used for calculating the code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and
and the adjusting module is used for adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
According to a seventh aspect of the embodiments of the present disclosure, there is provided a processing system of video metadata, the processing system including an upper node and a lower node,
the upper node is configured to: under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station; acquiring response data sent by the source station in response to the second video source returning request; analyzing the response data to obtain metadata of the target video, and adding the metadata into a response head of the response data so that the response head received by the lower node carries the metadata;
the lower layer node is used for: receiving the response data sent by the upper node in response to the first source return request, wherein a response head of the response data carries metadata of the target video; calculating to obtain the code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
According to an eighth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including:
the apparatus according to the fifth or sixth aspect of embodiments of the present disclosure; alternatively, the first and second electrodes may be,
a processor and a memory for storing executable instructions for controlling the processor to perform the method according to any of the first to fourth aspects of embodiments of the present disclosure.
According to a ninth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to any one of the first to fourth aspects of embodiments of the present disclosure.
According to the embodiment of the disclosure, a request for requesting a target video is sent to a source station, response data sent by the source station in response to the request is obtained, metadata information corresponding to the target video is obtained by analyzing the response data returned to the source, the obtained metadata is added to a response header of the response data, and the metadata is returned to a lower node to respond to the request, so that the lower node can obtain the metadata information corresponding to the target video from the received response header, and can also perform corresponding processing by using the metadata.
In addition, according to the embodiment of the present disclosure, by analyzing and counting the acquired metadata, the bitrate of the target video can be calculated according to the file size of the target video and the duration of the target video included in the metadata of the target video. According to the code rate of the target video, the downloading rate of the target video downloaded by the client is adjusted, so that the bandwidth of the server can be saved for the user under the condition of not influencing the user experience, and the most suitable personalized service can be provided for the user.
Other features of, and advantages with, the disclosed embodiments will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the embodiments of the disclosure.
Fig. 1 is a block diagram of a hardware configuration of an electronic device that can be used to implement an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating steps of a method for obtaining video metadata according to a first embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating steps of a method for obtaining video metadata according to a second embodiment of the present disclosure.
Fig. 4 is a flowchart illustrating steps of a method for acquiring video metadata according to a third embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a method for processing video metadata according to an embodiment of the disclosure.
Fig. 6 is a flowchart of a CDN target video back-source request according to an embodiment of the present disclosure.
Fig. 7 is a CDN node structure diagram according to an embodiment of the present disclosure.
Fig. 8 is a block diagram illustrating a configuration of an apparatus for acquiring video metadata according to an embodiment of the present disclosure.
Fig. 9 is a block diagram illustrating a structure of a video metadata processing apparatus according to an embodiment of the present disclosure.
Fig. 10 is a block diagram illustrating a structure of a video metadata processing system according to an embodiment of the present disclosure.
Fig. 11 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the disclosed embodiments will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of parts and steps, numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the embodiments of the present disclosure unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the disclosure, their application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 is a block diagram showing a hardware configuration of an electronic apparatus 1000 that can implement an embodiment of the present disclosure.
The electronic device 1000 may be a server device, a laptop, a desktop computer, a tablet computer, etc.
The server device may be a unitary server or a distributed server across multiple computers or computer data centers. The server may be of various types, such as, but not limited to, a node device of a content distribution network, a storage server of a distributed storage system, a cloud database server, a cloud computing server, a cloud management server, a web server, a news server, a mail server, a message server, an advertisement server, a file server, an application server, an interaction server, a storage server, a database server, a proxy server, or the like. In some embodiments, each server may include hardware, software, or embedded logic components or a combination of two or more such components for performing the appropriate functions supported or implemented by the server. For example, a server, such as a blade server, a cloud server, etc., or may be a server group consisting of a plurality of servers, which may include one or more of the above types of servers, etc.
As shown in fig. 1, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, or may further include a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. The processor 1100 may be a central processing unit CPU, a microprocessor MCU, or the like, and is configured to execute a computer program. The computer program may be written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. The interface device 1300 includes, for example, a USB interface, a headphone interface, and the like. The communication device 1400 is capable of wired communication using optical fiber or cable, or wireless communication, and may specifically include WiFi communication, bluetooth communication, 2G/3G/4G/5G communication, and the like. The display device 1500 is, for example, a liquid crystal display panel, a touch panel, or the like. The input device 1600 may include, for example, a touch screen, a keyboard, a somatosensory input, and the like. A user can input/output voice information through the speaker 1700 and the microphone 1800.
The electronic device shown in fig. 1 is merely illustrative and is in no way intended to limit the embodiments of the disclosure, their application, or uses. In an embodiment of the present disclosure, the memory 1200 of the electronic device 1000 is configured to store instructions for controlling the processor 1100 to operate to execute any one of the video metadata obtaining methods or processing methods provided in the embodiments of the present disclosure. It should be understood by those skilled in the art that although a plurality of means are shown for the electronic device 1000 in fig. 1, embodiments of the present disclosure may only refer to some of the means therein, for example, the electronic device 1000 may only refer to the processor 1100 and the storage 1200. The skilled person can design the instructions according to the disclosed embodiments of the present disclosure. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
< method embodiment I >
In one embodiment of the present disclosure, a method for acquiring video metadata is provided, which may be implemented by an electronic device, such as the electronic device 1000 shown in fig. 1.
Please refer to fig. 2, which is a flowchart illustrating a method for acquiring video metadata according to a first embodiment of the present disclosure.
As shown in fig. 2, the method for acquiring video metadata according to the embodiment of the present disclosure includes the following steps:
102, sending a second video source returning request for requesting a target video to a source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in a local cache;
104, acquiring first response data sent by the source station in response to the second video source returning request;
and 106, analyzing the first response data to obtain metadata of the target video, and adding the metadata to a response header of the first response data, so that the response header received by the lower node carries the metadata.
In step 102, the first video feed-back request is a request sent by a lower node, such as an edge node or a middle node, that a client user needs to obtain a target video. When the requested target video is not available in the local cache of the current node, the target video needs to be pulled to the source station. And the source station returns corresponding response data according to the request under the condition that the target video exists.
In one embodiment, the target video file may be returned to the source in slices, where a response header including metadata information for the video is stored in slice 0 (which may also be referred to as the first returned slice) of the video file. And when the response code returned by the source station is 200, the response data is shown to correspond to the whole content of the target video file, and the response data comprises the first returned source fragment. When the response code returned by the source station is 206, the partial content of the target video file corresponding to the response data is indicated, wherein the response data does not include the first segment returned to the source, that is, the response data does not include the metadata of the target video.
In step 106, the response data including the first segment back to the source is parsed, i.e. metadata of the target video is obtained.
In one embodiment, parsing the first response data to obtain metadata of the target video includes: according to the video file format of the target video, correspondingly analyzing the first response data to obtain metadata of the target video, wherein the metadata of the target video comprises: at least one of an encoding format of the target video, a file size of the target video, a duration of the target video, and a resolution of the target video.
The video file format is, for example, mp4, flv or ts, and the response header of the first segment of the response data returned to the source is parsed in a parsing manner corresponding to the video format according to the standard video format of the target video, so that at least one of the encoding format, the file size, the duration and the resolution corresponding to the video can be obtained.
And when other subsequent fragments are requested from the source station again, the metadata information is directly acquired from the disk without analyzing other fragments of the target video again.
In step 106, the metadata obtained by the analysis is added to a response header of the response data sent to the lower node, so that the response header received by the lower node carries the metadata of the target video corresponding to the request.
In one embodiment, the method for acquiring video metadata further comprises: under the condition that a first video source returning request for requesting a target video is received and the target video exists in a local cache, responding to the first video source returning request, and sending second response data added with the metadata of the target video in a response head to the lower node, so that the response head received by the lower node carries the metadata of the target video.
Wherein, before sending second response data with metadata of the target video added in a response header to the lower node in response to the first video source return request, the method further comprises: detecting whether metadata of the target video exists in a response header of the second response data to be sent; under the condition that the metadata of the target video does not exist in the response header of the second response data, analyzing the target video to obtain the metadata of the target video, and adding the metadata of the target video to the data header of the second response data; and if the metadata of the target video exists in the response header of the second response data, executing a step of sending the second response data with the metadata of the target video added in the response header to the lower node in response to the first video source return request.
For the above situation, after receiving the target video request sent by the lower node, if it is determined that the requested video exists in the local cache of the current node, the response data including the target video may be sent to the lower node in a manner of directly responding to the request of the lower node without requesting the target video from the source station. Before sending the response data to the lower node, it is necessary to detect whether the response header of the response data contains metadata of the target video. If the response header of the response data does not have the corresponding metadata, the target video needs to be further analyzed to obtain the metadata corresponding to the target video, and then the metadata is added to the response header of the response data. And if the response head of the response data has the corresponding metadata, directly sending the response data with the target video metadata added in the response head to the lower-layer node. In this way, the response header of the response data received by the lower node carries the metadata of the target video.
In one embodiment, the method for acquiring video metadata further comprises: sending a second video source returning request for requesting a target video to a source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in a local cache but metadata of the target video exists, wherein the metadata is obtained by analyzing a first source returning fragment of the target video; and acquiring third response data sent by the source station in response to the second video source return request, and adding the metadata to a response header of the third response data, so that the response header received by the lower node carries the metadata.
For the above situation, after receiving a target video request sent by a lower node, if it is determined that the requested video does not exist in the local cache of the current node, the target video needs to be requested from the source station. In this case, for the fragment back to the source, there is a case that the first back to the source fragment of the target video has been requested before, and the currently requested target video is a subsequent fragment of the target video. As described above, the response header of the first return source fragment returned by the source station for the request of the target video carries the metadata information of the target video. After the first back source fragment is received, the response head in the back source fragment is analyzed to obtain the metadata of the target video, and the metadata is stored in the local disk of the current node.
Therefore, when the target video is acquired and sent by the source station in response to the subsequent fragment request of the target video, the parsed metadata of the target video stored in the disk can be added to the response header of the response data and sent to the lower node. Therefore, the response header received by the lower node carries the metadata information of the target video.
According to the embodiment of the disclosure, a request for requesting a target video is sent to a source station, response data sent by the source station in response to the request is obtained, the response data returned to the source is analyzed to obtain metadata information corresponding to the target video, the obtained metadata is added to a response header of the response data and returned to a lower node to respond to the request, and therefore the lower node can obtain the metadata information corresponding to the target video from the received response header.
< method example two >
In one embodiment of the present disclosure, a method for acquiring video metadata is provided, which may be applied to a reverse proxy server (e.g., Nginx), which may be, for example, an electronic device 1000 as shown in fig. 1.
Please refer to fig. 3, which is a flowchart illustrating a method for acquiring video metadata according to a second embodiment of the present disclosure.
As shown in fig. 3, the method for acquiring video metadata according to the embodiment of the present disclosure includes the following steps:
step 202, receiving a first video source returning request of a lower layer node for requesting a target video;
step 204, adding a request header which represents the video file format of the target video to the first video source returning request;
step 206, sending the first video source returning request added with the request header to a cache device matched with the reverse proxy server, so that the cache device obtains the video file format of the target video by analyzing the request header of the first video source returning request;
step 208, receiving first response data sent by the caching device, where a response header of the first response data is added with metadata of the target video obtained by the caching device analyzing the first response data correspondingly according to the video file format of the target video;
step 210, responding to the first video source returning request, and sending the first response data to a lower node.
In step 204, Nginx may add the video file format corresponding to the target video requested by the lower node to the back source request in the form of a fixed request header. And then sending the data to the Cache equipment matched with the current layer. The Nginx and the Cache of the layer need to exchange information through a request header and a response header, for example, the interactive information 1 uses the request header 1, the information 2 uses the request header 2, the fixed information uses the fixed header, and the Nginx and the Cache agree.
The added request headers are for example: type mp4, which indicates the video file format of the target asset.
In step 206, Nginx sends the target video source returning request added with the request header to the Cache of the layer, and the Cache performs corresponding request header analysis processing on the source returning request and returns the source to the source station to pull the target video. The description will be developed later with respect to the operation of the Cache.
In step 208, Nginx receives response data including the target video and the target video metadata sent by the Cache, and sends the response data to the lower node in step 210. Metadata of the target video included in the response data is obtained by Cache parsing, and the description will be developed later.
< method example III >
In an embodiment of the present disclosure, a method for obtaining video metadata is provided, which may be applied to a Cache device (e.g., a Cache), for example, the Cache device may be an electronic device 1000 as shown in fig. 1.
Please refer to fig. 4, which is a flowchart illustrating a method for acquiring video metadata according to a third embodiment of the present disclosure.
As shown in fig. 4, the method for acquiring video metadata according to the embodiment of the present disclosure includes the following steps:
step 302, receiving a first video source returning request sent by a reverse proxy server, wherein the first video source returning request carries a request header in a video file format for representing a target video requested by a lower node, and the request header is added to the first video source returning request by the reverse proxy server;
step 304, analyzing a request head of the first video source returning request to obtain a video file format of the target video;
step 306, sending a second video source returning request for requesting the target video to the source station;
step 308, acquiring first response data sent by the source station in response to the second video source return request;
step 310, performing corresponding analysis on the first response data according to the video file format of the target video to obtain metadata of the target video;
step 312, adding the metadata of the target video to the response header of the first response data, and sending the metadata to the reverse proxy server, so that the reverse proxy server sends the first response data to a lower node in response to the request of returning the first video to the source.
In step 304, after receiving the source returning request of the target video sent by the current layer of Nginx, the Cache parses the request header of the source returning request, so as to obtain the video file format of the target video. In one embodiment, the Cache may store the video file format obtained by parsing in a local disk.
And if the target video required by the source returning request sent by the Nginx is not cached locally, the Cache is required to carry out source returning pull to the source station. When the Cache source receives the response data returned by the source station, wherein the response data comprises a response head and a response body (body), and the response code is 200, the response head of the response data is analyzed, so that metadata information such as the video coding format, the video duration, the video resolution, the video file size and the like of the target video is obtained. For example, the encoding format is saved as media-mm: h265; the time length is saved as media-time:1230 (unit: second); resolution is saved as media-resolution: 1280 × 720 (unit: pixel); the total size of the video file is saved as media-length: 104242193 (unit: byte).
Response code 200 indicates that the response data of the Cache back source includes the first back source fragment of the target video, and the embodiment of the present disclosure only analyzes the metadata information to the response header of the first back source fragment of the response data. If the response code is 206, the target video returned to the source is the subsequent fragment, and the Cache can directly acquire the target video from the local disk without analyzing the metadata.
And then, the Cache sends the target video stored in the local Cache or the target video obtained by source pulling back to the source station to the Nginx of the layer in a response data form, wherein the metadata of the target video is added into a response head of the response data at the same time, and the Nginx sends the response data to the lower-layer node.
< method example four >
The lower node can output more detailed service information statistics for the user requesting the target video according to the obtained metadata information of the target video, and can also provide personalized service for the user based on the data. Next, a description will be given with reference to fig. 5.
In an embodiment of the present disclosure, a method for processing video metadata is also provided, which may be implemented by an electronic device, for example, the electronic device 1000 shown in fig. 1.
Please refer to fig. 5, which is a flowchart illustrating a method for processing video metadata according to an embodiment of the present disclosure. As shown in fig. 5, a method for processing video metadata according to an embodiment of the present disclosure includes the following steps:
step 402, receiving response data sent by an upper node in response to a request for requesting a target video from a source, wherein a response header of the response data carries metadata of the target video;
step 404, calculating a code rate of the target video according to the file size of the target video and the duration of the target video, wherein the file size of the target video and the duration of the target video are included in the metadata of the target video; and
and step 406, adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
The processing method of this embodiment may be performed at an edge node that provides a target video requested by a client to a user of the client. In step 402, the edge node receives response data sent by the node responding to the target video request, and may obtain metadata of the target video, including at least one of an encoding format of the target video, a file size of the target video, a duration of the target video, and a resolution of the target video.
In step 404, under the condition that the metadata of the target video includes the file size and the video duration of the target video, the edge node may calculate the bitrate of the target video according to the file size and the duration of the target video. The larger the video code rate is, the higher the picture quality of the video is, and the closer the played video is to the original file.
Obtaining the code rate of the target video, in step 406, the edge node can perform download speed limitation on the playing of the target video according to the code rate, so that the download speed of the video can be adjusted according to the code rate of the playing video without influencing the user experience, that is, without much loss of the quality of the video picture played to the user, thereby saving the bandwidth of the server for the user.
In addition, according to the video encoding format in the metadata of the target video, for example, according to whether the video file is H264 or H265, the H265 video file can be provided to the user whose video file encoding format is H264, thereby saving service bandwidth. Without support for such metadata, such differentiated services cannot be provided.
The video file downloading is different from the ordinary file downloading, and the embodiment of the disclosure can output more detailed service information statistics for the user by identifying and storing the metadata information (encoding/duration/resolution/total video size, etc.) of the video, and also can provide the most suitable personalized service for the user based on the data.
According to the embodiment of the disclosure, the code rate of the target video can be calculated according to the file size of the target video and the duration of the target video, which are included in the metadata of the target video, by analyzing and counting the metadata acquired from the upper node. According to the code rate of the target video, the downloading rate of the target video downloaded by the client is adjusted, so that the bandwidth of the server can be saved for the user under the condition of not influencing the user experience, and the most suitable personalized service can be provided for the user.
< example >
The general flow of the video metadata acquisition method of the embodiments of the present disclosure will be exemplified below with reference to the flowcharts of fig. 6 to 7. Fig. 6 is a flowchart of a CDN target video back-source request according to the embodiment of the present disclosure, and fig. 7 is a structure diagram of a CDN node according to the embodiment of the present disclosure.
As shown in fig. 6, when a user 20 accesses a DNS (Domain Name System) 10, the DNS 10 converts www (World Wide Web) accessed by the user into a nearby IP and provides the nearby IP to the user. The user 20 initiates a back-to-source request for requesting to obtain a target video to the edge node 302 of the CDN network 30, and if the request is hit, the edge node 302 directly responds to the user request to provide a corresponding target video, and completes an Http (hypertext transfer protocol) request. If the request is not hit, the edge node 302 needs to send a back-source request to an upper node, for example, the middle node 304 of the CDN network 30, and if the request of the middle node 304 is still not hit, the middle node 304 needs to send a back-source request to the upper node 306 of the CDN network 30, and the upper node 306 needs to send a back-source request to the source station 40. The solid line part shown in the flowchart is a flow that the request must pass through (usually, the target resource requested by the user 20 of the client is provided by the edge node 302), the dotted line part is an optional flow, and if hit occurs in the current layer of the current node, the cache of the current node does not perform the dotted line flow and sends a back-source request for requesting the target video to the previous layer node.
In fig. 7, the upper node 306 is divided into a reverse proxy server (Nginx)3062 and a Cache device (Cache) 3064. The LVS (balanced load System) 50 sends the back source request selection issued by the lower node to Nginx 3062 and Cache 3064 of the upper node 306 of one of the groups.
Specifically, after the Nginx 3062 of the upper node 306 receives the back-source request for the current video, the Nginx 3062 adds a fixed request header to the back-source request to indicate the video file format of the requested target video.
The Cache 3064 receives the source returning request from the Nginx 3062, analyzes the fixed request header in the source returning request, obtains the video file format of the target video, and stores the video file format in the disk.
If the target video resource required by the back-source request exists in the local Cache of the Cache 3064 of the upper node 306, the local Cache is directly read, and the response data including the target video corresponding to the back-source request is sent to the Nginx 3062. The Cache 3064 adds the metadata of the target video to the response header of the response data. As described above, this metadata may be parsed from the source site back to the first source tile of the source target video and saved to disk.
When the local Cache of the Cache 3064 has the corresponding source returning request target video, it is described that the Cache 3064 has analyzed the metadata information of the target video before, the Cache 3064 includes the metadata information of the target video in the source returning response data sent to the Nginx 3062, adds the video coding format/video duration/video resolution/video file size and the like corresponding to the target video metadata to the response data in the form of a response header, and then sends the corresponding target video and the metadata information thereof to the Nginx 3062.
If the target video resources required by the back-source request are not cached locally in the Cache 3064, the Cache 3064 is required to pull back to the source station 40 for back-source. When the Cache 3064 source receives the response data returned by the source station, if the response code is 200, the response head of the response data is analyzed to obtain the metadata of the target video, namely the information of the video coding format, the video duration, the video resolution, the video file size and the like of the target video. If the response code is 206, the metadata corresponding to the target video is directly obtained from the disk of the Cache 3064 without analyzing the response data returned by the source station.
The Cache 3064 sends the response data added with the target video metadata in the response header to the nginnx 3062, and the nginnx 3062 prints the metadata information such as the video coding format/the video duration/the video resolution/the video file size and the like corresponding to the target video into the nginnx log of the layer for log analysis.
The response data with the target video metadata added in the response header is sent by the Nginx 3062 to a corresponding downstream node, such as the middle node 304 shown in fig. 6, the middle node 304 will send the response data to the edge node 302, and the edge node 302 will output the target video of the response data to the user 20.
Further, the edge node 302 and the middle layer node 304 do not need to analyze the metadata information of the target video requested by the source again, and only need to inherit the response header of the response data given by the upper layer node 306 and write the response header into the Nginx log of the layer, so that statistics and analysis can be performed according to the metadata of the target video, and the most suitable personalized service can be provided for the user.
The embodiment of the disclosure analyzes metadata of a target video requested by a source return node at an upper layer node, acquires information such as the coding format/duration/resolution/video file size of the target video, and stores the information in a response head of response data, only needs to analyze for 1 time when the target video returns from a source station, and puts metadata information of an analysis result in the response head of the response data corresponding to the target video, and a downstream node can inherit the metadata directly.
In other words, the method for acquiring the video metadata only needs to start the metadata parsing of the target video at the upper node 306, and the edge node 302 and the middle node 3304 only need to inherit the parsing result.
< first embodiment of the apparatus >
In another embodiment of the present disclosure, a device 2000 for obtaining video metadata is further provided, and fig. 8 is a block diagram illustrating a structure of the device for obtaining video metadata according to an embodiment of the present disclosure, where the device 2000 for obtaining video metadata is applied to a node side that requests a source station to return to a source.
In one example, the acquisition apparatus 2000 includes: a first sending module 2200, a first obtaining module 2400, and a first parsing module 2600.
The first sending module 2200 is configured to, when a first video feed-back request requesting a target video is received and the target video does not exist in the local cache, send a second video feed-back request requesting the target video to the source station;
the first obtaining module 2400 is configured to obtain first response data sent by the source station in response to the second video source return request;
the first parsing module 2600 is configured to parse the first response data to obtain metadata of the target video, and add the metadata to a response header of the first response data, so that the response header received by the lower node carries the metadata.
The acquiring apparatus 2000 further comprises a second sending module (not shown in the figure) configured to: under the condition that a first video source returning request for requesting a target video is received and the target video exists in a local cache, responding to the first video source returning request, and sending second response data added with the metadata of the target video in a response head to the lower node, so that the response head received by the lower node carries the metadata of the target video.
In one embodiment, the obtaining apparatus 2000 further comprises: a detecting module (not shown in the figure), configured to detect whether metadata of the target video exists in a response header of second response data to be sent before sending, to the lower node, the second response data to which the metadata of the target video is added in the response header in response to the first video source return request;
a second parsing module (not shown in the figure), configured to, in a case that the metadata of the target video does not exist in the response header of the second response data, parse the target video to obtain the metadata of the target video, and add the metadata of the target video to the data header of the second response data;
the second sending module is further configured to: and under the condition that the metadata of the target video exists in a response header of the second response data, responding to the first video source returning request, and sending the second response data added with the metadata of the target video in the response header to the lower-layer node.
In one embodiment, the obtaining apparatus 2000 further comprises:
a third sending module (not shown in the figure), configured to send a second video feed back request requesting a target video to a source station when a first video feed back request requesting the target video is received and there is no target video but metadata of the target video in a local cache, where the metadata is obtained by parsing a first feed back tile of the target video; and
a second obtaining module (not shown in the figure), configured to obtain third response data sent by the source station in response to the second video source return request, and add the metadata to a response header of the third response data, so that the response header received by the lower node carries the metadata.
In one embodiment, the first parsing module 2600 parses the first response data, and obtaining the metadata of the target video includes: according to the video file format of the target video, correspondingly analyzing the first response data to obtain metadata of the target video, wherein the metadata of the target video comprises: at least one of an encoding format of the target video, a file size of the target video, a duration of the target video, and a resolution of the target video.
< example II of the apparatus >
In another embodiment of the present disclosure, a processing apparatus 3000 of video metadata is further provided, and fig. 9 is a block diagram illustrating a structure of the processing apparatus of video metadata according to an embodiment of the present disclosure, where the processing apparatus 3000 of video metadata may be applied to a node side that provides a requested target video to a user of a client side.
In one example, the processing device 3000 includes: the device comprises a receiving module 3200, a calculating module 3400 and an adjusting module 3600.
The receiving module 3200 is configured to receive response data sent by an upper node in response to a request target video, where a response header of the response data carries metadata of the target video;
the calculating module 3400 is configured to calculate a code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and
the adjusting module 3600 is configured to adjust a downloading rate of the target video downloaded by the client according to the code rate of the target video.
< System embodiment >
According to still another embodiment of the present disclosure, a video metadata processing system 4000 is provided, and fig. 10 is a block diagram illustrating a structure of the video metadata processing system according to an embodiment of the present disclosure.
As shown in fig. 10, the system 4000 includes an upper node 4200 and a lower node 4400.
Wherein, the upper node 4200 is configured to: under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station; acquiring response data sent by the source station in response to the second video source returning request; and analyzing the response data to obtain metadata of the target video, and adding the metadata into a response head of the response data so that the response head received by the lower node carries the metadata.
The lower node 4400 is used for: receiving the response data sent by the upper node in response to the first source return request, wherein a response head of the response data carries metadata of the target video; calculating to obtain the code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
< electronic device embodiment >
According to still another embodiment of the present disclosure, there is also provided an electronic apparatus, and the electronic apparatus 5000 may be the electronic apparatus 1000 shown in fig. 1. Fig. 11 is a block diagram of an electronic device according to an embodiment of the present disclosure.
In one aspect, the electronic device 5000 may include the aforementioned video metadata obtaining apparatus 2000 or processing apparatus 3000, which is used to correspondingly implement the video metadata obtaining method or processing method according to any embodiment of the present disclosure.
On the other hand, as shown in fig. 11, the electronic device 5000 may include a memory 5200 and a processor 5400, the memory 5200 being for storing executable instructions; the instruction is used to control the processor 5400 to execute the aforementioned acquisition method or processing method of video metadata.
In this embodiment, the electronic device 5000 may be any electronic product having a memory 5200 and a processor 5400, such as a server, a tablet computer, a desktop, a workstation, and the like.
< computer-readable storage Medium embodiment >
Finally, according to yet another embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of acquiring or processing video metadata according to any of the embodiments of the present disclosure.
The disclosed embodiments may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement aspects of embodiments of the disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations for embodiments of the present disclosure may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry may execute computer-readable program instructions to implement aspects of embodiments of the present disclosure by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of embodiments of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of embodiments of the present disclosure is defined by the appended claims.

Claims (13)

1. A method for obtaining video metadata, the method comprising:
under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station;
acquiring first response data sent by the source station in response to the second video source returning request;
and analyzing the first response data to obtain metadata of the target video, and adding the metadata into a response head of the first response data so that the response head received by the lower-layer node carries the metadata.
2. The method of claim 1, further comprising:
under the condition that a first video source returning request for requesting a target video is received and the target video exists in a local cache, responding to the first video source returning request, and sending second response data added with the metadata of the target video in a response head to the lower node, so that the response head received by the lower node carries the metadata of the target video.
3. The method according to claim 2, wherein before sending second response data to the lower node in response to the first video source return request with metadata of the target video added to a header thereof, the method further comprises:
detecting whether metadata of the target video exists in a response header of the second response data to be sent;
under the condition that the metadata of the target video does not exist in the response header of the second response data, analyzing the target video to obtain the metadata of the target video, and adding the metadata of the target video to the data header of the second response data;
and if the metadata of the target video exists in the response header of the second response data, executing a step of sending the second response data with the metadata of the target video added in the response header to the lower node in response to the first video source return request.
4. The method of claim 1, further comprising:
sending a second video source returning request for requesting a target video to a source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in a local cache but metadata of the target video exists, wherein the metadata is obtained by analyzing a first source returning fragment of the target video; and
and third response data sent by the source station in response to the second video source return request is obtained, and the metadata is added to a response head of the third response data, so that the response head received by the lower node carries the metadata.
5. The method of claim 1, wherein parsing the first response data to obtain metadata of the target video comprises:
according to the video file format of the target video, correspondingly analyzing the first response data to obtain metadata of the target video, wherein the metadata of the target video comprises: at least one of an encoding format of the target video, a file size of the target video, a duration of the target video, and a resolution of the target video.
6. A method for acquiring video metadata, which is applied to a reverse proxy server, the method comprising:
receiving a first video source returning request of a lower layer node for requesting a target video;
adding a request header which represents the video file format of the target video to the first video back-source request;
sending the first video source returning request added with the request header to cache equipment matched with the reverse proxy server so that the cache equipment obtains the video file format of the target video by analyzing the request header of the first video source returning request;
receiving first response data sent by the cache device, wherein metadata of the target video obtained by the cache device analyzing the first response data correspondingly according to the video file format of the target video is added into a response header of the first response data;
and responding to the first video back-to-source request, and sending the first response data to a lower node.
7. A method for acquiring video metadata is applied to a cache device, and comprises the following steps:
receiving a first video source returning request sent by a reverse proxy server, wherein the first video source returning request carries a request header of a video file format used for representing a target video requested by a lower node, and the request header is added to the first video source returning request by the reverse proxy server;
analyzing a request head of the first video source returning request to obtain a video file format of the target video;
sending a second video source returning request for requesting the target video to the source station;
acquiring first response data sent by the source station in response to the second video source returning request;
correspondingly analyzing the first response data according to the video file format of the target video to obtain metadata of the target video;
and adding the metadata of the target video into a response header of the first response data, and sending the metadata to the reverse proxy server, so that the reverse proxy server sends the first response data to a lower node in response to the first video back-to-source request.
8. A method for processing video metadata, the method comprising:
receiving response data sent by an upper node in response to a source return request requesting a target video, wherein a response head of the response data carries metadata of the target video;
calculating to obtain the code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and
and adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
9. An apparatus for acquiring video metadata, the apparatus comprising:
the sending module is used for sending a second video source returning request for requesting the target video to the source station under the condition that a first video source returning request for requesting the target video is received and the target video does not exist in the local cache;
the acquisition module is used for acquiring first response data sent by the source station in response to the second video source returning request;
and the analysis module is used for analyzing the first response data to obtain metadata of the target video and adding the metadata into a response head of the first response data so that the response head received by the lower-layer node carries the metadata.
10. An apparatus for processing video metadata, the apparatus comprising:
a receiving module, configured to receive response data sent by an upper node in response to a request target video, where a response header of the response data carries metadata of the target video;
the calculation module is used for calculating the code rate of the target video according to the file size of the target video and the duration of the target video, wherein the file size of the target video and the duration of the target video are included in the metadata of the target video; and
and the adjusting module is used for adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
11. A processing system for video metadata, the processing system comprising an upper node and a lower node,
the upper node is configured to: under the condition that a first video source returning request for requesting a target video is received and the target video does not exist in a local cache, sending a second video source returning request for requesting the target video to a source station; acquiring response data sent by the source station in response to the second video source returning request; analyzing the response data to obtain metadata of the target video, and adding the metadata into a response head of the response data so that the response head received by the lower node carries the metadata;
the lower layer node is used for: receiving the response data sent by the upper node in response to the first source return request, wherein a response head of the response data carries metadata of the target video; calculating to obtain the code rate of the target video according to the total file size of the target video and the duration of the target video, which are recorded in the metadata of the target video; and adjusting the downloading rate of the target video downloaded by the client according to the code rate of the target video.
12. An electronic device, comprising:
the apparatus of claim 9 or 10; alternatively, the first and second electrodes may be,
a processor and a memory for storing executable instructions for controlling the processor to perform the method of any one of claims 1 to 8.
13. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN202010219906.8A 2020-03-25 2020-03-25 Video metadata acquisition and processing method, device, system and electronic equipment Active CN113453062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010219906.8A CN113453062B (en) 2020-03-25 2020-03-25 Video metadata acquisition and processing method, device, system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010219906.8A CN113453062B (en) 2020-03-25 2020-03-25 Video metadata acquisition and processing method, device, system and electronic equipment

Publications (2)

Publication Number Publication Date
CN113453062A true CN113453062A (en) 2021-09-28
CN113453062B CN113453062B (en) 2023-05-05

Family

ID=77806956

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010219906.8A Active CN113453062B (en) 2020-03-25 2020-03-25 Video metadata acquisition and processing method, device, system and electronic equipment

Country Status (1)

Country Link
CN (1) CN113453062B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547478A (en) * 2012-02-20 2012-07-04 北京蓝汛通信技术有限责任公司 Triggered slice on-demand system and method of streaming media based on CDN (Content Distribution Network)
US20170164020A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Content delivery method for content delivery network platform and scheduling proxy server
CN107809684A (en) * 2017-10-27 2018-03-16 广东省南方数字电视无线传播有限公司 Video segment generation method and device, caching server
CN109104617A (en) * 2018-09-05 2018-12-28 杭州领智云画科技有限公司 Video request response method and system
CN109600437A (en) * 2018-12-11 2019-04-09 网宿科技股份有限公司 A kind of method for down loading and cache server of streaming media resource
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN110198345A (en) * 2019-05-06 2019-09-03 视联动力信息技术股份有限公司 A kind of data request method, system and device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547478A (en) * 2012-02-20 2012-07-04 北京蓝汛通信技术有限责任公司 Triggered slice on-demand system and method of streaming media based on CDN (Content Distribution Network)
US20170164020A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Content delivery method for content delivery network platform and scheduling proxy server
CN107809684A (en) * 2017-10-27 2018-03-16 广东省南方数字电视无线传播有限公司 Video segment generation method and device, caching server
CN109104617A (en) * 2018-09-05 2018-12-28 杭州领智云画科技有限公司 Video request response method and system
CN109600437A (en) * 2018-12-11 2019-04-09 网宿科技股份有限公司 A kind of method for down loading and cache server of streaming media resource
CN109640113A (en) * 2018-12-28 2019-04-16 网宿科技股份有限公司 A kind of processing method and proxy server of dilatory video data
CN110198345A (en) * 2019-05-06 2019-09-03 视联动力信息技术股份有限公司 A kind of data request method, system and device and storage medium

Also Published As

Publication number Publication date
CN113453062B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
US20210266354A1 (en) System and Method for Streaming Content from Multiple Servers
US11194882B1 (en) Behavior based optimization for content presentation
US10313726B2 (en) Distributing media content via media channels based on associated content being provided over other media channels
US9462038B2 (en) Methods for seamlessly providing content to a client system and devices thereof
US10367872B2 (en) Cloud-based video delivery
CN102611945B (en) Streaming media slicing method, slicing server and streaming media demand system
US10284671B2 (en) Dynamic bundling of web components for asynchronous delivery
CN109068153B (en) Video playing method and device and computer readable storage medium
US11916992B2 (en) Dynamically-generated encode settings for media content
US10419798B2 (en) Method and apparatus for just-in-time transcoding
CN116366616A (en) Method, apparatus and non-volatile computer readable medium for receiving media data of a session
CN113873288A (en) Method and device for generating playback in live broadcast process
KR20220133964A (en) Method and apparatus for dynamic adaptive streaming over HTTP
US11182452B2 (en) Web acceleration via learning
CN109948082B (en) Live broadcast information processing method and device, electronic equipment and storage medium
KR102134250B1 (en) Method and system for reproducing streaming content
US10831835B2 (en) Providing hyperlinks in presentations viewed remotely
CN113453062B (en) Video metadata acquisition and processing method, device, system and electronic equipment
US9483575B2 (en) Reproducing a graphical user interface display
CN112135199B (en) Video playing method based on multiple types of video sources and related equipment
KR20100024370A (en) Method of providing contents for several media and apparatus therefor
CN111800649A (en) Method and device for storing video and method and device for generating video
CN113452539B (en) Source station switching method and device, electronic equipment and storage medium
CN113364728B (en) Media content receiving method, device, storage medium and computer equipment
CN111090485B (en) Multi-cluster-oriented help data processing method and device, medium and equipment

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