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

By obtaining the access popularity information of video data and storing the transcoded video data, the problem of real-time transcoded data not being reused is solved, and the saving of computing resources and the efficient operation of video services is achieved.

CN120499446APending Publication Date: 2025-08-15XUNLEI COMP SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510555703.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

When the existing video service platform processes video data, the temporary data generated by real-time transcoding cannot be effectively reused, resulting in excessive consumption of computing resources and failure to make full use of potential value.

Method used

By obtaining the access popularity information of real-time transcoding video data, we judge whether the popularity conditions are met and the transcoding video data is stored so that the transcoding video data is returned during the playback request, reducing the need for real-time transcoding.

Benefits of technology

It realizes effective reuse of real-time transcoding video data, reduces the consumption of computing resources, optimizes the utilization of storage and transmission resources, and improves the availability and user experience of video services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120499446A_ABST
    Figure CN120499446A_ABST
Patent Text Reader

Abstract

The invention provides a video data processing method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining access popularity information of video data subjected to real-time transcoding; and when it is determined that transcoding of the video data is completed and it is determined that the video data satisfies a popularity condition based on the access popularity information, storing the transcoded video data after transcoding is completed, so that a video server returns the transcoded video data under the condition that a playing request of the video data is obtained. According to the invention, real-time transcoded video data can be generated into transcoded video data, and the transcoded video data can be effectively reused by subsequent requests, so that consumption of computing resources can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video data processing technology, and in particular relates to a method, device, electronic device and storage medium for processing video data. Background Art

[0002] With the rapid development of internet video services, the storage, transcoding, and transmission costs of video content have become significant challenges for video service platforms. To ensure a high user experience while reducing storage and transmission costs, existing video transcoding solutions use pre-transcoding for popular video resources and real-time transcoding for less popular video resources. However, the temporary video data generated by real-time transcoding is typically only used to satisfy the current user request and cannot be effectively reused for subsequent requests. Due to the lack of effective management and utilization of temporary video data, a large number of repeated real-time transcoding operations increase computing resource consumption while also failing to fully realize the potential value of temporary data. Summary of the Invention

[0003] In response to the above-mentioned problems, the embodiments of the present application provide a method, device, electronic device and storage medium for processing video data, which can generate transcoded video data from real-time transcoded video data. The transcoded video data can be effectively reused by subsequent requests, thereby reducing the consumption of computing resources.

[0004] In a first aspect, an embodiment of the present application provides a method for processing video data, including:

[0005] Obtain access popularity information of video data being transcoded in real time;

[0006] When it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, the transcoded video data that has been transcoded is stored so that the video server returns the transcoded video data when a playback request for the video data is obtained.

[0007] In some embodiments, the method further comprises:

[0008] Performing real-time transcoding on the video data to obtain video fragment data;

[0009] Temporarily storing the video segment data;

[0010] In a case where it is determined that all video fragment data of the video data are temporarily stored, determining that transcoding of the video data is completed;

[0011] Before storing the transcoded video data, the method further includes:

[0012] All video fragment data are merged to obtain the transcoded video data after transcoding.

[0013] In some embodiments, the method further comprises:

[0014] The temporarily stored video segment data is eliminated based on the least recently used algorithm.

[0015] In some embodiments, the method further comprises:

[0016] In the case of obtaining an access request for video data sent by a player, determining whether the popularity of the video data meets a popularity condition or the format of the video data meets a format requirement;

[0017] When the popularity of the video data meets the popularity 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.

[0018] In some embodiments, the method further comprises:

[0019] If the popularity of the video data does not meet the popularity condition or the format of the video data does not meet the format requirement, determining whether video fragment data of the video data is temporarily stored;

[0020] In a case where the video segment data of the video data is temporarily stored, returning the temporarily stored video segment data of the video data to the player;

[0021] In the case where no video fragment data of the video data is temporarily stored, the video data is transcoded in real time, and the video fragment data of the video data generated by the real-time transcoding is returned to the player.

[0022] In some embodiments, the access popularity information includes: access frequency, and obtaining the access popularity information of the real-time transcoded video data includes:

