A Picture Encoding and Processing Method Based on 5G Signals
By adopting a 5G signal-based image encoding processing method on the terminal device, including preprocessing, sharding processing and predicted encoding threshold setting, the problem of inefficient encoding efficiency of terminal devices is solved, the encoding efficiency is improved, and the phenomenon of picture lag and slow image buffering is reduced.
Patent Information
- Application Number
- CN202410729426.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-06-06
AI Technical Summary
In the prior art, terminal equipment in the fields of video conferencing, remote monitoring and video media have low coding efficiency, resulting in picture stuttering and slow picture buffering.
A 5G signal-based image encoding processing method is adopted to obtain simulated images for preprocessing, sampling and quantization, determine whether sharding processing is needed, and set a predicted encoding threshold based on the network transmission status and equipment performance of the terminal device to decide whether to transmit the pictures to a remote server for encoding processing.
The encoding efficiency during the encoding process is improved, the problems of picture lag and slow image buffering are reduced, and the encoding task allocation and processing of terminal devices are optimized through sharding processing and setting of predicted encoding thresholds.
Smart Images

Figure CN118714234B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of security technology, and specifically to a method for picture encoding and processing based on 5G signals. Background Art
[0002] The main uses of picture encoding are to compress and transmit pictures. By encoding pictures, the size of pictures can be reduced in different scenarios, thus facilitating the transmission and storage of pictures. In addition, picture encoding can improve the quality and reliability of pictures to a certain extent; with the development of science and technology, picture encoding is also more and more widely used in fields such as video conferencing, remote monitoring, and video media;
[0003] However, with the increasingly wide application of picture encoding in fields such as video conferencing, remote monitoring, and video media, the encoding efficiency of related terminal devices is low, resulting in picture jitter and slow picture buffering; therefore, how to improve the encoding efficiency of related terminal devices is a problem that we need to solve. For this reason, a method for picture encoding and processing based on 5G signals is provided. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method for picture encoding and processing based on 5G signals.
[0005] The purpose of the present invention can be achieved through the following technical solutions: A method for picture encoding and processing based on 5G signals includes the following steps:
[0006] Step S1: Obtain the analog picture to be encoded, preprocess the obtained analog picture, and perform sampling and quantization according to the results of the preprocessing;
[0007] Step S2: Analyze the sampled picture to determine whether to perform fragmentation processing on it;
[0008] Step S3: Perform fragmentation processing on the picture that needs to be fragmented, and judge the network transmission status and device performance of the terminal device, and set its predictive coding threshold;
[0009] Step S4: Obtain the encoding tasks of related terminal devices, compare and analyze the obtained predictive coding threshold and encoding tasks, determine whether it is necessary to transmit the corresponding picture to the remote server for picture encoding and processing, and allocate the encoding tasks;
[0010] Step S5: Perform picture encoding processing on the allocated encoding tasks, and transmit the digital signals after picture encoding processing;
[0011] Step S6: Receive the transmitted digital signals and decode them.
[0012] Further, the process of obtaining the simulated picture to be encoded and preprocessing the obtained simulated picture includes:
[0013] Collect the picture data generated by relevant terminal devices, record the collected picture data as a simulated picture, obtain each pixel point of the simulated picture, obtain the gray value of the corresponding pixel point, sum the gray values of the corresponding pixel point and its surrounding pixel points through a filter, obtain the average gray value of this pixel point according to the total number of pixel points in the filter, replace the gray value of the corresponding pixel point in the original picture with the obtained average gray value, and perform noise reduction processing on this simulated picture.
[0014] Further, the process of sampling and quantifying it according to the result of preprocessing includes:
[0015] Convert the simulated picture obtained through preprocessing into a continuous signal, and process the obtained continuous signal; set a function model regarding the continuous signal and the sampling frequency, input the continuous signal of this simulated picture into the corresponding function model to obtain its sampling frequency, sample the corresponding continuous signal according to the obtained sampling frequency; obtain the corresponding sampling points and number each sampling point; quantize the sampling signal passing through the sampling points, and obtain the digital signal of this simulated picture through quantization.
[0016] Further, the process of analyzing the sampled picture and judging whether to perform slicing processing on it includes:
[0017] Obtain the numbers of each sampling point of the continuous signal, obtain the total sampling value according to the numbers of the sampling points, obtain the size of this simulated picture, set a corresponding slicing threshold according to the obtained total sampling value and size, and the slicing threshold is set with a sampling threshold and a size threshold; when the total sampling value is greater than the sampling threshold or the size is greater than the size threshold, it is judged that this picture needs to be sliced; when the total sampling value is less than or equal to the sampling threshold and the size is less than or equal to the size threshold, it is judged that this picture does not need to be sliced.
[0018] Further, the process of slicing the picture that needs to be sliced, judging the network transmission status and device performance of the terminal device, and setting its prediction coding threshold includes:
[0019] Convert the analog image to be segmented into a grayscale image through grayscale conversion, obtain the corresponding binary image according to the grayscale image, perform feature detection on the obtained binary image to obtain the corresponding feature information, obtain the total sampling value of the image data, set the segmentation length according to the total sampling value, and the segmentation length is the digital signal length corresponding to the number of sampling points in the corresponding image; correspond the feature information of the obtained analog image with the digital signal to obtain the corresponding feature signal; obtain the digital signal within the corresponding number of sampling points according to the set segmentation length, and determine whether there is a corresponding feature signal in the obtained digital signal. If the corresponding feature signal is not obtained, extend the segmentation length, record the digital signal corresponding to the segmentation length as the segmentation area, and number it; repeat the above operations on the remaining digital signals; until the segmentation of the digital signal is completed;
[0020] Obtain the network bandwidth and processing speed of the corresponding terminal device; perform analysis and processing on the obtained network bandwidth and processing speed to obtain the prediction coding threshold of the terminal device, and the prediction coding threshold is the maximum processing value that can be encoded by the corresponding terminal device at the current moment; set a prediction analysis model corresponding to the coding threshold of the terminal device in the corresponding situation according to the network bandwidth and processing speed; map the obtained network bandwidth and processing speed into the prediction analysis model to obtain the corresponding prediction coding threshold.
[0021] Further, obtain the coding tasks of the relevant terminal devices, perform a comparative analysis on the obtained prediction coding threshold and the coding tasks, and determine whether it is necessary to transmit the corresponding image to the remote server for image coding and processing. The process of allocating the coding tasks includes:
[0022] Register the digital signals that need to be encoded by the terminal device, and record the registration result as the coding task. The coding task is the total sum of the digital signals corresponding to the image data that needs to be encoded. Obtain the coding task and the prediction coding threshold corresponding to the current moment of the terminal device, and determine the relationship between the coding task and the prediction coding threshold. When the coding task is less than or equal to the prediction coding threshold, the terminal device encodes the relevant digital signals. When the coding task is greater than the prediction coding threshold, analyze and process the relevant digital signals in the coding task; obtain the digital signals in the coding task that have not been segmented and send them to the remote server until the coding task is less than or equal to the prediction coding threshold, and stop sending the corresponding digital signals.
[0023] Further, the process of performing image coding processing on the allocated coding tasks and transmitting the digital signals after image coding processing includes:
[0024] The terminal device performs encoding processing on the remaining digital signals in the encoding task, determines whether the corresponding digital signals have been segmented, where a corresponding thread pool is set up. Multiple threads are set in the thread pool, and each thread encodes the relevant digital signals simultaneously. When the obtained digital signals have been segmented, each thread in the thread pool encodes the relevant segmented areas, obtains the numbers of the relevant segmented areas, and integrates the segmented areas that have completed encoding according to them. When the obtained digital signals have not been segmented, they are directly encoded;
[0025] The remote server receives the relevant digital signals through 5G signal transmission, performs encoding processing on the obtained digital signals, and transmits the encoded digital signals through the 5G network.
[0026] Further, the process of receiving the transmitted digital signals and decoding them includes:
[0027] Receive the transmitted digital signals, decode the received digital signals, and obtain the corresponding picture data.
[0028] Compared with the prior art, the beneficial effects of the present invention are as follows: converting the corresponding picture data into corresponding digital signals, judging whether to segment them according to the size and sampling frequency of the digital signals, segmenting the over-large digital signals, which to a certain extent improves the encoding efficiency in the encoding process; in addition, by monitoring the network transmission status and processing speed of the terminal device, obtaining its predicted encoding threshold, and judging whether to allocate its encoding task by the remote server, the encoding efficiency is also improved to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is the schematic diagram of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0030] As Figure 1 shown, a picture encoding and processing method based on 5G signals includes the following steps:
[0031] Step S1: Obtain the analog picture to be encoded, preprocess the obtained analog picture, and perform sampling and quantization according to the preprocessing result;
[0032] Step S2: Analyze the sampled picture and judge whether to segment it;
[0033] Step S3: Segment the picture that needs to be segmented, judge the network transmission status and device performance of the terminal device, and set its predicted encoding threshold;
[0034] Step S4: Obtain the encoding tasks of relevant terminal devices, compare and analyze the obtained prediction encoding thresholds and the encoding tasks, determine whether it is necessary to transmit the corresponding pictures to the remote server for picture encoding and processing, and allocate the encoding tasks;
[0035] Step S5: Perform picture encoding processing on the allocated encoding tasks, and transmit the digital signals after the picture encoding processing;
[0036] Step S6: Receive the transmitted digital signals and decode them;
[0037] It should be further noted that in the specific implementation process, the process of obtaining the analog pictures to be encoded, preprocessing the obtained analog pictures, and sampling and quantifying them according to the results of the preprocessing includes:
[0038] Set up a picture encoding system, which is used to encode the pictures to be transmitted generated by relevant terminal devices, transmit them after completing the encoding process, and decode them after completing the transmission. Its specific implementation process includes:
[0039] The picture encoding system is provided with a picture acquisition module, a picture preprocessing module, and a sampling processing module;
[0040] The picture acquisition module is used to acquire the picture data generated by relevant terminal devices, record the acquired picture data as analog pictures, and send the analog pictures to the picture preprocessing module;
[0041] The picture preprocessing module is used to preprocess the acquired analog pictures. Its specific implementation process includes:
[0042] The picture preprocessing module is provided with a data preprocessing unit and a data acquisition unit;
[0043] The data preprocessing unit is used to preprocess the obtained analog pictures. Its specific implementation process includes:
[0044] The data preprocessing unit performs noise reduction processing on the obtained analog pictures respectively;
[0045] The data preprocessing unit obtains the pixel values of the simulated image, performs filtering processing on the simulated image according to the obtained pixel values, and reduces the noise of the simulated image through the filtering processing; sets a corresponding filter according to the obtained pixel values, obtains each pixel point of the simulated image, sums the gray values of the corresponding pixel position and the surrounding pixels in the filter, divides the obtained sum by the total number of pixel values in the filter, obtains the average gray value of the pixel point, and replaces the gray value of the corresponding pixel point in the original image with the obtained average gray value; for the edge pixels of the simulated image, use a smaller filter to complete the above operations to reduce the noise of the simulated image;
[0046] The data acquisition unit is used to obtain the parameter information of the relevant simulated image during the processing process. During the process of the data preprocessing unit processing the simulated image, it obtains the pixel values and size information of the simulated image; stores the obtained pixel values and size information;
[0047] The sampling processing module is used to perform sampling processing on the simulated image preprocessed by the image preprocessing module. Its specific implementation process includes:
[0048] Obtain the simulated image after noise reduction processing; the sampling processing module analyzes and processes the obtained simulated image, converts the simulated image obtained after preprocessing into a continuous signal, and processes the obtained continuous signal; a function model regarding digital signals and sampling frequencies is set in the sampling processing module. By inputting the continuous signal corresponding to the simulated image into the corresponding function model, its sampling frequency is obtained, and the corresponding continuous signal is sampled according to the obtained sampling frequency; obtain the corresponding sampling points, and number each sampling point; quantize the sampling signal passing through the sampling points; obtain the digital signal of the simulated image after quantization;
[0049] It should be further noted that in the specific implementation process, the process of analyzing the sampled image to determine whether to perform slicing processing includes:
[0050] A picture slicing module is set in the picture encoding system, and a picture analysis unit is set in the picture slicing module. The picture analysis unit is used to analyze and process the digital signal obtained after quantization to determine whether to perform slicing processing on it. Its specific implementation process includes:
[0051] The picture analysis unit obtains the corresponding sampling points in the digital signal and obtains their total sampling value; the picture analysis unit obtains the size of the picture obtained by the data acquisition unit; a corresponding segmentation threshold is set according to the obtained total sampling value and size, and a sampling threshold and a size threshold are set in the segmentation threshold; the picture analysis unit determines whether to perform segmentation processing on it according to the obtained sampling points and picture size;
[0052] When the total sampling value is greater than the sampling threshold or the size is greater than the size threshold, it is determined that the picture needs to be segmented;
[0053] When the total sampling value is less than or equal to the sampling threshold and the size is less than or equal to the size threshold, it is determined that the picture does not need to be segmented;
[0054] It should be further noted that in the specific implementation process, the process of segmenting the picture that needs to be segmented and determining the network transmission status and device performance of the terminal device and setting its prediction coding threshold includes:
[0055] The picture segmentation module is also provided with a picture segmentation unit, and the picture segmentation unit is used to segment the digital signal that needs to be segmented according to the result obtained by the picture analysis unit. The specific implementation process includes:
[0056] The picture segmentation unit converts the analog picture that needs to be segmented into a grayscale picture through grayscale conversion, obtains a corresponding binary picture according to the grayscale picture, performs feature detection on the obtained binary picture to obtain corresponding feature information, corresponds the feature information of the obtained analog picture with the digital signal to obtain corresponding feature signals; obtains the corresponding digital signal, analyzes and processes the corresponding data according to the corresponding digital information and feature signals, obtains the total sampling value of the digital signal, sets the segmentation length according to the total sampling value, and the segmentation length is the digital signal length corresponding to the number of sampling points in the corresponding picture; obtains the digital signal within the corresponding number of sampling points according to the set segmentation length, determines whether there is a corresponding feature signal in the obtained digital signal, if the corresponding feature signal is not obtained, then extends the segmentation length, records the digital signal within the segmentation length as the segmentation area, and numbers it; repeats the above operations on the remaining digital signals; until the segmentation of the digital signal is completed;
[0057] The picture coding system is provided with a device processing module for monitoring relevant terminal devices; the device processing module is provided with a device monitoring unit and a device analysis unit;
[0058] The device monitoring unit is used to monitor and analyze the network transmission status and device performance of relevant terminal devices. A monitoring device for the terminal device is provided in the device monitoring unit. The monitoring device is used to monitor the network bandwidth corresponding to the terminal device during the transmission process and send the obtained network bandwidth to the device analysis unit. The device monitoring unit is also used to analyze and process the relevant device performance, obtain the speed of the terminal device when processing relevant data, and send the obtained processing speed to the device analysis unit;
[0059] The device analysis unit obtains the network bandwidth and processing speed corresponding to the terminal device sent by the device monitoring unit; analyzes and processes them to judge the prediction coding threshold corresponding to the terminal device at this moment. The prediction coding threshold is the maximum processing value that the corresponding terminal device can perform coding at the current moment;
[0060] The device analysis unit sets a prediction analysis model corresponding to the coding threshold of the terminal device in the corresponding situation according to the network bandwidth and processing speed; maps the obtained network bandwidth and processing speed into the prediction analysis model to obtain the corresponding prediction coding threshold;
[0061] It should be further noted that in the specific implementation process, the process of obtaining the coding task of the relevant terminal device, comparing and analyzing the obtained prediction coding threshold and the coding task, and judging whether it is necessary to send the corresponding digital signal to the remote server for picture coding and processing and allocating the coding task includes:
[0062] A corresponding task allocation module is provided in the picture coding system. The task allocation module obtains the prediction coding threshold obtained by the corresponding terminal device; obtains the sharding areas corresponding to each digital signal obtained by the picture sharding unit. Its specific implementation process includes:
[0063] Register the digital signals that need to be encoded, and record the registration result as the coding task. The coding task is the sum of the digital signals corresponding to the picture data that needs to be encoded. According to the corresponding sum of the data signals; obtain the coding task and prediction coding threshold corresponding to the terminal device at the current moment, judge the relationship between the coding task and the prediction coding threshold. When the coding task is less than or equal to the prediction coding threshold, the corresponding terminal device performs coding processing on the relevant picture data; when the coding task is greater than the prediction coding threshold, mark the coding task;
[0064] The task allocation unit obtains the relevant content in the marked encoding task, obtains the digital signals in the encoding task that have not been segmented, and sends them to the remote server until the encoding task is less than or equal to the predicted encoding threshold, at which point the relevant digital signals stop being sent; the remote server encodes the received digital signals; and the terminal device encodes the remaining digital signals in the encoding task.
[0065] It should be further noted that, in the specific implementation process, the process of performing picture encoding processing on the allocated encoding task and transmitting the digital signals after picture encoding processing includes:
[0066] The remote server receives the relevant digital signals through 5G signal transmission, performs encoding processing on the obtained digital signals, and transmits the digital signals after encoding processing through the 5G network.
[0067] The terminal device performs encoding processing on the remaining digital signals in the encoding task, determines whether the corresponding digital signals have been segmented. A corresponding thread pool is set up, and multiple threads are set in the thread pool. Each thread encodes the relevant digital signals simultaneously. When the obtained digital signals have been segmented, each thread in the thread pool encodes the relevant segmented areas, obtains the numbers of the relevant segmented areas, and integrates the segmented areas that have completed encoding according to them. When the obtained digital signals have not been segmented, they are directly encoded.
[0068] It should be further noted that, in the specific implementation process, the process of receiving the transmitted digital signals and decoding them includes:
[0069] Receive the transmitted digital signals, decode the received digital signals, and obtain the corresponding picture data.
[0070] The above embodiments are only used to illustrate the technical method of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical method of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A picture coding processing method based on 5G signals, characterized in that: The following steps are involved: Step S1: obtaining a simulated image to be encoded, preprocessing the obtained simulated image, and sampling and quantizing the image according to the preprocessing result; Step S2: Analyze the sampled image to determine whether to perform segmentation processing on it; Step S3: Slice the image that needs to be sliced, determine the network transmission status and device performance of the terminal device, and set its prediction coding threshold; Step S4: Obtain the encoding task of the relevant terminal device, compare and analyze the obtained prediction encoding threshold and the encoding task, determine whether the corresponding picture needs to be transmitted to the remote server for picture encoding processing, and allocate the encoding task; Step S5: performing picture encoding processing on the assigned encoding task, and transmitting the digital signal after the picture encoding processing; Step S6: receiving the transmitted digital signal and decoding it; The process of obtaining the simulated image to be encoded and preprocessing the obtained simulated image includes: Collecting image data generated by relevant terminal devices, and recording the collected image data as simulated images; The process of sampling and quantizing the preprocessed result includes: Converting the analog image obtained through preprocessing into a continuous signal, and processing the obtained continuous signal; The process of analyzing the sampled image and determining whether to perform fragmentation processing on it includes: Obtain the number of each sampling point of the continuous signal, obtain the total sampling value according to the number of the sampling point, and obtain the size of the simulated image; The process of performing slice processing on the picture that needs to be sliced, judging the network transmission status and device performance of the terminal device, and setting the prediction coding threshold thereof includes: The analog image to be sliced is converted into a grayscale image by grayscale conversion, a corresponding binary image is obtained according to the grayscale image, feature detection is performed on the obtained binary image to obtain corresponding feature information, the total sampling value of the image data is obtained, and the slice length is set according to the total sampling value, wherein the slice length is the length of the digital signal corresponding to the number of sampling points in the corresponding image; the feature information of the analog image obtained is matched with the digital signal to obtain the corresponding feature signal; the digital signal within the corresponding number of sampling points is obtained according to the set slice length, and it is determined whether there is a corresponding feature signal in the obtained digital signal; if the corresponding feature signal is not obtained, the slice length is extended, and the digital signal corresponding to the slice length is recorded as a slice area, and the slice area is numbered; the above operation is repeated for the remaining digital signals; until the slice processing of the digital signal is completed; Acquire the network bandwidth and processing speed of the corresponding terminal device; analyze and process the obtained network bandwidth and processing speed to obtain a predicted coding threshold of the terminal device, wherein the predicted coding threshold is a predicted maximum processing value that the corresponding terminal device can encode at the current moment; set a prediction analysis model corresponding to the coding threshold of the terminal device under the corresponding situation according to the network bandwidth and processing speed; map the obtained network bandwidth and processing speed to the prediction analysis model to obtain the corresponding predicted coding threshold.
2. According to the method for image coding based on 5G signals according to claim 1, it is characterized in that: Get each pixel of the simulated image, get the grayscale value of the corresponding pixel, sum the grayscale values of the corresponding pixel and its surrounding pixels through a filter, get the average grayscale value of the pixel according to the total number of pixels in the filter, replace the grayscale value of the corresponding pixel in the original image with the obtained average grayscale value, and perform noise reduction on the simulated image.
3. According to the method for image coding based on 5G signal in claim 2, it is characterized in that: A function model related to a continuous signal and a sampling frequency is provided, and the continuous signal of the simulated image is input into the corresponding function model to obtain its sampling frequency, and the corresponding continuous signal is sampled according to the obtained sampling frequency; The corresponding sampling points are obtained and each sampling point is numbered; the sampling signal passing through the sampling point is quantized, and the digital signal of the analog image is obtained through quantization.
4. The image coding processing method based on 5G signals according to claim 3 is characterized in that: A corresponding fragmentation threshold is set according to the obtained total sampling value and size, wherein the fragmentation threshold includes a sampling threshold and a size threshold; when the total sampling value is greater than the sampling threshold or the size is greater than the size threshold, it is determined that the image needs to be fragmented; When the total sampling value is less than or equal to the sampling threshold and the size is less than or equal to the size threshold, it is determined that the image does not need to be fragmented.
5. According to the method for image coding based on 5G signal in claim 4, it is characterized in that: The process of obtaining the encoding task of the relevant terminal device, comparing and analyzing the obtained prediction encoding threshold and the encoding task, judging whether the corresponding picture needs to be transmitted to the remote server for picture encoding processing, and allocating the encoding task includes: The digital signal that needs to be encoded by the terminal device is registered, and the registration result is recorded as a coding task, where the coding task is the sum of the digital signals corresponding to the picture data that needs to be encoded, the coding task and the predicted coding threshold corresponding to the terminal device at the current moment are obtained, and the relationship between the coding task and the predicted coding threshold is determined. When the coding task is less than or equal to the predicted coding threshold, the terminal device encodes the relevant digital signal, and when the coding task is greater than the predicted coding threshold, the relevant digital signal in the coding task is analyzed and processed; the digital signal that has not been fragmented in the coding task is obtained and sent to the remote server until the coding task is less than or equal to the predicted coding threshold, and the corresponding digital signal is stopped from being sent.
6. The method for image coding based on 5G signals according to claim 5, characterized in that: The process of performing picture encoding processing on the assigned encoding task and transmitting the digital signal after picture encoding processing includes: The terminal device encodes the remaining digital signals in the encoding task, and determines whether the corresponding digital signals have been processed by sharding, wherein a corresponding thread pool is provided, and a plurality of threads are provided in the thread pool, and each thread encodes the relevant digital signals at the same time. When the acquired digital signal has been processed by sharding, each thread in the thread pool encodes the relevant sharding area, obtains the number of the relevant sharding area, and integrates the sharding areas that have completed the encoding according to the number of the relevant sharding area. When the acquired digital signal has not been processed by sharding, it is directly encoded; The remote server receives relevant digital signals through 5G signal transmission, encodes the obtained digital signals, and transmits the encoded digital signals through the 5G network.
7. The method for image coding based on 5G signals according to claim 6, characterized in that: The process of receiving the transmitted digital signal and decoding it includes: The transmitted digital signal is received, the received digital signal is decoded, and the corresponding picture data is obtained.
Citation Information
Patent Citations
Image processing method, terminal and server
CN109327699A
Method and device for generating data representing a degree of importance of data blocks and method and device for transmitting a coded video sequence
US20070195880A1
Network feedback-based video encoding method, apparatus and device, and storage medium
WO2022152137A1