A video stream processing method, apparatus, device, and storage medium

By acquiring video stream data, extracting keyframes, and performing spatial transformation, noise removal, and compression, as well as adjusting brightness and contrast, this technology solves the problem of large disk space usage for video stream images in existing technologies. It achieves efficient and high-quality video stream processing, improving user experience and storage efficiency.

CN119545044BActive Publication Date: 2026-03-10CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies generate video stream images that occupy a large amount of disk space, which is not conducive to cloud storage and fast transmission, and reduces image storage efficiency.

Method used

By acquiring video stream data, extracting keyframes, performing spatial transformation and noise removal, and then compressing the image data and adjusting brightness and contrast, a target image with a high compression ratio is generated.

Benefits of technology

Without significantly affecting image quality, it significantly reduces the disk space occupied by images and improves image storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545044B_ABST
    Figure CN119545044B_ABST
Patent Text Reader

Abstract

This invention provides a video stream processing method, apparatus, device, and storage medium, comprising: acquiring video stream data; extracting keyframe data from the video stream data to obtain initial image data; performing spatial transformation on the initial image data to obtain transformed image data; performing noise removal processing on the transformed image data to obtain preprocessed image data; performing compression processing on the preprocessed image data to obtain compressed image data; adjusting the brightness and contrast of the compressed image data, and obtaining a target image based on the adjustment result. This invention can obtain a target image by adjusting brightness and contrast, significantly reducing the disk space occupied by the image without significantly affecting image quality, and generating a highly compressed image file, thereby improving image storage efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a video stream processing method, device, equipment and storage medium. BACKGROUND

[0002] Video stream media technology is widely used in various network video services, including video on demand, live broadcast, etc. In these applications, pictures are often generated from video frames for the purpose of thumbnail display, cover picture generation, etc. However, the pictures generated by the prior art often occupy a large disk space, which is not conducive to cloud storage and fast transmission, and reduces the efficiency of picture storage. SUMMARY

[0003] In view of the above problems, the present application embodiment is proposed to provide a video stream processing method, device, electronic equipment and computer readable storage medium which can overcome the above problems or at least partially solve the above problems.

[0004] To solve the above problems, the present application embodiment discloses a video stream processing method, comprising:

[0005] Obtaining video stream data;

[0006] Extracting key frame data from the video stream data to obtain initial picture data;

[0007] Performing spatial conversion on the initial picture data to obtain converted picture data;

[0008] Performing noise removal processing on the converted picture data to obtain preprocessed picture data;

[0009] Performing compression processing on the preprocessed picture data to obtain compressed picture data;

[0010] Adjusting the brightness and contrast of the compressed picture data to obtain a target picture according to the adjustment result.

[0011] Optionally, the compression processing on the preprocessed picture data to obtain the compressed picture data comprises:

[0012] Identifying important region picture data, non-important region picture data and background picture data in the preprocessed picture data;

[0013] Compressing the important region picture data, the non-important region picture data and the background picture data to obtain the compressed picture data.

[0014] Optionally, the compression of the important region picture data, the non-important region picture data and the background picture data to obtain the compressed picture data comprises:

[0015] Obtain a preset mapping relationship, which includes the compression rate corresponding to image data in different regions;

[0016] The first compression rate of the image data of the important region is determined using the preset mapping relationship;

[0017] The second compression rate of the image data in the non-critical area is determined using the preset mapping relationship;

[0018] The third compression rate of the background image data is determined using the preset mapping relationship;

[0019] The important area image is compressed using the first compression rate, the non-important area image data is compressed using the second compression rate, and the background image data is compressed using the third compression rate. The compressed image data is obtained based on the compression result.

[0020] Optionally, the step of spatially transforming the initial image data to obtain the transformed image data includes:

[0021] Spatial transformation is performed on the initial image data to obtain luminance component data, blue component data, and red component data.

[0022] Optionally, the step of performing noise removal processing on the converted image data to obtain preprocessed image data includes:

[0023] The first noise in the luminance component data is identified using a first noise recognition model.

[0024] The second noise in the blue component data was identified using a second noise identification model;

[0025] The third noise in the red component data was identified using a third noise identification model;

[0026] The first noise, the second noise, and the third noise are removed by a noise reduction network model to obtain preprocessed image data.

[0027] Optionally, the first noise recognition model is trained in the following manner:

[0028] Acquire multiple luminance component data and noise data corresponding to each luminance component data in the multiple luminance component data;

[0029] The multiple luminance component data are used as input data, and the noise data corresponding to each luminance component data is used as output data.

[0030] The first noise recognition model is obtained by inputting the input data and the output data into the training model.

[0031] Optionally, adjusting the brightness and contrast of the compressed image data and obtaining the target image based on the adjustment result includes:

[0032] The brightness and contrast of the compressed image data are adjusted until the compression ratio of the compressed image data is less than or equal to the preset compression ratio, and the adjusted image data is determined as the target image.

[0033] The present invention also discloses a video stream processing apparatus, comprising:

[0034] The acquisition module is used to acquire video stream data;

[0035] The extraction module is used to extract keyframe data from the video stream data to obtain initial image data;

[0036] The conversion module is used to perform spatial conversion on the initial image data to obtain the converted image data;

[0037] The noise removal module is used to remove noise from the converted image data to obtain preprocessed image data.

[0038] The compression module is used to compress the preprocessed image data to obtain compressed image data;

[0039] The adjustment module is used to adjust the brightness and contrast of the compressed image data, and obtain the target image based on the adjustment result.

[0040] Optionally, the compression module includes:

[0041] The identification submodule is used to identify important area image data, non-important area image data, and background image data in the preprocessed image data;

[0042] The compression submodule is used to compress the image data of the important area, the image data of the non-important area, and the background image data to obtain compressed image data.

[0043] Optionally, the compression submodule includes:

[0044] An acquisition unit is used to acquire a preset mapping relationship, wherein the preset mapping relationship includes the compression rate corresponding to image data in different regions;

[0045] The first determining unit is used to determine the first compression rate of the important region image data using the preset mapping relationship;

[0046] The second determining unit is used to determine the second compression rate of the non-important area image data using the preset mapping relationship;

[0047] The third determining unit is used to determine the third compression rate of the background image data using the preset mapping relationship;

[0048] The compression unit is used to compress the important area image using the first compression rate, compress the non-important area image data using the second compression rate, compress the background image data using the third compression rate, and obtain the compressed image data based on the compression result.

[0049] Optionally, the conversion module includes:

[0050] The conversion submodule is used to perform spatial conversion on the initial image data to obtain luminance component data, blue component data, and red component data.

[0051] Optionally, the removal module includes:

[0052] The first identification submodule is used to identify the first noise in the luminance component data using a first noise identification model;

[0053] The second identification submodule is used to identify the second noise in the blue component data using a second noise identification model;

[0054] The third identification submodule is used to identify the third noise in the red component data using a third noise identification model;

[0055] The noise removal submodule is used to remove the first noise, the second noise, and the third noise respectively through a noise reduction network model to obtain preprocessed image data.

[0056] Optionally, the first noise recognition model is trained in the following manner:

[0057] Acquire multiple luminance component data and noise data corresponding to each luminance component data in the multiple luminance component data;

[0058] The multiple luminance component data are used as input data, and the noise data corresponding to each luminance component data is used as output data.

[0059] The first noise recognition model is obtained by inputting the input data and the output data into the training model.

[0060] Optionally, the adjustment module includes:

[0061] The adjustment submodule is used to adjust the brightness and contrast of the compressed image data until the compression ratio of the compressed image data is less than or equal to the preset compression ratio, and then determines the adjusted image data as the target image.

[0062] The present invention also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the video stream processing method described above.

[0063] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the video stream processing method described above.

[0064] The embodiments of the present invention have the following advantages:

[0065] This invention acquires video stream data and extracts keyframes, performing spatial transformation and noise removal to ensure improved image quality. Subsequently, the pre-processed image data is compressed to reduce data volume. Finally, brightness and contrast are adjusted to optimize visual effects, thereby achieving efficient and high-quality video stream processing and enhancing user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without noticeably affecting image quality, and generating highly compressed image files, thus improving image storage efficiency. Attached Figure Description

[0066] Figure 1 This is a flowchart of the steps of a video stream processing method provided in an embodiment of the present invention;

[0067] Figure 2 This is a schematic diagram of preprocessed image data provided in an embodiment of the present invention;

[0068] Figure 3 This is a structural block diagram of a video stream processing device provided in an embodiment of the present invention. Detailed Implementation

[0069] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] Video streaming technology is widely used in various online video services, including video-on-demand and live streaming. These applications often require generating images from video frames for purposes such as thumbnail display and cover image generation. However, images generated by existing technologies tend to occupy significant disk space, hindering cloud storage and rapid transmission. This issue of image storage efficiency is particularly prominent when dealing with large numbers of video files, especially given the current high demand from both traditional and intelligent security systems.

[0071] One of the core concepts of this invention is that it acquires video stream data and extracts keyframes, performs spatial transformation and noise removal to ensure improved image quality; then, it compresses the preprocessed image data to reduce the data volume; finally, it adjusts brightness and contrast to optimize visual effects, thereby achieving efficient and high-quality video stream processing and improving user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without significantly affecting image quality, and generating highly compressed image files, thus improving image storage efficiency.

[0072] Reference Figure 1 The diagram illustrates a flowchart of a video stream processing method provided by an embodiment of the present invention. The method may specifically include the following steps:

[0073] Step 101: Obtain video stream data.

[0074] In this embodiment of the invention, video stream data can be obtained from a video source (such as a camera, file, network stream, live video, etc.). The video stream data usually exists in the form of a continuous frame sequence, and each frame is an image.

[0075] Step 102: Extract keyframe data from the video stream data to obtain initial image data;

[0076] In this embodiment of the invention, a keyframe is a representative frame in the video, which is usually used for video compression and content analysis. There are various ways to extract keyframe data. In one example, a frame can be extracted as a keyframe every fixed number of frames. In another example, keyframes can be determined by detecting scene changes (such as changes in lighting, object movement, etc.). The specific method used can be set according to the user's needs.

[0077] Step 103: Perform spatial transformation on the initial image data to obtain the transformed image data;

[0078] In this embodiment of the invention, the initial image data can be spatially transformed using a spatial transformation formula to obtain the transformed image data.

[0079] Step 104: Perform noise removal processing on the converted image data to obtain preprocessed image data.

[0080] In this embodiment of the invention, noise removal refers to removing random noise from an image to improve image quality. Noise removal processing can be performed on the converted image data to obtain preprocessed image data. Common noise removal methods may include: mean filtering: smoothing the image by calculating the average value of neighboring pixels; Gaussian filtering: smoothing the image using a Gaussian function to remove high-frequency noise; bilateral filtering: smoothing the image while preserving edge information, thereby removing noise.

[0081] Step 105: Compress the preprocessed image data to obtain compressed image data.

[0082] In this embodiment of the invention, image compression refers to optimizing image data by reducing image storage space or transmission bandwidth. Common image compression methods include: Lossy compression: such as JPEG compression, which reduces file size by discarding some image information; Lossless compression: such as PNG compression, which reduces file size without sacrificing image quality; Transform-based compression: such as DCT (Discrete Cosine Transform), which transforms the image to the frequency domain for compression.

[0083] Step 106: Adjust the brightness and contrast of the compressed image data, and obtain the target image based on the adjustment results.

[0084] In this embodiment of the invention, after obtaining the compressed image data, the brightness and contrast of the compressed image data can be adjusted, and the target image can be obtained based on the adjustment result; brightness and contrast adjustment refers to adjusting the brightness and contrast of the image to optimize the visual effect.

