CN120499446A - Video data processing method and device, electronic equipment and storage medium - Google Patents

Video data processing method and device, electronic equipment and storage medium

Info

Publication number
CN120499446A
CN120499446A CN202510555703.9A CN202510555703A CN120499446A CN 120499446 A CN120499446 A CN 120499446A CN 202510555703 A CN202510555703 A CN 202510555703A CN 120499446 A CN120499446 A CN 120499446A
Authority
CN
China
Prior art keywords
video data
video
transcoded
data
condition
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.)
Pending
Application number
CN202510555703.9A
Other languages
Chinese (zh)
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.)
Xunlei Computer Shenzhen Co Ltd
Original Assignee
Xunlei Computer Shenzhen 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 Xunlei Computer Shenzhen Co Ltd filed Critical Xunlei Computer Shenzhen Co Ltd
Priority to CN202510555703.9A priority Critical patent/CN120499446A/en
Publication of CN120499446A publication Critical patent/CN120499446A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

The processing method, the device, the electronic equipment and the storage medium for the video data acquire access heat information of the video data transcoded in real time, and store the transcoded video data after transcoding under the condition that the video data are determined to be transcoded and the video data meet heat conditions based on the access heat information, so that a video server returns the transcoded video data under the condition that a playing request of the video data is acquired, the transcoded video data can be generated in real time, and the transcoded video data can be effectively multiplexed by subsequent requests, thereby reducing consumption of computing resources.

Description