[0023] The access frequency of the video data within a preset time period is determined by using a moving weighted exponential average method, or the access frequency of the video data within a preset time period is recorded.

[0024] In some embodiments, when the access frequency is greater than an access frequency threshold, the video data is determined to meet the heat condition, or when the access frequency change rate exceeds a change rate threshold based on the access frequency, the video data is determined to meet the heat condition.

[0025] In a second aspect, an embodiment of the present application provides a video data processing device, comprising:

[0026] An acquisition module is used to obtain access popularity information of the video data being transcoded in real time;

[0027] The first storage module is used to store the transcoded video data after transcoding is completed when it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, so that the video server can return the transcoded video data when obtaining a playback request for the video data.

[0028] 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, wherein the processor implements the method provided in the first aspect when executing the computer program.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method provided in the first aspect above.

[0030] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to implement at least any method as described in the first aspect.

[0031] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0032] The video data processing method provided in the embodiment of the present application obtains the access popularity information of the video data being transcoded in real time; when it is determined that the video data has been transcoded and the video data meets the popularity condition based on the access popularity information, the transcoded video data that has been transcoded is stored, so that the video server returns the transcoded video data when a playback request for the video data is obtained, and the real-time transcoded video data can be generated into transcoded video data, and the transcoded video data can be effectively reused by subsequent requests, thereby reducing the consumption of computing resources.

[0033] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0035] Figure 1 A flowchart of a method for processing video data provided by the present application;

[0036] Figure 2 A schematic diagram of an implementation flow of another method for processing video data provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of the structure of a video data processing device provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0040] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0041] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0042] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if it is detected" can be interpreted as meaning "upon determining" or "in response to determining" or "upon detecting" or "in response to detecting," depending on the context.

[0043] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0044] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.

[0045] Based on the technical problems of related technologies, the embodiments of the present application provide a method for processing video data that can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific type of electronic device. The electronic device can serve as a video server.

[0046] The present application provides a method for processing video data, which is described below using an electronic device as a video server as an example. Figure 1 The present application provides a flowchart of a method for processing video data, as shown in FIG. Figure 1 As shown, the method includes:

[0047] Step S101: Obtain access popularity information of the real-time transcoded video data.

[0048] In the embodiment of the present application, video data refers to the original video data that needs to be processed (such as transcoding). The video data can be uploaded by users, obtained from external resources, etc.

[0049] In an embodiment of the present application, the video data may be video data that does not meet the popularity condition or the format does not meet the format requirements. The video data does not meet the popularity condition when: the number of access requests for the video data within a preset time period is less than a preset threshold, that is, the number of times the video data is requested to be played within a certain period of time is small, and the video data is non-hot video data. The format of the video data does not meet the format requirements when the frequency of use of the encoding parameters of the video data is less than a preset usage frequency threshold. When the format of the video data does not meet the format requirements, the video data is video data of non-mainstream specifications. Non-mainstream specifications mainly refer to: video encoding formats, resolutions and other parameters are rarely used in the current system.

[0050] In the embodiment of the present application, the video data that is transcoded in real time may be referred to as non-mainstream specifications and / or non-popular video data.

[0051] In an embodiment of the present application, access popularity information is used to measure the popularity index of the video requested to be played by users, including but not limited to: short-term popularity and long-term popularity. Short-term popularity can be the number of playback requests in the last 1 hour or 24 hours, and long-term popularity can be the number of playback requests in the last 7 days or 30 days. The number of playback requests can be called access frequency.

[0052] In an embodiment of the present application, access popularity information can be obtained by analyzing data sources such as user behavior logs and video playback logs. Various user interactions with the video platform, such as clicks, views, pauses, fast forwards, comments, and shares, can be recorded, and video playback logs can be recorded: video playback events, including playback start time, end time, playback position, user ID, device information, etc. The log data can then be preprocessed, and the preprocessing may include: data cleaning, data integration, etc. The total number of times the video has been viewed can be calculated using the preprocessed data to obtain access popularity information.

