Video cover generation method and device

By obtaining the historical memory status of the service node and predicting future memory usage values, selecting the appropriate service node to generate a video cover, solving the problem of cover generation failure caused by tight large-sized videos or memory resources in the existing technology, and achieving efficient and stable videos Cover generation.

CN119135980AActive Publication Date: 2024-12-13CHINA TELECOM CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411392203.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-13
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Existing CPU-based video cover generation methods In the case of large-sized videos or memory resources, the video cover generation failure rate is high, and it cannot essentially solve the problem of cover extraction failure caused by server memory tightness or excessive videos.

Method used

By obtaining the historical memory status set of multiple service nodes, using the compensation weighted average method to analyze and predict future memory usage values, determine the target difference and memory available values, and select the appropriate service node to generate a video cover to ensure that it does not affect the system operation. Efficiently generate video covers.

Benefits of technology

It effectively reduces the failure rate of video cover generation, improves the efficiency of cover generation of large-scale videos, and ensures the stable operation of the system when memory resources are tight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135980A_ABST
    Figure CN119135980A_ABST
Patent Text Reader

Abstract

The invention discloses a video cover generation method and device. Comprising the following steps: acquiring a plurality of memory state sets of a plurality of service nodes in a plurality of first historical time periods, an actual memory use value of each service node at the current time and a second memory use value of a to-be-processed video; for each service node, analyzing a plurality of memory state sets of the service node by using a compensation weighted average method to obtain a predicted memory use value of the service node in future time, and determining a first difference value between the predicted memory use value and a memory upper limit value and a second difference value between the memory upper limit value and an actual memory use value; determining a target difference value smaller than a preset difference value threshold value from the first difference values and the second difference values of the plurality of service nodes; and according to the target difference value and the second memory usage value, determining to generate a cover picture of the to-be-processed video according to the target video cover generation mode. According to the method and the device, the technical problem that the failure rate of video cover generation is relatively high under the condition of large-volume videos or shortage of memory resources in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to a method and device for generating a video cover. Background Art

[0002] Video plays a vital role in today's multimedia content distribution, and the video cover plays a vital role in attracting viewers, increasing video click-through rate, and shaping brand image. At present, there are two methods for generating video cover: based on CPU (Central Processing Unit) and GPU (Graphics Processing Unit). Among them, CPU processing is the most commonly used method for extracting frames in daily business systems. The CPU-based video cover generation method is that after the user uploads the video to the application system, the system backend server uses ffmpeg and other third-party components to automatically generate the cover. However, for large videos with a volume of at least several hundred MB, the video cover generation generally takes tens of seconds or even minutes, and the process of extracting the cover using ffmpeg and other third-party components requires decoding the original video, generating pictures, etc., which will make the actual memory occupied by the video cover greater than the size of the video itself.

[0003] In response to the above problems, existing patents or papers related to CPU-based video cover generation have studied how to improve generation efficiency and how to reduce resource consumption of service nodes. However, most of these methods rely on auxiliary storage space and increase frame extraction intervals to improve cover generation efficiency or reduce dependence on service nodes, and rarely consider the memory usage of service nodes. Therefore, they cannot fundamentally solve the problem of memory shortage at service nodes or video being too large, resulting in failure in video cover extraction.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a method and device for generating a video cover, so as to at least solve the technical problem in the related art that the failure rate of video cover generation is high in the case of large-volume videos or tight memory resources.

[0006] According to one aspect of an embodiment of the present application, a video cover generation method is provided, comprising: obtaining multiple memory status sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each of the multiple service nodes at the current time and a second memory usage value of a video to be processed, wherein the memory status set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed; for each service node, using a compensated weighted average method to analyze the multiple memory status sets of the service node to obtain a predicted memory usage value of the service node in the future, and determining a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value; determining a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the multiple service nodes; and determining, based on the target difference value and the second memory usage value, to generate a cover image for the video to be processed in accordance with a target video cover generation method.

[0007] Optionally, multiple memory status sets of multiple service nodes in multiple first historical time periods are obtained, including: for each service node, calling a preset monitoring tool to obtain multiple first memory usage values ​​corresponding to multiple historical times of the service node in the first historical time period, forming a memory status set from the multiple first memory usage values, and storing the memory status set in a preset database.

[0008] Optionally, before using the compensated weighted average method to analyze multiple memory status sets of the service node, the method also includes: dividing the memory status set of the service node in each first historical time period into multiple subsets, and determining the first median value of multiple first memory usage values ​​in each subset; determining the average memory occupancy value of the service node in the second historical time period based on the first median value of each subset of the service node in each first historical time period, wherein the second historical time period includes multiple first historical time periods; judging in order from near to far whether the average memory occupancy value of the service node in each second historical time period is less than a preset memory occupancy threshold; when the average memory occupancy value of the service node in the second historical time period is less than the memory occupancy threshold, the memory status set corresponding to each first historical time period in the second historical time period is used as the memory status set to be analyzed.

[0009] Optionally, the process of determining the memory occupancy threshold includes: sorting the average memory occupancy of the service nodes in multiple second historical time periods, and determining the second median value in the sorting results; calculating the product of the second median value and a preset equivalent ratio, and using the obtained product result as the memory occupancy threshold.