[0085] By adjusting the brightness and contrast of the compressed image data, a target image with a compression ratio that meets the user's requirements can be obtained.

[0086] This invention discloses a video stream processing method. The method acquires video stream data and extracts keyframes, performing spatial transformation and noise removal to ensure improved image quality. Subsequently, the pre-processed image data is compressed to reduce data volume. Finally, brightness and contrast are adjusted to optimize visual effects, thereby achieving efficient and high-quality video stream processing and enhancing user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without significantly affecting image quality, and generating highly compressed image files, thus improving image storage efficiency.

[0087] In one embodiment of the present invention, the preprocessed image data is compressed to obtain compressed image data, including: identifying important region image data, non-important region image data, and background image data in the preprocessed image data; and compressing the important region image data, non-important region image data, and background image data to obtain compressed image data.

[0088] In this embodiment of the invention, in order to improve compression efficiency and maintain image quality, the system first identifies important regions, unimportant regions, and background regions in the image, and then performs compression processing on these regions respectively. Specifically, edge detection algorithms (such as Canny edge detection) can be used to identify edges and contours in the image. These regions are usually important regions. Image segmentation algorithms (such as GrabCut and watershed algorithms) can be used to segment the image into different regions to identify important and unimportant regions. Background regions can be identified using background modeling algorithms (such as Gaussian mixture models).

[0089] After obtaining the image data of the important area, the image data of the unimportant area, and the background image data, different compression ratios can be used to compress the image data of the important area, the image data of the unimportant area, and the background image data respectively to obtain the compressed image data.

[0090] In one embodiment of the present invention, image data of important areas, image data of non-important areas, and background image data are compressed to obtain compressed image data. The method includes: obtaining a preset mapping relationship, which includes compression rates corresponding to different areas of image data; determining a first compression rate for the important area image data using the preset mapping relationship; determining a second compression rate for the non-important area image data using the preset mapping relationship; determining a third compression rate for the background image data using the preset mapping relationship; compressing the important area image data using the first compression rate, compressing the non-important area image data using the second compression rate, and compressing the background image data using the third compression rate; and obtaining the compressed image data based on the compression results.

[0091] In this embodiment of the invention, the preset mapping relationship includes compression rates corresponding to image data in different regions. More important regions have lower compression rates, meaning important regions can use lower compression rates, while less important regions and the background can use higher compression rates. Specifically, the preset mapping relationship is first obtained, and then used to determine the first compression rate for important region image data; the second compression rate for less important region image data; and the third compression rate for background image data. The first compression rate is lower than the second compression rate, and the relative magnitudes of the second and third compression rates are not limited. After determining the first, second, and third compression rates, the first compression rate can be used to compress the important region image, the second compression rate to compress the less important region image data, and the third compression rate to compress the background image data. The compressed image data is obtained based on the compression results. This invention, by first obtaining the preset mapping relationship and determining the compression rates for different regions, and then compressing the important, less important, and background regions separately, finally obtains the compressed image data. This region-based compression method, based on region and compression rate, can significantly reduce file size while maintaining image quality, thus improving image storage efficiency.

[0092] like Figure 2 The diagram illustrates a preprocessed image data provided by an embodiment of the present invention. Important and unimportant areas in the image can be identified. Important areas are those containing people, while unimportant areas are those not containing people.

[0093] In one embodiment of the present invention, spatial transformation is performed on the initial image data to obtain transformed image data, including: spatial transformation is performed on the initial image data to obtain luminance component data, blue component data and red component data.

[0094] In this embodiment of the invention, the YCbCr color space is a variant of the YUV color space, commonly used in digital image and video processing. The Y channel, like the Y channel in the YUV color space, represents luminance information, while the Cb and Cr channels represent chrominance information. Unlike YUV, the Cb and Cr channels undergo a certain degree of chrominance subsampling to reduce the amount of image data transmitted and the storage space required.

[0095] Specifically, the luminance component data can be calculated using formula (1):