[0053] In some embodiments, data mining or machine learning techniques can be used to evaluate the popularity of video data. Machine learning models, such as linear regression, decision trees, random forests, gradient boosting machines, neural networks, etc., can be trained using historical data to predict the popularity of video data.

[0054] In step S102, when it is determined that the video data has been transcoded and the video data meets the popularity condition based on the access popularity information, the transcoded video data that has been transcoded is stored so that the video server can return the transcoded video data when receiving a playback request for the video data.

[0055] In the embodiments of the present application, the "hotness condition" refers to a judgment criterion set based on access hotness information, which is used to determine when to store 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.

[0056] In an embodiment of the present application, a heat threshold can be set to determine whether the video meets the heat condition. Taking the access heat information as the access frequency as an example, an access frequency threshold can be set. When the access frequency is greater than the access frequency threshold, it is determined that the heat condition is met.

[0057] In the embodiment of the present application, when the heat condition is met, it can be determined whether the video data has been transcoded, and it can be determined whether all relevant video data segments have been successfully stored and have not been lost or damaged. When all the segment data have been stored and have not been lost or damaged, the video data is transcoded.

[0058] In the embodiments of the present application, the transcoded video data will be persistently stored, which can be achieved through hard disk arrays, cloud storage, object storage services (OSS), etc. The storage process also involves indexing and tagging the transcoded video data so that the transcoded video data can be quickly retrieved and provided in subsequent video playback requests.

[0059] In the embodiment of the present application, when a user issues a play request, the video server searches for the video content of the play request. If the transcoded video data corresponding to the video content already exists, the video server returns the transcoded video data for playback on the user device.

[0060] The method provided by the embodiment of the present application obtains the access popularity information of the video data being transcoded in real time; when it is determined that the video data has been transcoded and the video data meets the popularity condition based on the access popularity information, the transcoded video data that has been transcoded is stored, so that the video server returns the transcoded video data when a playback request for the video data is obtained, and the real-time transcoded video data can be generated into transcoded video data, and the transcoded video data can be effectively reused by subsequent requests, thereby reducing the consumption of computing resources.

[0061] In some embodiments, before step S101, the method further includes:

[0062] Step S1: transcode the video data in real time to obtain video fragment data.

[0063] In the embodiment of the present application, real-time transcoding refers to the dynamic encoding conversion of video data during uploading or playback, so that it can adapt to different terminal devices, network environments or format requirements. Video fragment data is the independent data blocks into which the video is divided, and each fragment contains part of the video content (such as a fragment of 2 seconds). Video data can be divided into multiple fragments during the transcoding process for parallel processing, storage or transmission. Each fragment is a part of the original video data. When fragmenting, it can be fragmented with a fixed duration or a fixed fragment size. Exemplarily, taking a fixed duration as an example, it can be fragmented with 10 seconds / piece. Taking a fixed fragment size as an example, it can be fragmented with 1MB / piece.

[0064] In the embodiment of the present application, a transcoding tool can be used to perform real-time transcoding of video data to obtain video fragment data. The real-time transcoding of video data includes changing parameters such as the video encoding format, resolution, and bit rate to adapt to different playback requirements.

[0065] Step S2: temporarily storing the video segment data.

[0066] In the embodiment of the present application, the video segment data generated during the transcoding process is temporarily stored in a local memory or disk. In some embodiments, the video segment data can also be stored in a cache. For example, a fast disk storage can be used to achieve temporary storage. The fast disk can be a solid state drive (SSD).

[0067] Step S3: When it is determined that all the video fragment data of the video data are temporarily stored, it is determined that the transcoding of the video data is completed.

[0068] In an embodiment of the present application, during real-time transcoding, a manifest file is updated immediately after each fragment is generated to record information such as the number, sequence, and duration of the fragments. The fragment manifest file can be used to determine whether all video fragment data is temporarily stored. The number of fragments actually stored can be compared with the number declared in the manifest file to determine whether all video fragment data for the video data is temporarily stored. If the number declared in the manifest file is the same as the number of fragments actually stored, then transcoding of the video data is determined to be complete.

[0069] In the embodiment of the present application, if all video fragment data are temporarily stored, it is determined that the video data has been transcoded; if all video fragment data of the video data are not temporarily stored, the process continues to wait for temporary storage to be completed.