[0010] Optionally, a compensated weighted average method is used to analyze multiple memory state sets of a service node to obtain a predicted memory usage value of the service node in the future, including: using the weighted average method to calculate the product of the average memory occupancy value of each first historical time period in the memory state set to be analyzed and a preset weight value to obtain a first weighted average predicted value, wherein the smaller the time interval between the first historical time period corresponding to the average memory occupancy value and the current time is, the larger the corresponding weight value is, and the larger the time interval between the first historical time period corresponding to the average memory occupancy value and the current time is, the smaller the corresponding weight value is; determining at least one first historical time period whose time interval with the current time is less than a preset time interval threshold and a second weighted average predicted value of the service node in at least one first historical time period, and calculating the average value of the difference between the average memory occupancy value of each first historical time period and the second weighted average predicted value, and using the average value as the compensation factor of the service node; determining the predicted memory usage value of the service node in the future based on the first weighted average predicted value and the compensation factor.

[0011] Optionally, determining to generate a cover image for the video to be processed in accordance with a target video cover generation method based on a target difference and a second memory usage value includes: calculating a quotient of the target difference and a preset redundancy coefficient, and determining whether the second memory usage value is less than the quotient value; when the second memory usage value is less than the quotient value, determining to directly execute a cover generation task for the video to be processed on a target service node whose memory available value is not less than the target difference value, to obtain a cover image for the video to be processed; when the second memory usage value is not less than the quotient value, intercepting the video to be processed to obtain a corresponding video stream, and executing a cover generation task for the video stream on a target service node whose memory available value is not less than the target difference value, to obtain a cover image for the video to be processed.

[0012] Optionally, the video to be processed is intercepted to obtain a corresponding video stream, including: determining a start frame and an end frame whose size of the video stream in the video to be processed is a third memory usage value, and intercepting the video stream between the start frame and the end frame, wherein the third memory usage value is not greater than the quotient value.

[0013] According to another aspect of an embodiment of the present application, a video cover generation device is also provided, including: an acquisition module, used to obtain multiple memory state sets of multiple service nodes in multiple first historical time periods, as well as the actual memory usage value of each service node in the multiple service nodes at the current time and the second memory usage value of the video to be processed, wherein the memory state set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed; a first determination module, used to analyze the memory state set of the service node for each service node using a compensated weighted average method to obtain a predicted memory usage value of the service node in the future, and determine a first difference between the predicted memory usage value and the memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and the actual memory usage value; a second determination module, used to determine a target difference value less than a preset difference threshold from the first difference and the second difference of each service node in the multiple service nodes; an execution module, used to determine, according to the target difference and the second memory usage value, to generate a cover image for the video to be processed in accordance with a target video cover generation method.

[0014] According to another aspect of an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned video cover generation method by running the computer program.

[0015] According to another aspect of an embodiment of the present application, a computer program product is also provided, which includes a stored computer program, wherein the computer program implements the above-mentioned video cover generation method when executed by a processor.

[0016] In an embodiment of the present application, first, a compensated weighted average method is used to analyze multiple memory status sets of each service node in multiple first historical time periods to obtain predicted memory usage values ​​of the service nodes, thereby achieving accurate prediction of the memory usage of the service nodes; then, based on the predicted memory usage values ​​and actual memory usage values ​​of each service node, a set of allocatable memory values ​​is calculated, and then the minimum value in the set is taken as the allocatable memory value for the video cover generation task; finally, according to the allocatable memory value and the video volume size of the video to be processed, a corresponding video cover generation method is selected to generate a video cover image, so as to ensure efficient generation of video covers without affecting system operation, thereby solving the technical problem of high failure rate of video cover generation in related technologies in the case of large-volume videos or tight memory resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1a It is a flowchart of a method for generating a video cover according to the related art;

[0019] Figure 1b is a flowchart of another method for generating a video cover according to the related art;

[0020] Figure 2 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating a video cover according to an embodiment of the present application;

[0021] Figure 3 is a flowchart of an optional method for generating a video cover according to an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of an optional memory data acquisition according to an embodiment of the present application;

[0023] Figure 5 is a structural schematic diagram of an optional video cover generation device according to an embodiment of the present application;

[0024] Figure 6 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] In addition, the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set up between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0028] Example 1

[0029] Video plays a vital role in today's multimedia content distribution, and the video cover plays a vital role in attracting viewers, increasing video click-through rates, and shaping brand image. Currently, video cover generation is based on two methods: CPU (Central Processing Unit) and GPU (Graphics Processing Unit). Although GPU has better performance, it requires independent servers or hardware resources, which is costly and is generally used in massive video frame extraction scenarios; while the CPU processing method, although its performance is not as good as GPU, only relies on server resources and does not require dedicated independent servers or hardware resources. It is the most commonly used method for daily business systems to extract frames.

[0030] Specifically, the common workflow for CPU-based video cover generation is: Figure 1a and Figure 1bThe flowchart shown in the figure is that the user uploads the video to the browser, and the browser streams the video to the application server for cover extraction. However, for large videos with a volume of at least several hundred MB, this method takes tens of seconds or even minutes to generate the video cover, and the process of extracting the cover using third-party software such as ffmpeg requires decoding the original video and generating images, which will make the server memory actually occupied by the video cover possibly the size of the video itself. Therefore, the following problems may occur:

[0031] (1) The size of the video transmitted from the browser to the application system is greater than or equal to the available memory of the system, causing the application system to malfunction and resulting in the failure of video cover generation;

[0032] (2) The size of the video stream transmitted from the browser to the application system is smaller than the system's available memory. Once the size of the video stream approaches the critical value of the system's available memory, normal business may be affected, causing production accidents.

[0033] (3) During the video cover generation process (the large-volume video production process can reach minutes), the system memory consumption increases sharply due to the execution of scheduled tasks or other tasks. The total memory usage of the two tasks exceeds the system available memory, resulting in cover generation failure or other business anomalies.

[0034] In response to the above problems, the relevant patents or papers on CPU-based video cover generation have studied how to improve generation efficiency and how to reduce server resource consumption. For example, patent CN117097923A discloses a video cover generation method, device, electronic device and storage medium. It extracts video cover by using partial video frames from the perspective of reducing the computing and storage resources of the server. However, the server resource preset value in this method is a static value and cannot be dynamically adjusted according to videos of different sizes and the first operation status of the server, which will reduce memory usage and video cover extraction efficiency. In addition, this method does not lock the memory in advance, and the memory resources may be occupied by other services during the video frame extraction process, resulting in frame extraction failure. Patent CN116781972A discloses a video cover method, device, electronic device and medium. It increases the time interval between the two extracted video frames and reduces the video frames extracted from the video file to better capture the key frames of the video file, thereby improving the quality of the video frame and improving the efficiency of video processing. However, it cannot solve the problem of video cover extraction failure due to tight server memory or too large video.

[0035] In other words, most of the related CPU-based video cover generation methods rely on auxiliary storage space and increase the frame extraction interval to improve the efficiency of cover generation or reduce dependence on server resources, and rarely consider the usage of server memory. Therefore, they cannot fundamentally solve the problem of video cover extraction failure due to tight server memory or too large video.

[0036] In order to solve this problem, an embodiment of the present application provides a method embodiment of a video cover generation method, which is described in detail below. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0037] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 2 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating a video cover is shown. As shown in FIG1 , a computer terminal 20 (or mobile device 20) may include one or more (shown in the figure as 202a, 202b, ..., 202n) processors 202 (the processor 202 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 204 for storing data, and a transmission device 206 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply and / or a camera. A person of ordinary skill in the art will appreciate that Figure 2 The structure shown is for illustration only and does not limit the structure of the electronic device. For example, the computer terminal 20 may include more or fewer components than those shown in FIG. 1 , or may have the same Figure 2 Different configurations are shown.

[0038] It should be noted that the one or more processors 202 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 20 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0039] The memory 204 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the video cover generation method in the embodiment of the present application. The processor 202 executes various functional applications and data processing by running the software programs and modules stored in the memory 204, that is, the video cover generation method of the above-mentioned application is realized. The memory 204 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 204 may further include a memory remotely arranged relative to the processor 202, and these remote memories may be connected to the computer terminal 20 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0040] The transmission device 206 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 20. In one example, the transmission device 206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 206 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0041] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 20 (or mobile device).

[0042] In the above operating environment, Figure 3 is a flow chart of an optional method for generating a video cover according to an embodiment of the present application, such as Figure 3 As shown, the method at least includes steps S302-S308, wherein:

[0043] Step S302, obtaining a plurality of memory state sets of the plurality of service nodes in a plurality of first historical time periods, as well as an actual memory usage value of each of the plurality of service nodes at a current time and a second memory usage value of the video to be processed.

[0044] In the technical solution provided in step S302, the above-mentioned multiple service nodes are multiple containerized service nodes in the application system. The memory state set of each service node in the first historical time period includes multiple first memory usage values ​​of the service node in the first historical time period, wherein, when the first historical time period is one hour, the multiple first memory usage values ​​in the first historical time period can be the first memory usage values ​​collected every minute within one hour. In addition, the above-mentioned current time is the upload time of the video to be processed, which can also be understood as the start time of the execution of the video cover task. The second memory usage value can be understood as the volume size of the video to be processed itself.

[0045] Step S304, for each service node, use the compensated weighted average method to analyze the memory status set of the service node to obtain the predicted memory usage value of the service node in the future, and determine the first difference between the predicted memory usage value and the memory upper limit value of the service node and the second difference between the memory upper limit value of the service node and the actual memory usage value.

[0046] In the technical solution provided in step S304, the above-mentioned supplementary weighted average algorithm adds a compensation factor on the basis of the existing weighted average algorithm to improve the accuracy of the calculation result. Therefore, for each service node, the memory state set obtained in step S302 can be analyzed using the compensated weighted average method to obtain the predicted memory usage value of the service node at a future time, where the future time is the sampling point closest to the current time. Then, determine the first difference between the predicted memory usage value and the memory upper limit value of the service node and the second difference between the memory upper limit value of the service node and the actual memory usage value.

[0047] Step S306: Determine a target difference value that is smaller than a preset difference threshold value from the multiple first differences and the multiple second differences of the multiple service nodes.

[0048] In the technical solution provided in step S306, the above target difference is the memory available value allocated by the application system to the cover generation task of the video to be processed.