[0096] Y=0.299R+0.587G+0.114B Formula (1)

[0097] Where Y represents the luminance component, R represents the pixel value of the red channel, G represents the pixel value of the green channel, and B represents the pixel value of the blue channel.

[0098] The blue component data can be calculated using formula (2):

[0099] Cb=-0.1687R-0.3313G+0.5B Formula (2)

[0100] Where Cb represents the blue component data, R represents the red channel pixel value, G represents the green channel pixel value, and B represents the blue channel pixel value.

[0101] The blue component data can be calculated using formula (3):

[0102] Cr=0.5R-0.4187G-0.0813B Formula (3)

[0103] Where Cr represents the red component data, R represents the red channel pixel value, G represents the green channel pixel value, and B represents the blue channel pixel value.

[0104] In one embodiment of the present invention, noise removal processing is performed on the converted image data to obtain preprocessed image data, including: using a first noise recognition model to identify a first noise in the luminance component data; using a second noise recognition model to identify a second noise in the blue component data; using a third noise recognition model to identify a third noise in the red component data; and using a noise reduction network model to remove the first noise, the second noise, and the third noise respectively to obtain the preprocessed image data.

[0105] In this embodiment of the invention, the first noise recognition model is used to identify noise in the luminance component data, the second noise recognition model is used to identify noise in the blue component data, and the third noise recognition model is used to identify noise in the red component data. The first noise recognition model can identify the first noise in the luminance component data, the second noise recognition model can identify the second noise in the blue component data, and the third noise recognition model can identify the third noise in the red component data. Finally, a noise reduction network model is used to remove the first, second, and third noises respectively, resulting in preprocessed image data. This invention obtains preprocessed image data by performing noise recognition and removal processing on the luminance component data, blue component data, and red component data respectively. This component processing method can more precisely remove noise in different color channels, improve image quality, and is suitable for application scenarios requiring high-quality images.

[0106] It should be noted that for simple noise (such as Gaussian noise), CNN or autoencoder can be used for noise reduction; while for complex noise (such as texture noise or random noise), GAN, VAE or hybrid models can be used for noise reduction.

[0107] In one embodiment of the present invention, the first noise recognition model is trained as follows: multiple luminance component data and noise data corresponding to each luminance component data are acquired; the multiple luminance component data are used as input data, and the noise data corresponding to each luminance component data is used as output data; the input data and output data are input into a training model for training to obtain the first noise recognition model.

[0108] In this embodiment of the invention, when training the first noise model, multiple luminance component data and noise data corresponding to each luminance component data can be obtained first. Then, the multiple luminance component data are used as input data to the training model, and the noise data corresponding to the multiple luminance component data are used as output data to the training model. The training model is then trained to obtain the first noise recognition model.

[0109] In one embodiment of the present invention, multiple blue component data and noise data corresponding to each blue component data are first acquired. Then, the multiple blue component data are input into the training model as input data, and the noise data corresponding to the multiple blue component data are input into the training model as output data. The training model is then trained to obtain a second noise recognition model.

[0110] In one embodiment of the present invention, multiple red component data and noise data corresponding to each red component data can be obtained first. Then, the multiple red component data are used as input data to the training model, and the noise data corresponding to the multiple red component data are used as output data to the training model. The training model is then trained to obtain a third noise recognition model.

[0111] In one embodiment of the present invention, adjusting the brightness and contrast of the compressed image data and obtaining the target image based on the adjustment result includes: adjusting the brightness and contrast of the compressed image data until the compression rate of the compressed image data is less than or equal to a preset compression rate, and determining the adjusted image data as the target image.

[0112] In this embodiment of the invention, the preset compression rate is a target compression rate set in advance according to actual needs. The compression rate can be adjusted by continuously adjusting the brightness and contrast. After adjusting the brightness and contrast, the compression rate of the image needs to be recalculated, and then it is determined whether the compression rate of the adjusted image is less than or equal to the preset compression rate. The above operation is repeated until the compression rate of the compressed image data is less than or equal to the preset compression rate.