[0070] In some embodiments, before storing the transcoded video data, the method further includes:

[0071] Step S4: merge all the video fragment data to obtain transcoded video data.

[0072] In an embodiment of the present application, a merging tool can be used to merge all video fragment data to obtain transcoded video data. After obtaining the transcoded video data, if it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, the transcoded video data is stored.

[0073] In some embodiments, access popularity information includes access frequency. Access frequency refers to the total number of times a video content is accessed or viewed within a specific time period. It is a direct indicator of video popularity. A higher access frequency indicates a more popular or engaging video content.

[0074] In some embodiments, step S101, obtaining access popularity information of the real-time transcoded video data, can be achieved by the following steps:

[0075] Step S1011 : determining the access frequency of the video data within a preset time period by using a moving weighted exponential averaging method.

[0076] In the embodiments of the present application, the moving weighted exponential average method is a time series analysis method used to smooth data and predict future trends. The moving weighted exponential average method calculates the average by assigning different weights to data at different time points, thereby emphasizing the most recent data points and reducing the influence of historical data points. The moving weighted exponential average method is used to determine the access frequency of video data within a preset duration to reflect its recent popularity. The preset duration refers to the time range used to calculate the access frequency or apply the moving weighted exponential average method. It can be a fixed time period (such as one day, one week, one month, etc.).

[0077] In an embodiment of the present application, access records of video data within a preset duration can be collected. These access records are processed using a moving weighted exponential average method. During the processing, a weight is assigned to the number of accesses at each time point, with the most recent accesses typically being given a higher weight. Finally, the weighted average is calculated as the access frequency of the video data within the preset duration.

[0078] The method provided in the embodiment of the present application uses a moving weighted exponential average method to smooth data fluctuations and better reflect the recent popularity of video data.

[0079] In some embodiments, step S101 may be implemented by the following steps:

[0080] Step S1012: Record the access frequency of the video data within a preset time period.

[0081] In an embodiment of the present application, the video server can directly record the total number of times the video data is accessed within a preset duration. The video server can parse and compile statistics on the access log to calculate the number of times the video data is accessed within each time unit (such as an hour, day, or week). Finally, the video server adds up these access times to obtain the total access frequency of the video data within the preset duration.

[0082] The method provided in the embodiment of the present application can obtain the access frequency through a statistical method.

[0083] In some embodiments, when the access frequency is greater than an access frequency threshold, the video data is determined to meet the heat condition, or when the access frequency change rate exceeds a change rate threshold based on the access frequency, the video data is determined to meet the heat condition.

[0084] In an embodiment of the present application, the access frequency threshold is a preset value used to determine whether the access frequency of video data has reached a certain level of popularity. If the access frequency of video data exceeds this threshold, it is considered that the video data meets the popularity condition. The access frequency change rate refers to the percentage change in the access frequency of video data over a period of time relative to the previous time period. It reflects the growth rate or downward trend of the video popularity. The change rate threshold is a preset percentage value used to determine whether the access frequency change rate of video data is significant. If the access frequency change rate exceeds this change rate threshold, it is considered that the popularity of the video data has changed significantly and the video data meets the popularity condition.

[0085] In the embodiment of the present application, when judging based on an access frequency threshold, the access frequency of the video data within a specific time period can be obtained. This access frequency is then compared with a preset range frequency threshold. If the access frequency is greater than the range frequency threshold, the video data is determined to meet the popularity condition.

[0086] In some embodiments, when determining based on a rate of change threshold, the access frequency change rate of the video data over two consecutive time periods can be calculated. This change rate is then compared with a preset rate of change threshold. If the access frequency change rate exceeds the rate of change threshold, the video data is determined to meet the popularity condition.

[0087] In the embodiment of the present application, you can choose to use the judgment based on the access frequency threshold or the judgment based on the access frequency change rate, or use both as the judgment basis according to specific needs and business logic.

[0088] The method provided in the embodiment of the present application can accurately determine whether the video data meets the heat condition.

[0089] In some embodiments, after step S4, the method further includes:

[0090] Step S5: When storing the transcoded video data, the temporarily stored video fragment data of the video data is deleted.

[0091] In the embodiments of the present application, after the transcoded video data is successfully stored in the persistent storage medium, the temporarily stored video fragment data is no longer needed. Therefore, to save storage space and improve storage efficiency, the video fragment data is deleted from the temporary storage medium. The deletion operation can be implemented programmatically, for example, using a script or an API to call the storage system's delete function.

[0092] The method provided in the embodiment of the present application can optimize the utilization of storage resources, reduce unnecessary storage space usage, and lower storage costs by saving the transcoded video data to a persistent storage medium and deleting the temporarily stored video fragment data.

[0093] In some embodiments, the method further comprises:

[0094] Step S6: Eliminate the temporarily stored video segment data based on a least recently used algorithm.

[0095] In the embodiments of the present application, the Least Recently Used (LRU) algorithm is a cache eviction strategy used to determine which data should be removed when the cache is full to make room for new data. The core idea of the LRU algorithm is that if a piece of data has been accessed recently, it is more likely to be accessed in the future; conversely, if a piece of data has been accessed least recently, it is least likely to be accessed in the future and should be eliminated first.

[0096] In the embodiment of the present application, the LRU algorithm is usually implemented by a special data structure, such as a combination of a two-way linked list and a hash table. The two-way linked list is used to maintain the access order of data, wherein the header represents the data most recently accessed, and the tail represents the data that has not been accessed for the longest time. The hash table is used to quickly locate the position of the data in the linked list, so that the linked list structure can be quickly updated when accessing or eliminating data. When the capacity of the temporary storage reaches the upper limit, it is necessary to eliminate the video fragment data according to the principle of the LRU algorithm. First, the hash table is checked to find the video fragment data that has not been accessed for the longest time (i.e., the data at the tail of the linked list). Then, the data is removed from the linked list, and the hash table is updated to reflect this change. Finally, the storage space occupied by the video fragment data is released to make room for new video fragment data.

[0097] The method provided in the embodiments of the present application, by using a LRU algorithm, ensures that the most recently accessed video slice data is always retained, while the least recently accessed data is eliminated, helping to optimize the utilization of storage resources and improve the efficiency and reliability of video processing. Furthermore, the LRU algorithm can reduce unnecessary disk I / O operations, thereby reducing overall load and response time.

[0098] In some embodiments, before step S101, the method further includes:

[0099] Step S11, when an access request for the video data sent by the player is obtained, determining whether the popularity of the video data meets a popularity condition or whether the format of the video data meets a format requirement;

[0100] In the embodiments of this application, a player is a tool used by users to request and view video content. An access request is a request sent by the player to a video server to obtain video data. This request typically includes the identification information of the video data and the parameters required by the user to play the video (such as format, resolution, etc.).

[0101] In the embodiment of the present application, when a player sends a request to access video data, the video server first receives and parses the request. The video server examines the video data identification information contained in the request and the parameters required for the user to play the video. The video server then determines whether the video data can be directly provided to the player based on whether the popularity of the video data meets the popularity conditions or the format of the video data meets the format requirements.

[0102] In an embodiment of the present application, whether the popularity meets the popularity 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, it is considered that the popularity of the video data meets the popularity condition, and if the access frequency is less than or equal to the preset threshold, it is considered that the popularity of the video data does not meet the popularity condition. The preset duration can be configured. For example, the preset duration can be configured to 24 hours. The preset threshold can be configured. For example, the preset threshold can be configured to 100 times. The frequency of each video being clicked and played by the user can be continuously detected to obtain the access frequency of the video data. For example, if a video is viewed less than 100 times within 24 hours, the video does not meet the popularity condition, and the video data is non-hot video data. Non-hot video data can also be considered as unpopular data. If a video is viewed more than 100 times within 24 hours, the video data is considered to meet the popularity condition.