[0049] Step S308, determining, based on the target difference value and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0050] In the technical solution provided in step S308, by judging the relationship between the second memory usage value of the video to be processed and the memory available value (i.e., the target difference) allocated by the application system to the cover generation task of the video to be processed, it is judged whether the video to be processed can directly execute the cover generation task of the video to be processed on the target service node (which can be one of multiple service nodes) whose memory available space meets the target difference.

[0051] The above method of this embodiment is further introduced below.

[0052] As an optional implementation, in the technical solution provided in the above step S302, for each service node, corresponding multiple memory status sets can be obtained according to the following method, including: calling a preset monitoring tool to obtain multiple first memory usage values ​​corresponding to multiple historical times of the service node within a first historical time period, forming a memory status set from the multiple first memory usage values, and storing the memory status set in a preset database.

[0053] In this embodiment, considering that the memory usage of the application system will periodically show similar patterns, but the memory usage at each moment will fluctuate, in order to better capture this dynamic change, the embodiment of the present application can set the first historical time period to one hour, and the historical time (i.e., the data collection interval) to whole minutes. Usually, the first time can be set to an integer value that can be divided by the first historical period, such as 1 minute or other values ​​that can be divided by 60, to ensure that the acquired memory usage data can more accurately reflect the overall change pattern.

[0054] In addition, the above-mentioned monitoring tool can be Prometheus. Prometheus, as an open source monitoring and alert system, is designed for cloud-native environments and is very suitable for recording and querying digital time series data, especially in microservice architectures and containerized environments.

[0055] For example, Figure 4 Taking the memory data collection device of the application system shown as an example, two containerized service nodes are deployed in the application system, namely container 1 and container 2. The collection service agent collects multiple first memory usage values ​​of container 1 and container 2 in the application system in the past 29 days at a data collection interval of 1 minute through http request monitoring platform Prometheus, where the memory collection data of each container for 1 day is 1440 (60*60*24), and the collected data is stored in the Mysql library.

[0056] As an optional implementation, in the technical solution provided in the above step S304, since the memory usage value of the service node at the same time every day is volatile, each service node may have abnormal data in multiple memory state sets of multiple first historical time periods. In order to improve the accuracy of subsequent prediction of the memory usage value of the service node in the future time using multiple memory state sets of multiple first historical time periods, the embodiment of the present application can pre-process the multiple memory state sets collected for each service node according to the following method before prediction, including:

[0057] Step 1: Divide the memory state set of the service node in each first historical time period into multiple subsets, and determine a first median value of multiple first memory usage values ​​in each subset;

[0058] Step 2: determining the average memory usage of the service node in the second historical time period according to the first median value of each subset of the service node in each first historical time period, wherein the second historical time period includes multiple first historical time periods;

[0059] Step 3: In order of time from recent to far, determine whether the average memory usage of the service node in each second historical time period is less than a preset memory usage threshold;

[0060] Step 4: When the average memory occupancy of the service node in the second historical time period is less than the memory occupancy threshold, the memory state sets corresponding to the first historical time periods in the second historical time period are used as the memory state sets to be analyzed.

[0061] In the above embodiment, the multiple memory state sets of the above service node in multiple first historical time periods can be multiple memory state sets of the service node in multiple first historical time periods within 2n+1 days before the current time. Assuming that the historical time (i.e., the data collection interval) is 1 minute, the first historical time period is 1 hour, and the second historical time period is 1 day, then the multiple memory state sets of multiple first historical time periods within 2n+1 days contain a total of (2n+1)*60*60*24 data. Therefore, the above methods from the first step to the fourth step can be understood as:

[0062] First, the memory state set (including 60 memory data) of the service node in each hour is divided into m subsets, where m can be a positive integer divisible by 60, such as 12. The 5 first memory usage values ​​in each subset are sorted in order, and the median of the sorting results (i.e., the first median value) is taken as the sampling value of each subset, and the historical time corresponding to each sampling value is the sampling time point T. Therefore, the first median value of each subset of the service node in each first historical time period can be recorded as shown in Table 1 below.

[0063] Table 1

[0064] Sampling days Sampling time point Sampling value (MB) 1 <![CDATA[T1]]> <![CDATA[K 11 ]]> 1 <![CDATA[T2]]> <![CDATA[K 12 ]]> … … … 1 <![CDATA[T m ]]> <![CDATA[K 1m ]]> 2 <![CDATA[T1]]> <![CDATA[K 21 ]]> … … … 2n+1 <![CDATA[T m ]]> <![CDATA[K (2n:1)*m ]]>

[0065] Next, representative n-day data can be selected from the 2n+1-day data according to the following rules: determine the average memory usage of the service node every day based on the first median value of each subset of the service node in each hour. It should be noted that in order to ensure the accuracy of the calculation results, the first median values ​​of each subset of the service node in each hour (i.e., the first historical time period) can also be sorted in sequence, and then the middle section of data is taken to calculate the algorithm average value of this section of data as the average memory usage L of the service node every day, that is:

[0066]

[0067] Among them, K j represents the jth first median value in the intercepted data range, and p represents the intercepted data range, which is configurable and can usually be taken as the rounded value of one-third of the number of first median values ​​in the second time period. For example, if there are 12 first median data per hour, then there are 288 first median data per day. According to the sorting results from small to large, these first median data can be recorded as K1, K2, ..., K 288 , then p=288 / 3=96, therefore,

[0068]