[0113] This invention discloses a video stream processing method. The method acquires video stream data and extracts keyframes, performing spatial transformation and noise removal to ensure improved image quality. Subsequently, the pre-processed image data is compressed to reduce data volume. Finally, brightness and contrast are adjusted to optimize visual effects, thereby achieving efficient and high-quality video stream processing and enhancing user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without significantly affecting image quality, and generating highly compressed image files, thus improving image storage efficiency.

[0114] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0115] Reference Figure 3 The diagram illustrates a structural block diagram of a video stream processing apparatus provided in an embodiment of the present invention. The apparatus may include:

[0116] Module 201 is used to acquire video stream data;

[0117] Extraction module 202 is used to extract keyframe data from the video stream data to obtain initial image data;

[0118] The conversion module 203 is used to perform spatial conversion on the initial image data to obtain the converted image data;

[0119] The noise removal module 204 is used to perform noise removal processing on the converted image data to obtain preprocessed image data.

[0120] Compression module 205 is used to compress the preprocessed image data to obtain compressed image data;

[0121] The adjustment module 206 is used to adjust the brightness and contrast of the compressed image data, and obtain the target image based on the adjustment result.

[0122] This invention discloses a video stream processing device. The device acquires video stream data and extracts keyframes, performing spatial transformation and noise removal to ensure improved image quality. Subsequently, the pre-processed image data is compressed to reduce data volume. Finally, brightness and contrast are adjusted to optimize visual effects, thereby achieving efficient and high-quality video stream processing and enhancing user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without significantly affecting image quality, and generating highly compressed image files, thus improving image storage efficiency.

[0123] In one embodiment of the present invention, the compression module includes:

[0124] The recognition submodule is used to identify important area image data, non-important area image data, and background image data in the preprocessed image data;

[0125] The compression submodule is used to compress image data of important areas, non-important areas, and background images to obtain compressed image data.

[0126] In one embodiment of the present invention, the compression submodule includes:

[0127] The acquisition unit is used to acquire a preset mapping relationship, which includes the compression rate of image data in different regions.

[0128] The first determining unit is used to determine the first compression rate of the image data of the important area using a preset mapping relationship;

[0129] The second determining unit is used to determine the second compression rate of the image data of non-important areas using a preset mapping relationship;

[0130] The third determining unit is used to determine the third compression rate of the background image data using a preset mapping relationship;

[0131] The compression unit is used to compress the image data of important areas using a first compression ratio, compress the image data of non-important areas using a second compression ratio, and compress the background image data using a third compression ratio, and obtain the compressed image data based on the compression results.

[0132] In one embodiment of the present invention, the conversion module includes:

[0133] The transformation submodule is used to perform spatial transformation on the initial image data to obtain luminance component data, blue component data, and red component data.

[0134] In one embodiment of the present invention, the removal module includes:

[0135] The first identification submodule is used to identify the first noise in the luminance component data using a first noise identification model;

[0136] The second identification submodule is used to identify the second noise in the blue component data using the second noise identification model;

[0137] The third identification submodule is used to identify the third noise in the red component data using the third noise identification model;

[0138] The noise removal submodule is used to remove the first noise, the second noise, and the third noise respectively through a noise reduction network model to obtain preprocessed image data.

[0139] In one embodiment of the present invention, the first noise recognition model is trained in the following manner:

[0140] Acquire multiple luminance component data and the noise data corresponding to each luminance component data in the multiple luminance component data;

[0141] Multiple luminance component data are used as input data, and the noise data corresponding to each luminance component data is used as output data.

[0142] The input and output data are fed into the training model to obtain the first noise recognition model.

[0143] In one embodiment of the present invention, the adjustment module includes:

[0144] The adjustment submodule is used to adjust the brightness and contrast of the compressed image data until the compression ratio of the compressed image data is less than or equal to the preset compression ratio, and then the adjusted image data is identified as the target image.