[0103] In an embodiment of the present application, whether the format of the video data meets the format requirements can be determined by the usage frequency of the format of the video data and a preset usage frequency threshold. The preset usage frequency threshold can be configured. For example, it can be configured to 1%. The encoding parameters of all videos can be counted, and the proportion of video data corresponding to the encoding parameters can be determined to obtain the usage frequency. For example, videos encoded using H.266 only account for 0.1% of the entire platform, which is lower than the set 1% threshold. In this case, the video data is considered to be video data of non-mainstream specifications.

[0104] Step S12, when the popularity of the video data meets the popularity condition or the format of the video data meets the format requirement, determines the transcoded video data corresponding to the video data from the stored transcoded video data, and returns the transcoded video data corresponding to the video data to the player.

[0105] In an embodiment of the present application, if the popularity of the video data meets the popularity condition or the format of the video data meets the format requirement (i.e., the number of access requests is large or the frequency of use is high), the video server needs to determine the transcoded video data corresponding to the video data from the stored transcoded video data. The storage medium can be searched for transcoded video data that matches the video data and loaded into the memory for transmission to the player. When the video server obtains the transcoded video data that matches the video data, it will send the transcoded video data to the player. The player will then decode and play this video data for the user to watch.

[0106] The method provided in the embodiment of the present application determines whether the popularity of the video data meets the popularity condition or the format of the video data meets the format requirement. If the popularity of the video data meets the popularity condition or the format of the video data meets the format requirement, the method determines the transcoded video data corresponding to the video data from the stored transcoded video data and returns the transcoded video data corresponding to the video data to the player, thereby ensuring that users can smoothly watch highly visited or highly demanded video content. This helps to improve the availability and user experience of video services, while optimizing the utilization of storage and transmission resources and reducing server load and response time.

[0107] In some embodiments, after step S11, the method may further include:

[0108] Step S13: When the popularity of the video data does not meet the popularity condition or the format of the video data does not meet the format requirement, it is determined whether video fragment data of the video data is temporarily stored.

[0109] Step S14: in the case where the video fragment data of the video data is temporarily stored, the temporarily stored video fragment data is returned to the player.

[0110] In this embodiment of the present application, if the video fragments of the requested video data are temporarily stored, these fragments can be directly returned to the player. These fragments have been previously requested, transcoded, and temporarily stored for fast access. After the player receives the fragments, it can decode and play them as needed.

[0111] Step S15: In the case where no video fragment data of the video data is temporarily stored, the video data is transcoded in real time, and the video fragment data of the video data generated by transcoding is returned to the player.

[0112] In the embodiment of the present application, if the video segment data of the requested video data is not available in the temporary storage, the original video data needs to be transcoded in real time, and steps 101 to S102 are executed.

[0113] The method provided in the embodiment of the present application completes the transcoding of mainstream resolution and bit rate specifications for popular video resources in advance, and relies on real-time transcoding to provide temporary video data for non-mainstream specifications and non-popular video resources. After the temporary video data meets the popularity condition, the video file generated by merging the fragmented video data can replace the conventional transcoded file, and there is no need to repeatedly transcode the original resource. It can greatly reduce the difficulty of peer-to-peer (P2P) distribution of fragmented videos. After the complete video file is generated, the existing P2P system can be directly used without the need for additional modification.

[0114] Based on the above embodiments, the present invention further provides a method for processing video data. Figure 2 A schematic diagram of the implementation flow of another method for processing video data provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, including:

[0115] Step S201: Obtain a video playback request from a player.

[0116] Step S202: The video server determines whether there is segment data of the video.

[0117] In the embodiment of the present application, if it does not exist, step S203 is executed; if it exists, step S204 is executed.

[0118] Step S203: perform real-time segment transcoding on the video.

[0119] After step S203, execute step S205.

[0120] Step S204: Return the fragmented data to the player.

[0121] Step S205: store the fragmented data.

[0122] In the embodiment of the present application, the temporary video segment data generated by real-time transcoding is temporarily stored in the local SSD. After step S205, steps S204 and S206 are executed.

[0123] Step S206: Maintain the popularity information of the video.