[0069] Then, according to the time sequence from recent to far, the average memory usage of 2n+1 days is determined in turn: L1, L2, ..., L 2n:1 Is it less than the preset memory usage threshold? L1 represents the second time period closest to the current time, L 2n:1 Indicates the second time period farthest from the current time.

[0070] Optionally, the above-mentioned memory occupancy threshold can be determined according to the following method: sorting the average memory occupancy of the service nodes in multiple second historical time periods, and determining the second median value in the sorting results; calculating the product of the second median value and a preset equivalent ratio, and using the obtained product result as the memory occupancy threshold.

[0071] That is, L1,…,L 2n:1 The average memory usage of the first and second historical time periods is sorted, and the second median value U in the sorting result is taken. Then, the product of the second median value U and the preset equivalent ratio S is calculated, and the obtained product result is the memory usage threshold. Among them, S can usually be reduced to 1.5. The setting of S in this application is only used as an example for explanation, and it can be set according to the actual application scenario.

[0072] If the average memory usage of a certain day is less than the preset memory usage threshold, the memory state set corresponding to each hour of that day is added to the memory state set to be analyzed until the number of days included in the memory state set to be analyzed is n, so as to obtain the memory state set to be analyzed (i.e., the predicted data set) as shown in Table 2 below.

[0073] Table 2

[0074]

[0075]

[0076] For example, if Figure 4 As shown, container 1 collects 41,760 pieces of memory data in 29 days, and container 2 collects 83,520 pieces of memory data in 29 days. In order to ensure the accuracy of subsequent prediction of memory usage values ​​of container 1 and container 2 in the future, the collected memory data can be preprocessed according to the above preprocessing method to obtain the memory state set to be analyzed corresponding to container 1 and the memory state set to be analyzed corresponding to container 2, respectively.

[0077] For the convenience of subsequent calculations, only three time points with relatively typical system memory usage and their adjacent time points, namely, 12:00, 18:00, and 19:00 and their adjacent time points, are taken to obtain the memory state set to be analyzed corresponding to container 1 as shown in Table 3 and the memory state set to be analyzed corresponding to container 2 as shown in Table 4. The collection dates are sorted from recent to far, including memory data of the current day and the most recent 16 days, where the first day is the closest day to the current day, and then the days are sorted backwards.

[0078] Table 3

[0079]

[0080]

[0081] Table 5

[0082]

[0083]

[0084] Furthermore, after obtaining the memory state set to be analyzed of the service node, the memory usage value of the service node at a future moment can be predicted by performing a weighted average calculation on the memory state set to be analyzed. However, since the memory usage of the predicted service node may increase significantly on the day of the prediction, in order to improve the prediction accuracy and make the prediction result closer to the true value, the embodiment of the present application proposes to compensate the weighted average prediction value.

[0085] As an optional implementation, in the technical solution provided in the above step S304, the predicted memory usage value of the service node in the future time can be obtained by the following method, including:

[0086] Step 1: Use the weighted average method to calculate the product of the average memory usage of each first historical time period in the memory state set to be analyzed and the preset weight value to obtain a first weighted average prediction value.

[0087] Therefore, the expression of the first weighted average predicted value above can be written as:

[0088]

[0089] Among them, K i represents the average memory usage corresponding to the first historical time period of the ith time, and K1 represents the average memory usage corresponding to the first historical time period closest to the current time, and K n Indicates the average memory usage corresponding to the first historical time period farthest from the current time, ε i Indicates the corresponding weight value, and the weight value can be configured according to the actual application scenario.

[0090] It should be noted that the weight value can be configured in the following two ways in the embodiment of the present application:

[0091] (1) The smaller the time interval between the historical time period corresponding to the average memory usage and the current time, the larger the corresponding weight value; the larger the time interval between the historical time period corresponding to the average memory usage and the current time, the smaller the corresponding weight value;

[0092] (2) The weight value corresponding to the average memory usage of the historical time periods whose time interval from the current time is less than the preset time interval is set to the first value, and the weight value corresponding to the average memory usage of the historical time periods whose time interval from the current time is not less than the preset time interval is set to the first value. For example, the weight of half of the data close to the current time is set to 1.5, that is, the weight of ε1 to K1 corresponding to Corresponding The value of is set to 1.5; and the weight of the other half of the data is set to 0.5, that is Corresponding To the ε corresponding to K1 n The value of is set to 0.5.

[0093] For example, taking container 1 in Table 3 above as an example, if the video cover generation task is performed at 11:58 on the same day, the predicted future time is 12 o'clock, and the weight corresponding to the first memory usage value from the 1st to the 7th day is set to 1.5, and the weight corresponding to the first memory usage value from the 8th to the 14th day is set to 0.5. From Table 4 above, it can be seen that the sampling values ​​at 12 o'clock from the 1st to the 14th day are substituted into the above formula to obtain the first weighted average prediction value Y:

[0094]

[0095] Step 2: Determine at least one first historical time period whose time interval with the current time is less than a preset time interval threshold and the second weighted average predicted value of the service node in at least one first historical time period, and calculate the average value of the difference between the average memory occupancy value of each first historical time period and the second weighted average predicted value, and use the average value as the compensation factor of the service node.

[0096] Therefore, the expression of the above compensation factor can be written as:

[0097]