Video data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of video data processing technologies, and in particular, to a method and apparatus for processing video data, an electronic device, and a storage medium.
Background
With the rapid development of internet video services, the storage, transcoding and transmission costs of video content are important challenges facing video service platforms. In order to reduce the storage and transmission costs while guaranteeing the user playing experience, the existing video transcoding scheme adopts a pre-transcoding mode for popular video resources, while non-popular video resources adopt a real-time transcoding mode, however, temporary video data generated by real-time transcoding is generally only used for meeting current user requests and cannot be effectively reused by subsequent requests, and due to the lack of effective management and utilization of the temporary video data, a large number of repeated real-time transcoding operations increase the consumption of computing resources, and meanwhile, the potential value of the temporary data cannot be fully exerted.
Disclosure of Invention
In view of the above problems, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for processing video data, which are capable of generating transcoded video data from video data transcoded in real time, and effectively multiplexing the transcoded video data by a subsequent request, so that consumption of computing resources can be reduced.
In a first aspect, an embodiment of the present application provides a method for processing video data, including:
acquiring access heat information of video data transcoded in real time;
and under the condition that the video data is determined to be transcoded and the video data meets the heat condition based on the access heat information, storing the transcoded video data after transcoding so that a video server returns the transcoded video data under the condition that a playing request of the video data is acquired.
In some embodiments, the method further comprises:
performing real-time transcoding on the video data to obtain video slicing data;
temporarily storing the video slicing data;
In the case of determining all video slice data in which the video data is temporarily stored, determining that the video data is transcoded;
Before storing the transcoded video data, the method further includes:
and combining all the video fragment data to obtain transcoded video data with the transcoded video data.
In some embodiments, the method further comprises:
The temporarily stored video clip data is eliminated based on a least recently used algorithm.
In some embodiments, the method further comprises:
Under the condition that an access request of video data sent by a player is obtained, determining whether the heat of the video data meets a heat condition or whether the format of the video data meets a format requirement;
And under the condition that the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement, determining the transcoded video data corresponding to the video data from the stored transcoded video data, and returning the transcoded video data corresponding to the video data to the player.
In some embodiments, the method further comprises:
determining whether video fragment data of the video data is temporarily stored or not under the condition that the heat of the video data does not meet a heat condition or the format of the video data does not meet a format requirement;
Returning the video clip data of the temporarily stored video data to the player under the condition that the video clip data of the video data is temporarily stored;
and under the condition that the video slicing data of the video data are not temporarily stored, performing real-time transcoding on the video data, and returning the video slicing data of the video data generated by the real-time transcoding to the player.
In some embodiments, the access popularity information includes access frequency, and the obtaining access popularity information of video data transcoded in real time includes:
And determining the access frequency of the video data in a preset time length by adopting a moving weighted exponential averaging method, or recording the access frequency of the video data in the preset time length.
In some embodiments, the video data is determined to satisfy a heat condition if the access frequency is greater than an access frequency threshold, or the video data is determined to satisfy a heat condition if a change rate of access frequency exceeds a change rate threshold based on the access frequency.
In a second aspect, an embodiment of the present application provides a processing apparatus for video data, including:
The acquisition module is used for acquiring access heat information of the video data transcoded in real time;
and the first storage module is used for storing the transcoded video data after transcoding under the condition that the video data is determined to be transcoded and the video data meets the heat condition based on the access heat information, so that the video server returns the transcoded video data under the condition that the video server acquires the playing request of the video data.
In a third aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method provided in the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program which when executed by a processor implements the method provided in the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program for at least performing the method of any one of the first aspects when the computer program is executed by a processor.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
according to the processing method of the video data, access heat information of the video data transcoded in real time is obtained, under the condition that the video data are determined to be transcoded and the video data meet heat conditions based on the access heat information, the transcoded video data after transcoding is stored, so that a video server returns the transcoded video data under the condition that a playing request of the video data is obtained, the transcoded video data can be generated in real time, and the transcoded video data can be effectively multiplexed by subsequent requests, and therefore consumption of computing resources can be reduced.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a video data processing method according to the embodiment of the present application;
Fig. 2 is a schematic implementation flow chart of another video data processing method according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of a video data processing apparatus according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if determined" or "if detected" may be interpreted in context to mean "upon determination" or "in response to determination" or "upon detection or" in response to detection.
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise.
Based on the technical problems of the related art, the method for processing video data provided by the embodiment of the application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, augmented reality (augmented reality, AR)/Virtual Reality (VR) devices, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal DIGITAL ASSISTANT, PDA) and the like, and the embodiment of the application does not limit the specific types of the electronic devices. The electronic device may act as a video server.
An embodiment of the present application provides a method for processing video data, which is described below by taking an electronic device as a video server as an example, and fig. 1 is a schematic flow chart of a method for processing video data, as shown in fig. 1, where the method includes:
Step S101, access heat information of video data transcoded in real time is acquired.
In the embodiment of the present application, the video data refers to the original video data that needs to be processed (such as transcoded). The video data may come from user uploads, external resource acquisitions, etc.
In the embodiment of the application, the video data can be the video data which does not meet the heat condition or the format does not meet the format requirement, and the video data which does not meet the heat condition can be that the access request amount of the video data in the preset time length is smaller than a preset threshold, namely the number of times that the video data is requested to be played in a certain time is smaller, and the video data is non-heat video data. The video data format does not meet the format requirement, and the frequency of use of the encoding parameters of the video data is smaller than the preset frequency threshold, and when the video data format does not meet the format requirement, the video data is the video data with non-mainstream specifications. The non-mainstream specification mainly means that parameters such as coding format, resolution and the like of video are rarely used in the current system.
In the embodiment of the application, the video data transcoded in real time can be called non-mainstream specification and/or non-popular video data.
In the embodiment of the application, the information for accessing the heat is used for measuring the heat index of the video requested to be played by the user, including but not limited to short-term heat and long-term heat, wherein the short-term heat can be the play request amount of 1 hour and 24 hours recently, the long-term heat can be the play request amount of 7 days or 30 days recently, and the play request amount can be called access frequency.
In the embodiment of the application, the access heat information can be obtained by analyzing the data sources such as the user behavior log, the video play log and the like. Various behaviors of the user interacting with the video platform, such as clicking, watching, pausing, fast forwarding, commenting, sharing and the like, can be recorded, and video play logs, namely, video play events including play start time, end time, play positions, user identification, equipment information and the like, are recorded. The log data may then be pre-processed, which may include data cleansing, data integration, and the like. The total number of times the video is watched can be calculated through the preprocessed data, and then the access heat information is obtained.
In some embodiments, data mining or machine learning techniques may be used to evaluate access heat information for video data. Machine learning models, such as linear regression, decision trees, random forests, gradient lifts, neural networks, etc., may be trained using historical data to predict access heat information for video data.
And step S102, storing the transcoded video data after transcoding is determined to be completed and the video data is determined to meet the heat condition based on the access heat information, so that the video server returns the transcoded video data when acquiring the play request of the video data.
In the embodiment of the application, the heat condition refers to a judgment standard set based on the access heat information, and is used for determining when to store the transcoded video data after transcoding is completed. Transcoded video data refers to complete video data obtained through real-time transcoding. Transcoded video data typically has a different encoding format, resolution or bit rate than the original video data to accommodate different playback environments or devices.
In the embodiment of the application, a heat threshold can be set to judge whether the video meets the heat condition, taking the access heat information as an access frequency as an example, and an access frequency threshold can be set, and when the access frequency is larger than the access frequency threshold, the condition that the heat condition is met is determined.
In the embodiment of the application, after the heat condition is met, whether the video data is transcoded is judged, whether the fragment data of all relevant video data are successfully stored is judged, and the fragment data are not lost or damaged. When all the slice data has been stored and is not lost or corrupted, the video data is transcoded to completion.
In embodiments of the present application, transcoded video data may be persistently stored, and the persistent storage may be accessed through a hard disk array, cloud storage, object storage service (Object Storage Service, OSS), or the like. The storage process also involves indexing and marking the transcoded video data so that the transcoded video data can be quickly retrieved and provided in subsequent video playback requests.
In the embodiment of the application, when a user sends a playing request, the video server searches the video content of the playing request. If transcoded video data corresponding to the video content already exists, the video server returns the transcoded video data for playback on the user device.
The method provided by the embodiment of the application comprises the steps of obtaining access heat information of video data transcoded in real time, and storing transcoded video data after transcoding under the condition that the video data are determined to be transcoded and the video data meet heat conditions based on the access heat information, so that a video server returns the transcoded video data under the condition that a playing request of the video data is obtained, the transcoded video data can be generated in real time, and the transcoded video data can be effectively multiplexed by subsequent requests, thereby reducing the consumption of computing resources.
In some embodiments, prior to step S101, the method further comprises:
And S1, performing real-time transcoding on the video data to obtain video slicing data.
In the embodiment of the application, the real-time transcoding refers to the dynamic transcoding of video data in the uploading or playing process, so that the video data is suitable for different terminal equipment, network environments or format requirements. Video slice data is an independent block of data into which video is partitioned, each slice containing a portion of video content (e.g., one slice per 2 seconds). Video data may be partitioned into multiple slices during transcoding for parallel processing, storage, or transmission. Each slice is part of the original video data, and may be sliced with a fixed duration, or with a fixed slice size, for example, 10 seconds/slice, or with a fixed slice size, for example, 1 MB/slice.
In the embodiment of the application, the transcoding tool can be used for transcoding the video data in real time so as to obtain the video slicing data. The method comprises the step of performing instant transcoding processing on video data, wherein parameters such as coding format, resolution, code rate and the like of the video are changed so as to adapt to different playing requirements.
And step S2, temporarily storing the video slicing data.
In the embodiment of the application, the video fragment data generated in the transcoding process are temporarily stored in a local memory and a disk. In some embodiments, video slicing data may also be stored in a cache, and temporary storage may be implemented, for example, with flash disk storage, which may be a Solid state disk (Solid STATE DRIVE, SSD).
Step S3, in the case where it is determined that all video slice data in which the video data is temporarily stored, it is determined that the video data is transcoded.
In the embodiment of the application, when transcoding in real time, the list file is updated immediately after each fragment is generated, and the information such as the number, sequence and duration of fragments is recorded. It may be determined whether all video clip data is temporarily stored through the clip manifest file. The number of slices actually stored may be compared with the number of manifest file declarations to determine whether all video slices of the video data are temporarily stored. In case the number of manifest file declarations is the same as the number of fragments actually stored, it is determined that the video data is transcoded to completion.
In the embodiment of the application, if all video slice data temporarily exist, the video data is determined to be transcoded to be completed, and if all video slice data temporarily stored with the video data do not exist, the temporary storage is continued to be waited for to be completed.
In some embodiments, prior to storing the transcoded video data to be transcoded, the method further comprises:
and S4, combining all the video fragment data to obtain transcoded video data with the transcoded video data.
In the embodiment of the application, a merging tool can be used for merging all video fragment data to obtain transcoded video data with transcoded completion. After the completed transcoded video data is obtained, the transcoded completed transcoded video data is stored if it is determined that the video data is transcoded and the video data satisfies a heat condition based on the access heat information.
In some embodiments, accessing the heat information includes accessing a frequency. The frequency of access refers to the total number of times video content is accessed or viewed within a particular period of time, which is a direct indicator of how hot the video is measured. The higher the frequency of access, the more popular or attractive the video content.
In some embodiments, step S101, the acquiring access heat information of the video data transcoded in real time may be implemented by the following steps:
Step S1011, determining the access frequency of the video data in a preset duration by adopting a moving weighted exponential averaging method.
In the embodiment of the application, the moving weighted exponential averaging method is a time series analysis method for smoothing data and predicting future trends. Moving weighted exponential averaging is used to determine how frequently video data is accessed within a preset time period to reflect its recent popularity by giving data at different points in time different weights to calculate an average value, thereby emphasizing the most recent data points and reducing the impact of historical data points. The preset duration refers to a time range for calculating the access frequency or applying a moving weighted exponential averaging method. It may be a fixed period of time (e.g., one day, one week, one month, etc.).
In the embodiment of the application, the access record of the video data in the preset time period can be collected. The access records are processed using a moving weighted exponential averaging method. In the processing process, a weight is given to the access times of each time point, usually the latest access times are given a higher weight, and finally the weighted average value is calculated and used as the access frequency of the video data in the preset duration.
The method provided by the embodiment of the application can smooth the data fluctuation by adopting a moving weighted exponential averaging method, and better reflect the recent popularity of the video data.
In some embodiments, step S101 may be implemented by:
Step S1012, recording the access frequency of the video data in a preset duration.
In the embodiment of the application, the video server can directly record the total number of times the video data is accessed in the preset duration. The video server may parse and count the access log to calculate the number of accesses of video data per time unit (e.g., hour, day, week, etc.). And finally, adding the access times by the video server to obtain the total access frequency of the video data in the preset duration.
The method provided by the embodiment of the application can obtain the access frequency through a statistical method.
In some embodiments, the video data is determined to satisfy a heat condition if the access frequency is greater than an access frequency threshold, or the video data is determined to satisfy a heat condition if a change rate of access frequency exceeds a change rate threshold based on the access frequency.
In the embodiment of the application, the access frequency threshold is a preset value, and is used for judging whether the access frequency of the video data reaches a certain heat level, and if the access frequency of the video data exceeds the threshold, the video data is considered to meet the heat condition. The access frequency change rate refers to a percentage of change in the access frequency of video data over a period of time relative to a previous period of time. It reflects the increasing speed or decreasing trend of video heat. The change rate threshold is a preset percentage value for judging whether the access frequency change rate of the video data is significant. If the access frequency change rate exceeds the change rate threshold, the video data is considered to have significantly changed in heat, and the video data satisfies the heat condition.
In the embodiment of the application, when judging based on the access frequency threshold, the access frequency of the video data in a specific time period can be acquired. This access frequency is then compared to a preset range frequency threshold. And if the access frequency is larger than the range frequency threshold value, judging that the video data meets the heat condition.
In some embodiments, when the determination is made based on a rate of change threshold, the rate of change of the frequency of access of the video data over two consecutive time periods may be calculated. This rate of change is then compared to a preset rate of change threshold. And if the access frequency change rate exceeds the change rate threshold, judging that the video data meets the heat condition.
In the embodiment of the application, the judgment based on the access frequency threshold value or the judgment based on the access frequency change rate can be selected according to specific requirements and business logic, or both can be used as judgment basis.
The method provided by the embodiment of the application can accurately judge whether the video data meets the heat condition.
In some embodiments, after step S4, the method further comprises:
and step S5, deleting the video slicing data of the temporarily stored video data when the transcoded video data is stored.
In the embodiment of the application, after the transcoded video data is successfully stored in the persistent storage medium, the temporarily stored video slicing data is not needed. Therefore, in order to save storage space and improve storage efficiency, these video clip data are deleted from the temporary storage medium. The delete operation may be implemented programmatically, e.g., using a script or API to call a delete function of the storage system.
According to the method provided by the embodiment of the application, the transcoded video data is stored on the persistent storage medium, and the temporarily stored video fragment data is deleted, so that the utilization of storage resources can be optimized, unnecessary storage space occupation can be reduced, and storage cost is reduced.
In some embodiments, the method further comprises:
And S6, eliminating the temporarily stored video slicing data based on a least recently used algorithm.
In the embodiment of the present application, a least recently Used algorithm (LRU, least Recently Used) is a cache-elimination strategy for deciding which data should be removed when the cache is full, so as to make room for new data. The core idea of the LRU algorithm is that if a certain data is accessed recently, the probability of being accessed later is higher, and conversely, if a certain data is accessed least recently, the probability of being accessed later is the lowest, so that it should be eliminated preferentially.
In the embodiment of the application, the LRU algorithm is generally implemented by a special data structure, such as a combination of a doubly linked list and a hash table. The doubly linked list is used to maintain the access order of data, wherein the head of the list represents the most recently accessed data and the tail of the list represents the least recently accessed data. The hash table is used for quickly locating the position of the data in the linked list so that the linked list structure can be quickly updated when the data is accessed or eliminated. When the capacity of temporary storage reaches the upper limit, the video slicing data needs to be eliminated according to the principle of the LRU algorithm. The hash table is first checked for the longest unaccessed video clip data (i.e., the data at the end of the linked list). The data is then removed from the linked list and the hash table is updated to reflect this change. And finally, releasing the storage space occupied by the video slicing data so as to make room for new video slicing data.
According to the method provided by the embodiment of the application, the LRU algorithm is used, so that the video fragment data accessed recently is always reserved, and the data which is not accessed for the longest time is eliminated, thereby being beneficial to optimizing the utilization of storage resources and improving the efficiency and reliability of video processing. In addition, the LRU algorithm may also reduce unnecessary disk I/O operations, thereby reducing overall load and response time.
In some embodiments, prior to step S101, the method further comprises:
step S11, under the condition that an access request of the video data sent by a player is obtained, determining whether the heat of the video data meets a heat condition or the format of the video data meets a format requirement;
in an embodiment of the present application, the player is a tool used by a user to request and view video content. The access request refers to a request sent by the player to the video server for acquiring video data. This request typically contains identification information of the video data and parameters (e.g., format, resolution, etc.) required by the user to play the video.
In the embodiment of the application, when the player sends an access request of video data, the video server first receives and analyzes the request. The video server checks the identification information of the video data contained in the request and parameters required by the user to play the video, and judges whether the video data can be directly provided to the player according to judging whether the heat of the video data meets the heat condition or whether the format of the video data meets the format requirement.
In the embodiment of the application, whether the heat degree meets the heat degree condition can be determined by whether the access frequency of the preset duration is greater than the preset threshold, if the access frequency is greater than the preset threshold, the heat degree of the video data is considered to meet the heat degree condition, and if the access frequency is less than or equal to the preset threshold, the heat degree of the video data is considered to not meet the heat degree condition, the preset duration can be configured for 24 hours, the preset threshold can be configured, and the preset threshold can be configured for 100 times. The frequency of clicking and playing each video by the user can be continuously detected, so that the access frequency of the video data is obtained. By way of example, if one video is watched less than 100 times in 24 hours, the video may not satisfy the hot condition, the video data may be non-hot video data, which may also be regarded as cold video data, and if one video is watched more than 100 times in 24 hours, the video data may be regarded as satisfying the hot condition.
In the embodiment of the application, whether the format of the video data meets the format requirement can be determined through the use frequency of the format of the video data and the preset use frequency threshold, the preset use frequency threshold can be configured, for example, 1%, the coding parameters of all videos can be counted, the duty ratio of the video data corresponding to the coding parameters is determined, so that the use frequency is obtained, for example, the video coded by adopting H.266 only occupies 0.1% of the whole platform and is lower than the set 1% threshold, and the video data is considered to be the video data with non-mainstream specification.
And step S12, determining the transcoded video data corresponding to the video data from the stored transcoded video data and returning the transcoded video data corresponding to the video data to the player when the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement.
In the embodiment of the application, if the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement (namely, the access request quantity is large or the use frequency is high), the video server needs to determine the transcoded video data corresponding to the video data from the stored transcoded video data. Transcoded video data that matches the video data can be searched on a storage medium and loaded into memory for transmission to a player. When the video server acquires the transcoded video data matched with the video data, the transcoded video data is sent to the player. The player then decodes and plays the piece of video data for viewing by the user.
According to the method provided by the embodiment of the application, whether the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement is determined, and when the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement, the transcoded video data corresponding to the video data is determined from the stored transcoded video data, and the transcoded video data corresponding to the video data is returned to the player, so that a user can be ensured to smoothly watch the video content with high access quantity or high demand. This helps to improve the usability and user experience of the video service while optimizing the utilization of storage and transmission resources, reducing the load and response time of the server.
In some embodiments, after step S11, the method may further include:
Step S13, determining whether video slice data of the video data is temporarily stored, in a case where the heat of the video data does not satisfy a heat condition or the format of the video data does not satisfy a format requirement.
And step S14, returning the temporarily stored video slicing data to the player in the case of the video slicing data temporarily stored with the video data.
In the embodiment of the application, if the video slicing data of the requested video data is temporarily stored, the slicing data can be directly returned to the player. These fragmented data have been previously requested, transcoded, and temporarily saved for quick access. After receiving the fragment data, the player can decode and play the fragment data as required.
And step S15, under the condition that the video slicing data of the video data are not temporarily stored, transcoding the video data in real time, and returning the video slicing data of the video data generated by transcoding to the player.
In the embodiment of the present application, if there is no video slice data of the requested video data in the temporary storage, the original video data needs to be transcoded in real time, and steps 101 to 102 are performed.
According to the method provided by the embodiment of the application, the transcoding of the main stream resolution and the code rate specification is finished on the popular video resources in advance, the non-main stream specification and the non-popular video resources provide temporary video data by means of real-time transcoding, and after the temporary video data meet the popularity condition, the video files generated by merging the segmented video data can replace the conventional transcoding files, and repeated transcoding of the original resources is not needed. The Peer-to-Peer (P2P) P2P distribution difficulty of the fragmented video can be greatly reduced. After the complete video file is generated, the existing P2P system can be directly utilized without additional modification.
Based on the foregoing embodiments, the embodiment of the present application further provides a method for processing video data, and fig. 2 is a schematic implementation flow diagram of another method for processing video data according to the embodiment of the present application, as shown in fig. 2, including:
step S201, a video playing request of the player is obtained.
In step S202, the video server determines whether there is slice data of the video.
In the embodiment of the present application, if not, step S203 is performed, and if so, step S204 is performed.
In step S203, the video is subjected to real-time slicing transcoding.
After step S203, step S205 is performed.
Step S204, returning the fragment data to the player.
Step S205, storing the fragment data.
In the embodiment of the application, temporary video fragment data generated by real-time transcoding is temporarily stored in a local SSD. After step S205, step S204 and step S206 are performed.
In step S206, the heat information of the video is maintained.
In the embodiment of the application, the video fragment consumption data can be collected, the information such as the ID of the original video file, the resolution of the target video, the code rate and the like is taken as an index, the user access frequency data is constructed according to different time period dimensions such as days, hours and minutes, and the resource access frequency and the access frequency change condition are observed. When the access frequency or the frequency change exceeds a configuration threshold, namely the heat condition is met, the index is recorded to a queue to be merged. And configuring frequency thresholds for different time period dimensions according to the on-demand system resource heat distribution statistical data.
Step S207, judging whether the heat degree satisfies a heat degree condition.
In the embodiment of the present application, if yes, step S208 is executed, and if no, step S206 is executed continuously.
In the embodiment of the application, the number of access users in a time period exceeds the threshold, or the access frequency in the period predicted according to the moving weighted exponential averaging (EWMA) exceeds the threshold, and the satisfaction of the heat condition is determined.
Step S208, it is determined whether all the fragment data has been transcoded.
In the embodiment of the present application, if yes, step S210 is executed, and if no, the process ends.
Step S209, merging all fragments.
Step S210, storing the combined transcoded video data in the object storage service.
In the embodiment of the application, after the resources meet the merging condition, merging all the fragment data of the resources on the SSD, storing the complete video file to the object storage system, and releasing the occupation of the local SSD. And eliminating the fragmented data which do not meet the merging condition according to the LRU algorithm.
The method provided by the embodiment of the application decides to combine and reuse the fragment data generated by the real-time transcoding according to the real-time access condition of the resource, and selects the fragment data of the high-value video data to generate the complete transcoded video data. The video file generated by merging the segmented video data can replace a conventional transcoding file, and repeated transcoding of the original resource is not needed.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
According to the foregoing embodiments, the video data Processing apparatus provided in the embodiments of the present application may include each module and each unit included in each module, which may be implemented by a processor in a computer device, or may of course be implemented by specific logic circuits, where in the implementation process, the processor may be a central Processing unit (CPU, central Processing Unit), a microprocessor (MPU, microprocessor Unit), a digital signal processor (DSP, digital Signal Processing), a field programmable gate array (FPGA, field Programmable GATE ARRAY), or the like.
An embodiment of the present application provides a processing apparatus for video data, and fig. 3 is a schematic structural diagram of the processing apparatus for video data provided in the embodiment of the present application, where, as shown in fig. 3, a processing apparatus 300 for video data includes:
An acquisition module 301, configured to acquire access heat information of video data transcoded in real time;
And the first storage module 302 is configured to store the transcoded video data after transcoding is determined to be completed and the video data is determined to satisfy a heat condition based on the access heat information, so that the video server returns the transcoded video data when acquiring a play request of the video data.
In some embodiments, the processing device 300 for video data further comprises:
the video slicing data acquisition module is used for carrying out real-time transcoding on the video data to obtain video slicing data;
the second storage module is used for temporarily storing the video fragment data;
a first determining module, configured to determine that the video data is transcoded to be complete in a case where it is determined that all video slice data of the video data is temporarily stored;
The processing device 300 for video data further includes, before storing the transcoded video data after transcoding, the processing device further includes:
and the merging module is used for merging all the video fragment data to obtain transcoded video data with the transcoded video data.
In some embodiments, the processing device 300 for video data further comprises:
and the elimination module is used for eliminating the temporarily stored video slicing data based on the least recently used algorithm.
In some embodiments, the processing device 300 for video data further comprises:
the second determining module is used for determining whether the heat of the video data meets the heat condition or whether the format of the video data meets the format requirement under the condition that the access request of the video data sent by the player is acquired;
The first return module is used for determining the transcoded video data corresponding to the video data from the stored transcoded video data and returning the transcoded video data corresponding to the video data to the player when the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement.
In some embodiments, the processing device 300 for video data further comprises:
A third determining module, configured to determine whether video slice data of the video data is temporarily stored, where the heat of the video data does not meet a heat condition or the format of the video data does not meet a format requirement;
the second return module is used for returning the video slicing data of the temporarily stored video data to the player under the condition that the video slicing data of the video data are temporarily stored;
and the implementation transcoding module is used for transcoding the video data in real time under the condition that the video slicing data of the video data are not temporarily stored, and returning the video slicing data of the video data generated by the real-time transcoding to the player.
In some embodiments, the access heat information includes an access frequency, and the acquisition module is configured to:
And determining the access frequency of the video data in a preset time length by adopting a moving weighted exponential averaging method, or recording the access frequency of the video data in the preset time length.
In some embodiments, the video data is determined to satisfy a heat condition if the access frequency is greater than an access frequency threshold, or the video data is determined to satisfy a heat condition if a change rate of access frequency exceeds a change rate threshold based on the access frequency.
The processing device for video data shown in fig. 3 may be a software unit, a hardware unit, or a combination of both a software unit and a hardware unit, which are built into an existing electronic device, may be integrated into the electronic device as a separate pendant, or may exist as a separate terminal device.
It should be noted that, because the content of information interaction and execution process between the above devices/units is according to the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic device of this embodiment may include at least one processor 30 (only one processor 30 is shown in fig. 4), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, where the processor 30 implements the steps of any of the various method embodiments described above when executing the computer program 32, or where the processor 30 implements the functions of the modules/units of the apparatus embodiments described above when executing the computer program 32.
By way of example, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more of the modules/units may be a series of instruction segments of the computer program 32 capable of performing a specific function, the instruction segments describing the execution of the computer program 32 in an electronic device.
Embodiments of the present application also provide a computer readable storage medium storing a computer program 32, which when executed by the processor 30 implements steps of the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on an electronic device, causes the electronic device to perform steps that may be carried out in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. With such understanding, the present application may be implemented in whole or in part by the implementation of the above-described method embodiments, and may be implemented by the computer program 32 instructing the relevant hardware, the computer program 32 may be stored in a computer readable storage medium, and the computer program 32 may implement the steps of the above-described method embodiments when executed by the processor 30. The computer program 32 comprises computer program code, which may be in the form of source code, object code, executable files, or in some intermediate form, among others. The computer readable medium can include at least any entity or device capable of carrying computer program code to a terminal, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing embodiments are merely illustrative of the technical solutions of the present application, and not restrictive, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that modifications may still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions of some technical features thereof, and that such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
The personal information of the related user possibly related in each embodiment of the application is personal information which is actively provided by the user or generated by using the product/service in the process of using the product/service and is obtained by authorization of the user, and is processed based on the reasonable purpose of the business scene according to legal, legal and necessary principles strictly according to the requirements of laws and regulations.
The personal information of the user processed by the applicant may vary depending on the specific product/service scenario, and may relate to account information, equipment information, driving information, vehicle information or other related information of the user, depending on the specific scenario in which the user uses the product/service. The applicant would treat the user's personal information and its processing with a high diligence.
The applicant has very important consideration to the safety of personal information of users, and has adopted safety protection measures which meet industry standards and are reasonably feasible to protect the information of the users and prevent the personal information from unauthorized access, disclosure, use, modification, damage or loss.