[0124] In an embodiment of the present application, video segment consumption data can be collected, using information such as the original video file ID, target video resolution, and bit rate as indexes to construct user access frequency data by time period, such as day, hour, and minute, to observe resource access frequency and access frequency changes. When the access frequency or frequency change exceeds a configured threshold, i.e., when the popularity condition is met, the index is recorded in the queue to be merged. Based on the popularity distribution statistics of the VOD system resources, frequency thresholds are configured for different time period dimensions.

[0125] Step S207: determine whether the heat meets the heat condition.

[0126] In the embodiment of the present application, if yes, execute step S208; if no, continue to execute step S206.

[0127] In an embodiment of the present application, if the number of access users within a time period exceeds the threshold, or the access frequency within the period predicted by the moving weighted exponential average method (EWMA) exceeds the threshold, it is determined that the heat condition is met.

[0128] Step S208: Determine whether all the fragmented data have been transcoded.

[0129] In the embodiment of the present application, if yes, execute step S210, if no, end.

[0130] Step S209: merge all fragments.

[0131] Step S210: storing the merged transcoded video data in an object storage service.

[0132] In this embodiment of the present application, when a resource meets the merging conditions, all fragmented data of the resource on the SSD are merged, the complete video file is stored in the object storage system, and the local SSD is freed up. Fragmented data that does not meet the merging conditions is eliminated according to the LRU algorithm.

[0133] The method provided in the embodiments of this application combines and reuses the fragmented data generated by real-time transcoding based on the real-time access status of resources, selecting high-value fragments of video data to generate complete transcoded video data. The video file generated by merging the fragmented video data can replace the conventional transcoded file, eliminating the need to repeatedly transcode the original resource.

[0134] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0135] According to the aforementioned embodiments, the embodiments of the present application provide a video data processing device, and the modules included in the device, as well as the units included in each module, can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0136] The present invention provides a video data processing device. Figure 3 A schematic diagram of the structure of a video data processing device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the video data processing device 300 includes:

[0137] An acquisition module 301 is used to acquire access popularity information of the video data being transcoded in real time;

[0138] The first storage module 302 is used to store the transcoded video data after transcoding is completed when it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, so that the video server can return the transcoded video data when receiving a playback request for the video data.

[0139] In some embodiments, the video data processing apparatus 300 further includes:

[0140] A video segment data acquisition module is used to perform real-time transcoding on the video data to obtain video segment data;

[0141] A second storage module is used to temporarily store the video segment data;

[0142] A first determining module is configured to determine that transcoding of the video data is completed when it is determined that all video fragment data of the video data are temporarily stored;

[0143] Before storing the transcoded video data, the video data processing device 300 further includes:

[0144] The merging module is used to merge all the video fragment data to obtain the transcoded video data after transcoding.

[0145] In some embodiments, the video data processing apparatus 300 further includes:

[0146] The elimination module is used to eliminate temporarily stored video segment data based on a least recently used algorithm.

[0147] In some embodiments, the video data processing apparatus 300 further includes:

[0148] A second determination module is configured to, upon receiving an access request for video data sent by a player, determine whether the popularity of the video data satisfies a popularity condition or whether the format of the video data satisfies a format requirement;

[0149] The first return module is used to determine the transcoded video data corresponding to the video data from the stored transcoded video data when the popularity of the video data meets the popularity condition or the format of the video data meets the format requirement, and return the transcoded video data corresponding to the video data to the player.

[0150] In some embodiments, the video data processing apparatus 300 further includes:

[0151] a third determining module, configured to determine whether video fragment data of the video data is temporarily stored if the popularity of the video data does not meet the popularity condition or the format of the video data does not meet the format requirement;

[0152] a second returning module, configured to return the temporarily stored video fragment data of the video data to the player when the video fragment data of the video data is temporarily stored;

[0153] A transcoding module is implemented to perform real-time transcoding on the video data when no video fragment data of the video data is temporarily stored, and return the video fragment data of the video data generated by the real-time transcoding to the player.

[0154] In some embodiments, the access popularity information includes: access frequency, and the acquisition module is used to:

[0155] The access frequency of the video data within a preset time period is determined by using a moving weighted exponential average method, or the access frequency of the video data within a preset time period is recorded.