[0098] Wherein, h represents the number of the first historical time period closest to the current time (generally, h can be taken as 3, and the setting of 3 here is only used as an example for explanation without specific limitation), K i represents the average memory usage of the service node in the first h historical time periods, Y i It represents the second weighted average prediction value of the service node in h first historical time periods, and its calculation method can refer to the first step above.

[0099] For example, taking container 1 in Table 3 above as an example, if the video cover generation task is performed at 11:58 on the same day, the predicted future time is 12 o'clock. According to Table 1 above, the weighted average predicted values ​​of container 1 at 11:45, 11:50, and 11:55 are 1985, 1990, and 1980, respectively, and the corresponding sampling values ​​are 1915, 1940, and 1939, respectively. Substitute the above results into the compensation factor calculation formula to obtain the compensation factor β:

[0100]

[0101] Step 3: Determine the predicted memory usage value of the service node at a future time based on the first weighted average predicted value and the compensation factor.

[0102] Therefore, the expression for the predicted memory usage value of the service node at a future time can be written as:

[0103] Z=Y+β

[0104] Similarly, according to Table 3 and Table 4, the comparison results of the actual memory usage values ​​(ie, the currently collected memory data) and the predicted values ​​of container 1 and container 2 at other time points can be obtained, as shown in Table 5 and Table 6.

[0105] Table 5

[0106]

[0107]

[0108] Table 6

[0109]

[0110] Among them, the above weighted prediction error rate = (weighted average prediction value / actual memory usage value) / actual memory usage value, and the compensated weighted prediction error rate = (predicted memory usage value / actual memory usage value) / actual memory usage value. From the above Tables 5 and 6, it is not difficult to see that compared with the prediction results calculated by the weighted average algorithm, adding the compensation factor using the compensated weighted average method can significantly improve the prediction accuracy.

[0111] As an optional implementation, in the technical solution provided in the above step S304, after obtaining the predicted memory usage value of the service node at the future time, the first difference between the predicted memory usage value and the memory upper limit value of the service node and the second difference between the memory upper limit value of the service node and the actual memory usage value can be determined.

[0112] Specifically, if the hth service node S h The memory upper limit is denoted as I h Since the memory of the service node has a critical value (i.e., less than the total memory limit of the system), the memory limit of the service node can be recorded as bI h , where b represents the engineering coefficient, which can usually be set to 0.9. It can be adjusted according to the specific business situation. For example, for a business system with a relatively high business memory usage, this value can be adjusted to a smaller value. In addition, the actual memory usage value of the service node at the beginning of the video cover task is recorded as Q h , and the predicted memory usage value Z of the service node h , therefore, the first difference can be written as: bI h -Z h , and the second difference can be written as: bI h -Q h .

[0113] Furthermore, the first difference and the second difference of each service node in the multiple service nodes are sorted, and a target difference that is less than a preset difference threshold is selected from all the differences, that is, the smallest difference is selected as the target difference, denoted as r, where r is the available memory value allocated by the application system to the video cover generation task.

[0114] As an optional implementation, in the technical solution provided in the above step S308, the cover generation task of the video to be processed can be performed by the following method, including:

[0115] Step 1: Calculate the quotient (denoted as r / u) of the target difference (denoted as r) and the preset redundancy coefficient (denoted as u), and determine whether the second memory usage value (denoted as p) is less than the quotient.

[0116] The redundancy coefficient can be adjusted according to the video attributes, such as the coefficient can be increased for large-volume HD video and decreased for small-volume HD video. In the embodiment of the present application, it is preferably set to 1.05, which is only used as an example and is not specifically limited thereto.

[0117] Usually, considering that there will be operations such as decryption and image generation in the process of video cover generation, which will also occupy memory, the actual memory occupied by the video cover generation task will be slightly larger than the video volume of the video to be processed (that is, the second memory usage value) p. Therefore, whether the memory space corresponding to the target difference can directly execute the video cover generation task can be converted into the size relationship between the video volume p of the video to be processed and the quotient value r / u.

[0118] Step 2: When the second memory usage value is not greater than the quotient value, determine to directly execute the cover generation task of the video to be processed on the target service node whose memory available value is not less than the target difference value to obtain the cover image of the video to be processed.

[0119] In the above case of p≤r / u, that is, the target difference satisfies the memory size required for the video cover generation task, so at this time the front-end browser can directly transfer the video to be processed to the target service node (that is, the background service node) where the available memory space meets the target difference, so as to execute the cover generation task of the video to be processed and obtain at least one video cover image.

[0120] Step 3: When the second memory usage value is not less than the quotient value, the video to be processed is intercepted to obtain the corresponding video stream, and the cover generation task of the video stream is executed on the target service node where the memory available value is not less than the target difference value to obtain the cover image of the video to be processed.

[0121] In the above-mentioned case of p>r / u, that is, the target difference does not meet the memory size required for the video cover generation task, the front-end browser can first intercept the video to be processed to obtain a video stream, so that the memory space corresponding to the target difference can provide sufficient memory for the intercepted video stream, and then transmit the video to be processed to the target service node (i.e., the background service node) where the available memory space meets the target difference, so as to execute the video stream cover generation task and obtain at least one video cover image.