Claims (10)

1. A method of processing video data, comprising:
acquiring access heat information of video data transcoded in real time;
and under the condition that the video data is determined to be transcoded and the video data meets the heat condition based on the access heat information, storing the transcoded video data after transcoding so that a video server returns the transcoded video data under the condition that a playing request of the video data is acquired.
2. The method according to claim 1, wherein the method further comprises:
performing real-time transcoding on the video data to obtain video slicing data;
temporarily storing the video slicing data;
In the case of determining all video slice data in which the video data is temporarily stored, determining that the video data is transcoded;
Before storing the transcoded video data, the method further includes:
and combining all the video fragment data to obtain transcoded video data with the transcoded video data.
3. The method according to claim 2, wherein the method further comprises:
The temporarily stored video clip data is eliminated based on a least recently used algorithm.
4. The method according to claim 1, wherein the method further comprises:
Under the condition that an access request of video data sent by a player is obtained, determining whether the heat of the video data meets a heat condition or whether the format of the video data meets a format requirement;
And under the condition that the heat degree of the video data meets the heat degree condition or the format of the video data meets the format requirement, determining the transcoded video data corresponding to the video data from the stored transcoded video data, and returning the transcoded video data corresponding to the video data to the player.
5. The method according to claim 4, wherein the method further comprises:
determining whether video fragment data of the video data is temporarily stored or not under the condition that the heat of the video data does not meet a heat condition or the format of the video data does not meet a format requirement;
Returning the video clip data of the temporarily stored video data to the player under the condition that the video clip data of the video data is temporarily stored;
and under the condition that the video slicing data of the video data are not temporarily stored, performing real-time transcoding on the video data, and returning the video slicing data of the video data generated by the real-time transcoding to the player.
6. The method of claim 1, wherein the accessing the heat information comprises accessing a frequency, and wherein the obtaining the accessing the heat information for the video data transcoded in real time comprises:
And determining the access frequency of the video data in a preset time length by adopting a moving weighted exponential averaging method, or recording the access frequency of the video data in the preset time length.
7. The method according to claim 6, wherein the video data is determined to satisfy a heat condition if the access frequency is greater than an access frequency threshold, or wherein the video data is determined to satisfy a heat condition if it is determined that an access frequency change rate exceeds a change rate threshold based on the access frequency.
8. A processing apparatus for video data, comprising:
The acquisition module is used for acquiring access heat information of the video data transcoded in real time;
and the first storage module is used for storing the transcoded video data after transcoding under the condition that the video data is determined to be transcoded and the video data meets the heat condition based on the access heat information, so that the video server returns the transcoded video data under the condition that the video server acquires the playing request of the video data.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202510555703.9A 2025-04-29 2025-04-29 Video data processing method and device, electronic equipment and storage medium Pending CN120499446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510555703.9A CN120499446A (en) 2025-04-29 2025-04-29 Video data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510555703.9A CN120499446A (en) 2025-04-29 2025-04-29 Video data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN120499446A true CN120499446A (en) 2025-08-15