[0156] In some embodiments, when the access frequency is greater than an access frequency threshold, the video data is determined to meet the heat condition, or when the access frequency change rate exceeds a change rate threshold based on the access frequency, the video data is determined to meet the heat condition.

[0157] in addition, Figure 3The video data processing device shown can be a software unit, a hardware unit, or a combination of software and hardware units built into an existing electronic device, or can be integrated into the electronic device as an independent accessory, or can exist as an independent terminal device.

[0158] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0159] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0160] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 4 As shown, the electronic device of this embodiment may include: at least one processor 30 ( Figure 4 Only one processor 30 is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on at least one processor 30. When the processor 30 executes the computer program 32, the steps of any of the above-mentioned method embodiments are implemented, or when the processor 30 executes the computer program 32, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0161] For example, the computer program 32 may be divided into one or more modules / units, one or more of which are stored in the memory 31 and executed by the processor 30 to implement the present application. The one or more modules / units may be a series of computer program 32 instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the electronic device.

[0162] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program 32. When the computer program 32 is executed by the processor 30, the steps in the above-mentioned method embodiments can be implemented.

[0163] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0164] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program 32. The computer program 32 can be stored in a computer-readable storage medium. When the computer program 32 is executed by the processor 30, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program 32 includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the terminal, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.

[0165] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0166] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0167] In the embodiments provided in this application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0168] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0169] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

[0170] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, and based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0171] The personal information processed by the Applicant will vary depending on the specific product / service scenario and will be based on the specific scenario in which the user uses the product / service. This may involve the user's account information, device information, driving information, vehicle information, or other related information. The Applicant will treat the user's personal information and its processing with a high degree of diligence.

[0172] The Applicant attaches great importance to the security of user personal information and has taken reasonable and feasible security measures that comply with industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

Claims

1. A method for processing video data, characterized in that: include: Obtain access popularity information of video data being transcoded in real time; When it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, the transcoded video data that has been transcoded is stored so that the video server returns the transcoded video data when a playback request for the video data is obtained.

2. The method according to claim 1, characterized in that The method further comprises: Performing real-time transcoding on the video data to obtain video fragment data; Temporarily storing the video segment data; In a case where it is determined that all video fragment data of the video data are temporarily stored, determining that transcoding of the video data is completed; Before storing the transcoded video data, the method further includes: All video fragment data are merged to obtain the transcoded video data after transcoding.

3. The method according to claim 2, characterized in that The method further comprises: The temporarily stored video segment data is eliminated based on the least recently used algorithm.

4. The method according to claim 1, wherein The method further comprises: In the case of obtaining an access request for video data sent by a player, determining whether the popularity of the video data meets a popularity condition or whether the format of the video data meets a format requirement; When the popularity of the video data meets the popularity 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.

5. The method according to claim 4, characterized in that The method further comprises: If the popularity of the video data does not meet the popularity condition or the format of the video data does not meet the format requirement, determining whether video fragment data of the video data is temporarily stored; In a case where the video segment data of the video data is temporarily stored, returning the temporarily stored video segment data of the video data to the player; In the case where no video fragment data of the video data is temporarily stored, the video data is transcoded in real time, and the video fragment data of the video data generated by the real-time transcoding is returned to the player.

6. The method according to claim 1, characterized in that The access popularity information includes: access frequency, and obtaining the access popularity information of the real-time transcoded video data includes: The access frequency of the video data within a preset time period is determined by using a moving weighted exponential average method, or the access frequency of the video data within a preset time period is recorded.

7. The method according to claim 6, characterized in that When the access frequency is greater than the access frequency threshold, it is determined that the video data meets the heat condition; or, when the access frequency change rate determined based on the access frequency exceeds the change rate threshold, it is determined that the video data meets the heat condition.

8. A video data processing device, characterized in that: include: An acquisition module is used to obtain access popularity information of the video data being transcoded in real time; The first storage module is used to store the transcoded video data after transcoding is completed when it is determined that the video data has been transcoded and the video data meets the heat condition based on the access heat information, so that the video server can return the transcoded video data when obtaining a playback request for the video data.

9. An electronic device, characterized in that: include: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.