[0122] Optionally, the video to be processed is intercepted according to the following method, including: determining the start frame and the end frame whose size of the video stream in the video to be processed is a third memory usage value, and intercepting the video stream between the start frame and the end frame, wherein the third memory usage value is not greater than the quotient value.

[0123] It should be noted that if the generated video cover images do not meet the preset image requirements, the video cover generation task can continue to be executed on the service node corresponding to the second lowest difference until the cover image is successfully generated and the memory space occupied by the video cover generation task on the service node is released.

[0124] Based on the scheme defined by the above steps S302 to S308, it can be known that in the embodiment, by performing data grouping and outlier removal preprocessing operations on multiple memory state sets of multiple service nodes in the application system in multiple first historical time periods, a corresponding memory state set to be analyzed is obtained, and the memory state set to be analyzed can better represent the actual operating state of the service node. Secondly, the data in the memory state set to be analyzed is analyzed using the compensated weighted average method to obtain the predicted memory usage value of the service node, and to achieve accurate prediction of the memory usage of the service node. Further, based on the predicted memory usage value and the actual memory usage value of each service node, and combined with engineering experience, the allocable memory value set is calculated, and then the minimum value in the set is taken as the memory available value allocated to the video cover generation task by the application system. Finally, according to the allocable memory value and the video volume size of the video to be processed, the corresponding video cover generation method is selected to generate the video cover image, so as to ensure that the video cover is efficiently generated without affecting the operation of the system, so as to solve the technical problem that the failure rate of video cover generation in the related technology is high in the case of large-volume video or tight memory resources.

[0125] Example 2

[0126] Based on Embodiment 1 of the present application, an embodiment of a video cover generation device is also provided, and the video cover generation method of the above embodiment is executed when the device is running. Figure 5 is a schematic structural diagram of an optional video cover generation device according to an embodiment of the present application, such as Figure 5As shown, the video cover generation device at least includes a first acquisition module 52, a second acquisition module 54, a determination module 56 and a generation module 58, wherein:

[0127] An acquisition module 52 is used to acquire a plurality of memory state sets of each of the plurality of service nodes in a plurality of first historical time periods, and an actual memory usage value of each of the plurality of service nodes at a current time and a second memory usage value of the video to be processed, wherein the memory state set includes a plurality of first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed;

[0128] A first determination module 54 is used to analyze the memory state set of the service node for each service node using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and determine a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value;

[0129] A second determining module 56, configured to determine a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes;

[0130] The execution module 58 is used to determine, according to the target difference value and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0131] It should be noted that the various modules in the above-mentioned video cover generation device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0132] Example 3

[0133] According to an embodiment of the present application, a non-volatile storage medium is also provided, in which a program is stored, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the video cover generation method in Example 1.

[0134] Optionally, the device where the non-volatile storage medium is located implements the following steps by running the program:

[0135] Step S1, obtaining multiple memory state sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each service node in the multiple service nodes at the current time and second memory usage values ​​of the video to be processed, wherein the memory state set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed;

[0136] Step S2: for each service node, a plurality of memory state sets of the service node are analyzed using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value are determined;

[0137] Step S3, determining a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes;

[0138] Step S4, determining, based on the target difference and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0139] According to an embodiment of the present application, a computer program product is also provided, which includes a stored computer program, wherein when the computer program is executed by a processor, the video cover generation method in Example 1 is implemented.

[0140] Optionally, the computer program executes the following steps:

[0141] Step S1, obtaining multiple memory state sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each service node in the multiple service nodes at the current time and second memory usage values ​​of the video to be processed, wherein the memory state set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed;

[0142] Step S2: for each service node, a plurality of memory state sets of the service node are analyzed using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value are determined;

[0143] Step S3, determining a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes;

[0144] Step S4, determining, based on the target difference and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0145] According to an embodiment of the present application, a processor is also provided, which is used to run a program, wherein the video cover generation method in Example 1 is executed when the program is running.

[0146] Optionally, the following steps are performed when the program is running:

[0147] Step S1, obtaining multiple memory state sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each service node in the multiple service nodes at the current time and second memory usage values ​​of the video to be processed, wherein the memory state set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed;

[0148] Step S2: for each service node, a plurality of memory state sets of the service node are analyzed using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value are determined;

[0149] Step S3, determining a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes;

[0150] Step S4, determining, based on the target difference and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0151] According to an embodiment of the present application, an electronic device is also provided, wherein: Figure 6 is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application, such as Figure 6 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the video cover generation method in the above-mentioned embodiment 1 when running.

[0152] Optionally, the processor is configured to implement the following steps by executing a computer program:

[0153] Step S1, obtaining multiple memory state sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each service node in the multiple service nodes at the current time and second memory usage values ​​of the video to be processed, wherein the memory state set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed;

[0154] Step S2: for each service node, a plurality of memory state sets of the service node are analyzed using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and an actual memory usage value are determined;

[0155] Step S3, determining a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes;

[0156] Step S4, determining, based on the target difference and the second memory usage value, to generate a cover image for the video to be processed in accordance with the target video cover generation method.

[0157] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0158] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

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