Family

ID=96674468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510555703.9A Pending CN120499446A (en) 2025-04-29 2025-04-29 Video data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN120499446A (en)

Similar Documents

Publication Publication Date Title
US8812791B2 (en) System and method of selectively caching information based on the interarrival time of requests for the same information
US7251649B2 (en) Method for prioritizing content
JP5086189B2 (en) Server, method and program for generating digest video of video content
US20120195362A1 (en) System and Method for Managing Cache Storage in Adaptive Video Streaming System
US8307164B2 (en) Automatic determination of read-ahead amount
US11025965B2 (en) Pre-fetching content among DVRs
CN118381976B (en) A method, device, equipment and medium for processing video resources on a browser
WO2008012619A2 (en) Automatic management of digital archives, in particular of audio and/or video files
US9661357B2 (en) Method and system to locally cache and inform users of partial video segments and data objects
CN119620952A (en) A file storage method, device, equipment and medium
CN111913913B (en) Access request processing method and device
CN120499446A (en) Video data processing method and device, electronic equipment and storage medium
CN105824820A (en) Media file buffer memory method and device
JP3844446B2 (en) VIDEO MANAGEMENT METHOD, DEVICE, VIDEO MANAGEMENT PROGRAM, AND RECORDING MEDIUM CONTAINING THE PROGRAM
CN109511009B (en) Video online cache management method and system
JP2018511131A (en) Hierarchical cost-based caching for online media
CN116208778A (en) Audit video playback method and device and electronic equipment
CN110708361A (en) System, method and device for determining grade of digital content publishing user and server
CN105657473A (en) Data processing method and device
CN117708461A (en) User release content processing method, device, computing equipment and storage medium
CN117785933A (en) Data caching method, device, equipment and readable storage medium
CN117573357B (en) Cloud edge collaborative caching method, system and medium based on perceptual redundancy
KR101637022B1 (en) Apparatus and method for transmitting and receiving content
CN119729113B (en) Method and device for detecting highlight of live broadcast resource and computing equipment
CN117156008B (en) Data caching method and system of edge node and readable storage medium

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