[0145] This invention discloses a video stream processing device. The device acquires video stream data and extracts keyframes, performing spatial transformation and noise removal to ensure improved image quality. Subsequently, the pre-processed image data is compressed to reduce data volume. Finally, brightness and contrast are adjusted to optimize visual effects, thereby achieving efficient and high-quality video stream processing and enhancing user experience. This invention can obtain the target image by adjusting brightness and contrast, significantly reducing disk space usage without significantly affecting image quality, and generating highly compressed image files, thus improving image storage efficiency.

[0146] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0147] This invention also provides an electronic device, comprising:

[0148] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described video stream processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0149] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described video stream processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0150] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0151] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0152] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0153] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0155] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0156] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0157] The present invention has provided a detailed description of a video stream processing method, apparatus, device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for processing a video stream, characterized by, The method comprises the following steps: acquiring video stream data; extracting key frame data from the video stream data to obtain initial picture data; performing spatial conversion on the initial picture data to obtain converted picture data; performing noise removal processing on the converted picture data to obtain preprocessed picture data; performing compression processing on the preprocessed picture data to obtain compressed picture data; adjusting the brightness and contrast of the compressed picture data, and obtaining target picture data according to the adjustment result; repeating the adjustment of the brightness and contrast of the compressed picture data until the compression rate of the compressed picture data is less than or equal to a preset compression rate.

2. The method of claim 1, wherein, The method comprises the following steps: identifying important region picture data, non-important region picture data and background picture data in the preprocessed picture data; compressing the important region picture data, the non-important region picture data and the background picture data to obtain the compressed picture data.

3. The method of claim 2, wherein, The method comprises the following steps: acquiring a preset mapping relationship, wherein the preset mapping relationship comprises compression rates corresponding to different region picture data; determining a first compression rate of the important region picture data by using the preset mapping relationship; determining a second compression rate of the non-important region picture data by using the preset mapping relationship; determining a third compression rate of the background picture data by using the preset mapping relationship; compressing the important region picture data by using the first compression rate, compressing the non-important region picture data by using the second compression rate, and compressing the background picture data by using the third compression rate, and obtaining the compressed picture data according to the compression result.

4. The method of claim 1, wherein, The method comprises the following steps: performing spatial conversion on the initial picture data to obtain luminance component data, blue component data and red component data.

5. The method of claim 4, wherein, The method comprises the following steps: identifying first noise in the luminance component data by using a first noise identification model; identifying second noise in the blue component data by using a second noise identification model; identifying third noise in the red component data by using a third noise identification model; removing the first noise, the second noise and the third noise by using a denoising network model to obtain the preprocessed picture data.

6. The method of claim 5, wherein, The first noise identification model is obtained by the following method: acquiring a plurality of luminance component data and noise data corresponding to each luminance component data in the plurality of luminance component data; taking the plurality of luminance component data as input data and taking the noise data corresponding to each luminance component data as output data; inputting the input data and the output data into a training model to obtain the first noise identification model.

7. A video stream processing apparatus, characterized by comprising: The method comprises the following steps: an acquisition module configured to acquire video stream data; extracting a key frame from the video stream data to obtain initial picture data; a conversion module configured to perform spatial conversion on the initial picture data to obtain converted picture data; a removal module configured to perform noise removal processing on the converted picture data to obtain preprocessed picture data; a compression module configured to perform compression processing on the preprocessed picture data to obtain compressed picture data; an adjustment module configured to adjust the brightness and contrast of the compressed picture data, and obtain a target picture according to an adjustment result; and repeatedly adjust the brightness and contrast of the compressed picture data until a compression rate of the compressed picture data is less than or equal to a preset compression rate.

8. An electronic device, comprising: comprising: a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the video stream processing method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, a computer program is stored on the computer readable storage medium, and when executed by a processor, implements the steps of the video stream processing method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Picture compression processing method and system

    CN108322755A

  • Image compression method and device, storage medium and electronic equipment

    CN112839223A