[0161] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0162] 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 technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0163] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A video cover generation method, characterized in that: include: Acquire multiple memory status sets of multiple service nodes in multiple first historical time periods, as well as actual memory usage values ​​of each service node in the multiple service nodes at a current time and a second memory usage value of the video to be processed, wherein the memory status set includes multiple first memory usage values ​​of the service node in the first historical time period, and the current time is the upload time of the video to be processed; For each of the service nodes, a plurality of memory state sets of the service node are analyzed using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and the actual memory usage value are determined; Determine a target difference value less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes; Based on the target difference value and the second memory usage value, determine to generate a cover image of the video to be processed according to the target video cover generation method.

2. The method according to claim 1, characterized in that Obtain multiple memory state sets of multiple service nodes in multiple first historical time periods, including: For each of the service nodes, a preset monitoring tool is called to obtain multiple first memory usage values ​​corresponding to multiple historical times of the service node within a first historical time period, the multiple first memory usage values ​​form the memory status set, and the memory status set is stored in a preset database.

3. The method according to claim 1, characterized in that Before analyzing the multiple memory state sets of the service node by using the compensated weighted average method, the method further includes: Dividing the memory state set of the service node in each first historical time period into multiple subsets, and determining a first median value of multiple first memory usage values ​​in each of the subsets; Determine an average memory occupancy of the service node in a second historical time period according to the first median value of each of the subsets in each first historical time period of the service node, wherein the second historical time period includes a plurality of the first historical time periods; In order of time from recent to far, it is determined whether the average memory usage of the service node in each second historical time period is less than a preset memory usage threshold; When the average memory occupancy of the service node in the second historical time period is less than the memory occupancy threshold, the memory state sets corresponding to the first historical time periods in the second historical time period are used as the memory state sets to be analyzed.

4. The method according to claim 3, characterized in that The process of determining the memory usage threshold includes: Sorting the average memory usage of the service node in multiple second historical time periods, and determining a second median value in the sorting result; The product of the second median value and the preset equivalent ratio is calculated, and the obtained product result is used as the memory occupation threshold.

5. The method according to claim 3, characterized in that: The multiple memory state sets of the service node are analyzed by using a compensation weighted average method to obtain a predicted memory usage value of the service node in the future, including: The product of the average memory occupancy value of each of the first historical time periods in the memory state set to be analyzed and a preset weight value is calculated by using a weighted average method to obtain a first weighted average prediction value, wherein the smaller the time interval between the first historical time period corresponding to the average memory occupancy value and the current time is, the larger the corresponding weight value is, and the larger the time interval between the first historical time period corresponding to the average memory occupancy value and the current time is, the smaller the corresponding weight value is; Determine at least one first historical time period whose time interval with the current time is less than a preset time interval threshold and a second weighted average predicted value of the service node in at least one first historical time period, and calculate the average value of the difference between the average value of the memory occupancy of each of the first historical time periods and the second weighted average predicted value, and use the average value as the compensation factor of the service node; A predicted memory usage value of the service node at a future time is determined based on the first weighted average predicted value and the compensation factor.

6. The method according to claim 1, characterized in that Determining, according to the target difference value and the second memory usage value, to generate a cover image of the video to be processed in a target video cover generation method includes: Calculating a quotient of the target difference and a preset redundancy coefficient, and determining whether the second memory usage value is less than the quotient; In the case where the second memory usage value is not greater than the quotient value, determine to directly execute the cover generation task of the video to be processed on the target service node whose memory available value is not less than the target difference value, to obtain the cover picture of the video to be processed; When the second memory usage value is less than the quotient value, the video to be processed is intercepted to obtain the corresponding video stream, and the cover generation task of the video stream is performed on the target service node whose memory available value is not less than the target difference value to obtain the cover image of the video to be processed.

7. The method according to claim 6, characterized in that The video to be processed is intercepted to obtain a corresponding video stream, including: Determine a start frame and an end frame whose size of the video stream in the video to be processed is a third memory usage value, and intercept the video stream between the start frame and the end frame, wherein the third memory usage value is not greater than the quotient value.

8. A video cover image generation device, characterized in that: include: An acquisition module is used to acquire a plurality of memory state sets of a plurality of service nodes in a plurality of first historical time periods, and an actual memory usage value of each of the plurality of service nodes at a current time and a second memory usage value of a video to be processed, wherein the memory state set includes a plurality of first memory usage values ​​of the service node in the first historical time period, and the current time is an upload time of the video to be processed; A first determination module is used to analyze the memory state set of each service node by using a compensated weighted average method to obtain a predicted memory usage value of the service node at a future time, and determine a first difference between the predicted memory usage value and a memory upper limit value of the service node and a second difference between the memory upper limit value of the service node and the actual memory usage value; A second determining module, configured to determine a target difference value that is less than a preset difference threshold value from the first difference value and the second difference value of each service node in the plurality of service nodes; An execution module is used to determine, based on the target difference value and the second memory usage value, to generate a cover image of the video to be processed in accordance with a target video cover generation method.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, wherein the device where the non-volatile storage medium is located executes the video cover generation method described in any one of claims 1 to 7 by running the computer program.

10. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the video cover generation method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Cover image determination method and device, computer equipment and readable storage medium

    CN111901679A

  • Video cover display method and device, equipment, medium and product

    CN114205680A

  • Memory allocation method and system, computer equipment and readable medium

    CN114924886A

  • Video cover generation method and device, electronic equipment and storage medium

    CN115119071A

  • Method and device for adjusting number of service nodes

    CN118175162A