Method and device for recovering compressed image

By evaluating and matching image quality factors, analyzing equipment performance, and adjusting image processing equipment, the problem of image recovery quality degradation in complex communication environments is solved, and the performance and recovery quality improvement of image processing equipment are achieved.

CN119324995AActive Publication Date: 2025-01-17INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411865308.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-01-17
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In complex communication environments, the reliability of transmitted data is affected, resulting in a decline in image recovery quality. The existing technology has a disconnect between image processing equipment and algorithm optimization, which cannot effectively improve image recovery quality.

Method used

By evaluating the image quality factor of the compressed image set, matching the image recovery data set, and collecting process parameters of the image processing equipment under complex communication conditions, analyzing the performance adaptation index, and performing equipment adjustments to improve the performance and recovery capabilities of the image processing equipment under the conditions of complex communication, the performance adaptation index is analyzed, and the equipment adjustment is carried out to improve the performance and recovery capabilities of the image processing equipment. .

Benefits of technology

Effectively match and optimize the recovery process, improve image quality, improve the overall performance and processing capabilities of image processing equipment, and ensure the reliability and efficiency of image recovery in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324995A_ABST
    Figure CN119324995A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for recovering a compressed image. Comprising the steps of evaluating an image quality factor of a compressed image set based on an image performance parameter of the compressed image set, and matching an image recovery data set from an image database based on the image quality factor; under the complex communication condition, collecting process parameters of the image processing equipment executing the image recovery data set; analyzing a performance adaptation index of the image processing equipment based on the process parameters; performing difference processing on the performance adaptation index and a performance adaptation threshold to obtain a performance adaptation index difference, and matching the performance adaptation index difference with an equipment adjustment set corresponding to each performance adaptation index difference interval in an image database to obtain an equipment adjustment set; and executing the device adjustment set to perform adjustment feedback on the image device to obtain a target image device, and inputting the compressed image set under the complex communication condition into the target image device for image restoration. The method can effectively improve the recovery quality of the compressed image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a method and device for restoring a compressed image. Background Art

[0002] With the rapid development of information technology, the amount of image data has increased dramatically, putting higher requirements on storage and transmission efficiency. However, traditional methods are unable to cope with noise interference, bandwidth limitations and real-time requirements. Especially in complex communication environments, the reliability of data transmission is seriously affected, resulting in a decrease in image restoration quality.

[0003] Existing communication image processing technology is overly focused on the algorithm optimization of image compression and restoration, but the applied image processing equipment still lags behind. As a result, in actual applications, the image processing equipment may not be able to maintain the same demand level as the algorithm optimization of image compression and restoration, so that the image restoration quality still cannot be effectively improved. Summary of the invention

[0004] The present invention provides a method and device for restoring a compressed image, so as to solve the problem that the reliability of data transmission is seriously affected in a complex communication environment, resulting in a decrease in the quality of image restoration.

[0005] According to one aspect of the present invention, there is provided a method for restoring a compressed image, comprising:

[0006] evaluating an image quality factor of the compressed image set based on an image performance parameter of the compressed image set, and matching an image restoration data set of the compressed image set from an image database based on the image quality factor;

[0007] Under complex communication conditions, collecting first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image;

[0008] Analyzing a performance adaptation index of the image processing device based on the first process parameter and the second process parameter;

[0009] Performing difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device;

[0010] The device adjustment set is executed to adjust and feedback the image device to obtain a target image device, and a compressed image set under complex communication conditions is input into the target image device for image restoration.

[0011] According to another aspect of the present invention, there is provided a compressed image recovery device, comprising:

[0012] A first matching module, configured to evaluate an image quality factor of the compressed image set based on an image performance parameter of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor;

[0013] A collecting module, used for collecting, under complex communication conditions, a first process parameter of the image processing device executing the image restoration data set and a second process parameter of the image processing device restoring the demonstration image;

[0014] An analysis module, configured to analyze a performance adaptation index of an image processing device based on the first process parameter and the second process parameter;

[0015] A second matching module is used to perform difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and match the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device;

[0016] The feedback module is used to execute the device adjustment set to adjust the image device to obtain a target image device, and input the compressed image set under complex communication conditions into the target image device for image restoration.

[0017] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0018] at least one processor;

[0019] and a memory communicatively coupled to the at least one processor;

[0020] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method for restoring a compressed image according to any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the compressed image restoration method described in any embodiment of the present invention when executed.

[0022] The technical solution of the embodiment of the present invention can effectively match the image restoration data set of the compressed image set by analyzing the image performance parameters of the compressed image set, thereby ensuring that the restoration process can be optimized for specific compressed image characteristics, thereby improving the quality of the restored image, and then by collecting the execution process parameters of the image processing device under complex communication conditions, the performance adaptation index of the image processing device is analyzed, and then the image processing device can be adjusted and fed back to improve the overall performance and image processing capabilities of the image processing device.

[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic flow chart of a method for restoring a compressed image provided in Embodiment 1 of the present invention;

[0026] Figure 2 A schematic flow chart of a method for restoring a compressed image provided in Embodiment 2 of the present invention;

[0027] Figure 3 A schematic diagram of a gray value probability change rate curve of a sampled compressed image provided in the second embodiment of the present invention;

[0028] Figure 4 A schematic flow chart of a method for restoring a compressed image provided in Embodiment 3 of the present invention;

[0029] Figure 5 A schematic flow chart of a method for restoring a compressed image provided in Embodiment 4 of the present invention;

[0030] Figure 6 A schematic diagram of the structure of a compressed image recovery device provided in Embodiment 5 of the present invention;

[0031] Figure 7 The present invention is a schematic structural diagram of an electronic device for a method for restoring a compressed image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should belong to the scope of protection of the present invention. It should be understood that the various steps recorded in the method implementation of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0037] Embodiment 1

[0038] Figure 1A flow chart of a compressed image recovery method provided in Embodiment 1 of the present invention is provided. The method can be applied to the situation of recovering compressed images under complex communication conditions. The method can be executed by a compressed image recovery device, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computer equipment.

[0039] like Figure 1 As shown, a method for restoring a compressed image provided by Embodiment 1 of the present invention includes the following steps:

[0040] S110 . Evaluate an image quality factor of the compressed image set based on image performance parameters of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor.

[0041] Among them, the compressed image set may include at least one compressed image, and there is no restriction on the type and application scenario of the compressed image; the image performance parameters of the compressed image set may include grayscale value, grayscale value probability change curve, and parameters such as the width of each sampling edge, and no specific restrictions are made here.

[0042] The compressed image set can be uploaded to the image processing device through the interface and breakpoint resumption. When receiving the compressed image set, the image processing device background can choose to receive it offline or online, and supports online reception of the compressed image set in the background and timely recovery.

[0043] It should be noted that the image quality factor of the compressed image set is a numerical value used to determine the image clarity of the compressed image set. When the grayscale variance is small, it indicates that the grayscale value distribution in the compressed image is relatively concentrated, resulting in insufficient details and textures of the compressed image, blurred edges, and significantly increased edge width compared to the average width of the reference edge. At the same time, the slow change of the grayscale value exacerbates the blur of the image, causing the average grayscale value to change at a lower rate with spatial position, that is, the average rate of change of the grayscale value probability is small. These effects are interrelated and together reduce the clarity and visual effect of the compressed image, making the boundaries of objects in the image unclear, details lost, and the overall appearance smooth and blurred, which results in the image set being relatively blurred and of low quality. Therefore, it provides a key data basis for restoring compressed images, which helps to accurately reconstruct image details and improve image clarity.

[0044] In this embodiment, the evaluation process of the image quality factor of the compressed image set includes: calculating the grayscale variance of each sampled compressed image, the grayscale value probability change rate curve of each sampled compressed image, the average edge width of each sampled compressed image, and the reference edge average width preset in the image database based on the image performance parameters of the compressed image; and comprehensively analyzing the grayscale variance, the grayscale value probability average change rate, the average edge width, and the reference edge average width preset in the image database to determine the image quality factor of the compressed image set.

[0045] It should be noted that each sampled compressed image is obtained by extracting image samples from a compressed image set. Since there are a large number of compressed images in the compressed image set, with an average of 10.1 million images per day, analyzing all images in the compressed image set will increase the data processing burden, so sample extraction is required.

[0046] In this embodiment, the image quality factors of the compressed image set are matched with image restoration data sets corresponding to each image quality factor interval stored in the image database, thereby obtaining the image restoration data set of the compressed image set.

[0047] Exemplarily, assuming that the image quality factor of the compressed image set is K, in the image quality factor interval [K-15%, K+5%] stored in the image database, the processing process of the image restoration data set corresponding to the image quality factor interval [K-15%, K+5%] includes: realizing image restoration through the inverse filtering algorithm and the Wiener filtering algorithm, and realizing restored image enhancement through the grayscale transformation principle and the histogram processing principle.

[0048] Specifically, the inverse filtering algorithm is used to perform preliminary restoration of the image and eliminate degradation factors such as blur; the Wiener filtering algorithm is used to further improve the image quality (especially when processing noisy images); the image is enhanced through the grayscale transformation principle and histogram processing principle to adjust its contrast and brightness, making the image details clearer and the overall visual effect better.

[0049] S120. Under complex communication conditions, collect first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image.

[0050] The image processing device execution process parameters include remaining memory, total traffic used, CPU utilization, image recovery time and other parameters, which are not specifically limited here.

[0051] The image processing device executing the image restoration data set can be understood as the image processing device calling and executing the algorithm involved in the image restoration data set.

[0052] The demonstration image refers to a specific image used to demonstrate, verify or test the recovery capability of an image processing device, and may be a compressed image in a compressed image set.

[0053] In this embodiment, by analyzing the execution process parameters of the image processing device and further adjusting and feeding back the image processing device, the performance bottleneck of the image processing device can be discovered in a timely manner and adjustments can be made, such as releasing the cache, etc., thereby significantly improving the speed and efficiency of the image processing device in processing and restoring images, while enhancing the stability and reliability of the image processing device.

[0054] S130: Analyze a performance adaptation index of the image processing device based on the first process parameter and the second process parameter.

[0055] Specifically, the performance adaptation index of the image processing device is obtained by comprehensive analysis of the amount of free memory of the image processing device at the end of the execution monitoring cycle, the total traffic used during the execution monitoring cycle, the average network transmission rate of the image processing device during the execution monitoring cycle, the CPU utilization of the image processing device during the execution monitoring cycle, and the image recovery deviation duration.

[0056] Among them, the amount of free memory of the image processing device at the end time point of the monitoring cycle is calculated based on the remaining memory of the image processing device at the start time point of the monitoring cycle extracted from the first process parameter, as well as the memory occupancy of the compressed image set and the memory occupancy of the image restoration data set.

[0057] Among them, the total traffic used during the execution monitoring period, the average network transmission rate of the image processing device during the execution monitoring period, and the CPU utilization rate of the image processing device during the execution monitoring period are obtained from the first process parameter.

[0058] The image recovery deviation duration of the image processing device during the execution monitoring cycle is calculated based on the image recovery duration of the demonstration image belonging to the image processing device during the execution monitoring cycle extracted from the second process parameter.

[0059] S140, performing difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device.

[0060] Among them, the performance adaptation threshold represents the minimum value of the reasonable range of the performance adaptation index of the image processing device, which can be extracted from the image database; the rules and values ​​corresponding to the device adjustment set corresponding to each performance adaptation index difference interval are formulated by the device operation administrator based on the historical operation of the image processing device.

[0061] Exemplarily, assuming that the performance adaptation index difference of the image processing device is D, in the performance adaptation index difference interval [D-20%, D+40%] stored in the image database, the device adjustment set corresponding to the performance adaptation index difference interval [D-20%, D+40%] includes: automatically cleaning up expired cache data, using the access frequency index to evaluate the effectiveness of the cache data, and then cleaning up the data with an access frequency lower than the set access frequency threshold, selecting a CPU scheduling strategy such as priority scheduling based on the CPU usage analysis results, and then setting the image recovery process priority to the highest priority, monitoring the execution of the cache priority strategy to ensure that high-priority tasks can obtain the required cache resources first, then the device adjustment set of the image processing device includes the above conditions.

[0062] It should be explained that the device adjustment set includes cache management optimization, hardware resource optimization, and system monitoring of the image processing device. Combining the above optimization measures, the device adjustment set can significantly improve the overall performance of the image processing device.

[0063] S150, executing the device adjustment set to adjust the image device and provide feedback to obtain a target image device, and inputting the compressed image set under complex communication conditions into the target image device for image restoration.

[0064] In this embodiment, when the performance adaptation index of the image processing device is greater than or equal to the performance adaptation threshold, visual feedback of successful adjustment is performed, that is, the image processing device visually pops up a box saying "Next, perform the recovery operation of the compressed image set", thereby continuing to restore the image of the compressed image set under complex communication conditions.

[0065] A method for restoring a compressed image provided in a first embodiment of the present invention comprises the following steps: first, evaluating an image quality factor of a compressed image set based on image performance parameters of the compressed image set, and matching an image restoration data set of the compressed image set from an image database based on the image quality factor; secondly, collecting a first process parameter of an image processing device executing the image restoration data set and a second process parameter of the image processing device restoring a demonstration image under complex communication conditions; then analyzing a performance adaptation index of the image processing device based on the first process parameter and the second process parameter; then performing difference processing on the performance adaptation index and a performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device; finally, executing the device adjustment set to adjust and feedback the image device to obtain a target image device, and inputting the compressed image set under complex communication conditions into the target image device for image restoration. By analyzing the image performance parameters of the compressed image set, the above method can effectively match the image restoration data set of the compressed image set, ensuring that the restoration process can be optimized for specific compressed image characteristics, thereby improving the quality of the restored image. By collecting the execution process parameters of the image processing device under complex communication conditions, the performance adaptation index of the image processing device can be analyzed, and then the image processing device can be adjusted and fed back to improve the overall performance and image processing capabilities of the image processing device.

[0066] Embodiment 2

[0067] Figure 2 This is a flow chart of a method for restoring a compressed image provided by Embodiment 2 of the present invention. Embodiment 2 is optimized on the basis of the above embodiments. For details not yet provided in this embodiment, please refer to Embodiment 1.

[0068] like Figure 2 As shown, a method for restoring a compressed image provided by Embodiment 2 of the present invention includes the following steps:

[0069] S210 , extracting the grayscale value of each pixel point of each sampled compressed image from the image performance parameters of the compressed image set, and calculating the grayscale variance of each sampled compressed image.

[0070] Among them, the grayscale value of each pixel belonging to each sampled compressed image is obtained by using an image processing library such as OpenCV or Pillow library to read each sampled compressed image file (if the image is not a grayscale image, it is first converted into a grayscale image through the grayscale_img function), and the grayscale value of each pixel is obtained through functions such as gray_image.

[0071] In this embodiment, the grayscale value of each pixel belonging to each sampled compressed image is extracted from the image performance parameters of the compressed image set, and the grayscale mean of the pixel points belonging to each sampled compressed image is obtained by mean processing. The grayscale value of each pixel point belonging to each sampled compressed image and the grayscale mean of the pixel points belonging to the corresponding sampled compressed image are subjected to difference processing, and the results of the difference processing are squared and accumulated in turn, and the accumulated result is divided by the total number of pixels belonging to each sampled compressed image, thereby obtaining the grayscale variance of each sampled compressed image.

[0072] S220, extracting the gray value probability change curve of each sampled compressed image from the image performance parameters of the compressed image set, and obtaining the gray value probability change rate curve of each sampled compressed image after data processing of the gray value probability change curve.

[0073] Among them, the grayscale value probability change rate curve belonging to each sampled compressed image, the specific data processing process is: take the derivative of the grayscale value probability change curve with respect to the horizontal axis (i.e., the grayscale value) to obtain the rate of change of the grayscale value probability, and draw this derivative (i.e., the grayscale value probability change rate) into a curve, thereby obtaining the grayscale value probability change rate curve belonging to each sampled compressed image.

[0074] In this embodiment, the grayscale value probability change curve of each sampled compressed image can be obtained by performing grayscale value statistics on each pixel in each sampled compressed image to obtain the frequency of occurrence of each grayscale value in the image, dividing it by the total number of pixels, thereby calculating the probability of each grayscale value, and then using functions such as plot in Python to draw the grayscale value probability change curve of each sampled compressed image.

[0075] S230, obtaining the grayscale value probability change rate of each sampling detection position point from the grayscale value probability change rate curve, and performing mean processing on the grayscale value probability change rate to obtain the grayscale value probability average change rate of each sampled compressed image.

[0076] In this embodiment, the grayscale value probability change rate of each sampling detection position point is located and obtained from the grayscale value probability change rate curve, the grayscale value probability change rate of each sampling detection position point is averaged, and the mean processing result is marked as the average grayscale value probability change rate of each sampled compressed image.

[0077] For example, Figure 3 A schematic diagram of a gray value probability change rate curve of a sampled compressed image provided in the second embodiment of the present invention is shown in FIG. Figure 3As shown, the horizontal axis represents the gray value probability in percentage, and the vertical axis represents the gray value probability change rate in percentage, which clearly shows the change of the gray value probability. The gray value probability change rate of each sampling detection position point 1 randomly arranged on the gray value probability change rate curve is averaged to obtain the average change rate of the gray value probability of the sampled compressed image.

[0078] S240 , extracting the width of each sampled edge belonging to each sampled compressed image from the image performance parameters of the compressed image set and performing mean processing to obtain the average edge width of each sampled compressed image.

[0079] Among them, the width of each sampled edge belonging to each sampled compressed image is extracted by an edge detection algorithm (such as Canny, etc.), and the extracted edges are refined to obtain edges with a single pixel width. On the refined edges, the gradient direction and normal direction of each edge point are calculated, and points with large gradient changes are searched along the normal direction, and the distance between the two points is measured as the edge width.

[0080] S250, comprehensively analyzing the grayscale variance, the grayscale value probability average change rate, the edge average width, and the reference edge average width preset in the image database to determine the image quality factor of the compressed image set.

[0081] In this embodiment, the image quality factor of the compressed image set is obtained by comprehensive analysis of the grayscale variance, grayscale value probability average change rate, edge average width and reference edge average width of each sampled compressed image, and is a numerical value used to determine the image clarity of the compressed image set.

[0082] Specifically, the calculation formula of the image quality factor of the compressed image set is:

[0083] ;

[0084] Where QVP is the image quality factor of the compressed image set, is the grayscale variance of the dth sampled compressed image, is the average probability change rate of the gray value of the dth sampled compressed image, is the average edge width of the d-th sampled compressed image, is the average width of the reference edge preset in the image database, is the influence factor corresponding to the grayscale variance unit value preset in the image database, is the influence factor corresponding to the unit value of the average gray value probability change rate preset in the image database, and s is the total number of sampled compressed images.

[0085] In this embodiment, is the grayscale variance of the dth sampled compressed image, which is a statistic used to describe the uniformity of image grayscale distribution in digital image processing. It is defined as the ratio of the sum of the squares of the differences between the grayscale values ​​of all pixels in the image and their average grayscale value to the total number of pixels;

[0086] is the average rate of change of gray value probability of the dth sampled compressed image, which refers to the average rate at which the gray value probability in the image changes with the gray value;

[0087] is the average edge width of the dth sampled compressed image, which refers to the average width of the edge area in the image. The edge is where the gray value in the image changes significantly, usually corresponding to the outline and boundary of the object in the image;

[0088] is the reference edge average width preset in the image database, indicating the reference value of the edge average width of the analyzed sampled compressed image;

[0089] The influence factor corresponding to the grayscale variance unit value preset in the image database represents the influence degree of the grayscale variance unit value on the image quality factor of the compressed image set. When used, the influence factor corresponding to the grayscale variance unit value can be directly obtained from the image database. The corresponding relationship can be a preset mapping relationship. For example, the grayscale variance and the influence factor corresponding to the grayscale variance unit value preset in the image database form a mapping set. The real-time grayscale variance is input into the mapping set to obtain the influence factor corresponding to the grayscale variance unit value. The mapping relationship can be one-to-one or many-to-one. In this example, the value range is [0, 1];

[0090] It is the influence factor corresponding to the unit value of the gray value probability average change rate preset in the image database, which represents the influence degree of the unit value of the gray value probability average change rate on the image quality factor of the compressed image set. When used, the influence factor corresponding to the unit value of the gray value probability average change rate can be directly obtained from the image database, and the corresponding relationship can be a preset mapping relationship. For example, the gray value probability average change rate and the influence factor corresponding to the unit value of the gray value probability average change rate preset in the image database form a mapping set, and the real-time gray value probability average change rate is input into the mapping set to obtain the influence factor corresponding to the unit value of the gray value probability average change rate. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].

[0091] d is the number of each sampled compressed image, d={1,2,3,...,s}, and s is the total number of sampled compressed images.

[0092] S260: Match an image restoration data set of the compressed image set from an image database based on the image quality factor.

[0093] S270. Under complex communication conditions, collect first process parameters generated by the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image, and analyze the performance adaptation index of the image processing device based on the first process parameters and the second process parameters.

[0094] S280. Perform difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and match the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device.

[0095] S290, executing the device adjustment set to adjust the image device and provide feedback to obtain a target image device, and inputting the compressed image set under complex communication conditions into the target image device for image restoration.

[0096] A method for restoring a compressed image provided by the second embodiment of the present invention embodies the evaluation process of the image quality factor of a compressed image set. By using this method, the restoration quality of the compressed image can be improved.

[0097] Embodiment 3

[0098] Figure 4 This is a flow chart of a method for restoring a compressed image provided by Embodiment 3 of the present invention. Embodiment 3 is optimized on the basis of the above embodiments. For details not yet detailed in this embodiment, please refer to Embodiment 1 and Embodiment 2.

[0099] like Figure 4 As shown, a method for restoring a compressed image provided by Embodiment 3 of the present invention includes the following steps:

[0100] S310 . Evaluate an image quality factor of the compressed image set based on image performance parameters of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor.

[0101] S320. Under complex communication conditions, collect first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image.

[0102] S330. Extract the remaining memory of the image processing device at the start time of the monitoring cycle from the first process parameter, and add the memory occupancy of the compressed image set and the memory occupancy of the image recovery data set to obtain the estimated memory occupancy; perform difference processing on the remaining memory and the estimated memory occupancy to obtain the free memory of the image processing device at the end time of the detection cycle.

[0103] Among them, the execution monitoring cycle refers to the time period during which the image processing device executes the image recovery data set and monitors the process of restoring the demonstration image. The specific duration is determined by the device performance R&D team. The remaining memory of the image processing device at the start time of the execution monitoring cycle is read from the memory information of the image processing device. The memory usage of the compressed image set and the memory usage of the image recovery data set can be extracted from the file properties of the compressed image set and the image recovery data set.

[0104] S340. Extract the total traffic used by the image processing device during the execution monitoring cycle, the average network transmission rate of the image processing device during the execution monitoring cycle, and the CPU utilization rate of the image processing device during the execution monitoring cycle from the first process parameters.

[0105] Among them, the total traffic used by the image processing device during the execution monitoring period can be monitored by traffic monitoring tools such as a network traffic analyzer; the CPU utilization of the image processing device during the execution monitoring period can be monitored by system performance monitoring tools such as virtual memory statistics; the average network transmission rate of the image processing device during the execution monitoring period can be obtained by monitoring network devices such as routers.

[0106] S350. Extract the image recovery time of the demonstration image belonging to the image processing device during the execution monitoring cycle from the second process parameters, and calculate the absolute value of the difference between the image recovery time and the image recovery reference time to obtain the image recovery deviation time of the image processing device during the execution monitoring cycle.

[0107] The image recovery time of the demonstration image of the image processing device during the execution monitoring cycle can be read from the timestamp log of the image processing device; and the image recovery reference time can be extracted from the image database.

[0108] S360: Perform a comprehensive analysis on the free memory amount, the total traffic used, the average network transmission rate, the CPU utilization rate, and the image recovery deviation time to determine a performance adaptation index of the image processing device.

[0109] Specifically, the calculation formula of the performance adaptation index of the image processing device is:

[0110] ;

[0111] Among them, PFI represents the performance adaptation index of the image processing device, FMA represents the amount of free memory of the image processing device at the end of the execution monitoring cycle, TDU represents the total traffic used by the image processing device during the execution monitoring cycle, UZN represents the CPU utilization of the image processing device during the execution monitoring cycle, DRT represents the image recovery deviation duration of the image processing device during the execution monitoring cycle, and ACV represents the average network transmission rate of the image processing device during the execution monitoring cycle. represents the average transmission rate of the reference network preset in the image database, Indicates the preset minimum amount of free memory required in the image database. Indicates the total reference usage flow preset in the image database. represents the reference CPU utilization preset in the image database, e represents a natural constant, Indicates the impact factor corresponding to the unit value of the preset free memory deviation value in the image database, Indicates the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database.

[0112] In this embodiment, when the amount of free memory of the image processing device is close to or lower than the required minimum amount of free memory, this clearly indicates that the device is in a state of tight memory resources after executing the image recovery data set. Under this tense situation, not only the pressure of memory usage increases significantly, but also under complex network communication conditions, the average network transmission rate of the device may fluctuate significantly, significantly deviating from the reference network transmission average rate. This fluctuation further triggers the phenomenon that the total traffic used deviates significantly from its reference value, and at the same time causes the CPU utilization to deviate significantly from the preset reference level. The changes in this series of performance indicators are intertwined and act together on the overall performance of the image processing device, ultimately resulting in a significant increase in the image recovery deviation time, which seriously affects the speed and efficiency of the device in processing the image recovery task. In particular, under complex communication conditions, this impact is more significant, further highlighting the limited ability of the image processing device in executing the image recovery data set and subsequent image recovery tasks. Therefore, by comprehensively analyzing the above parameters, it is possible to more accurately identify the problems existing in the operation of the image processing device, and formulate effective adjustment strategies accordingly, in order to optimize the device operation status and improve its ability to process image recovery tasks;

[0113] Wherein, FMA is the amount of free memory of the image processing device at the end of the execution monitoring cycle, which refers to the portion of the memory of the image processing device that has not been used after the execution monitoring cycle is completed;

[0114] TDU is the total traffic used by the image processing device during the monitoring cycle, which refers to the total amount of data transmitted through the network by the image processing device during the monitoring cycle.

[0115] UZN is the CPU utilization of the image processing device during the execution monitoring cycle, which refers to the proportion of the CPU occupied by the image processing device during the execution monitoring cycle;

[0116] DRT is the image recovery deviation time of the image processing device during the monitoring cycle, which refers to the deviation between the actual image recovery time and the image recovery reference time when the image processing device performs recovery processing on the demonstration image during the monitoring cycle;

[0117] ACV is the average network transmission rate of the image processing device during the execution monitoring cycle, which refers to the average speed at which the image processing device transmits data through the network during the execution monitoring cycle;

[0118] is a reference network transmission average rate preset in the image database, representing a reference value of the average network transmission rate of the image processing device during the execution monitoring cycle;

[0119] is the minimum amount of free memory required preset in the image database, indicating the minimum value of the amount of free memory of the image processing device at the end time of the monitoring cycle;

[0120] The reference total flow rate preset in the image database represents the reference value of the total flow rate used by the image processing device during the monitoring cycle;

[0121] is a reference CPU utilization preset in the image database, representing a reference value for analyzing the CPU utilization of the image processing device during the execution monitoring cycle;

[0122] e is a natural constant, The impact factor corresponding to the unit value of the free memory deviation value preset in the image database represents the numerical value of the impact degree of the unit value of the free memory deviation value on the performance adaptation index of the image processing device. When used, the impact factor corresponding to the unit value of the free memory deviation value can be directly obtained from the image database. The corresponding relationship can be a preset mapping relationship. For example, the free memory deviation value and the impact factor corresponding to the unit value of the free memory deviation value preset in the image database form a mapping set. The real-time free memory deviation value is input into the mapping set to obtain the impact factor corresponding to the unit value of the free memory deviation value. The mapping relationship can be one-to-one or many-to-one. In this example, the value range is [0, 1];

[0123] It is the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database, which represents the numerical value of the influence degree of the unit value of the image restoration deviation time on the performance adaptation index of the image processing device. When used, the impact factor corresponding to the unit value of the image restoration deviation time can be directly obtained from the image database, and the corresponding relationship can be a preset mapping relationship. For example, the image restoration deviation time and the impact factor of the unit value of the image restoration deviation time preset in the image database on the performance adaptation index of the image processing device form a mapping set, and the real-time image restoration deviation time is input into the mapping set to obtain the impact factor corresponding to the unit value of the image restoration deviation time. The mapping relationship can be one-to-one or many-to-one. In this example, its value range is [0, 1].

[0124] Exemplarily, a table showing changes in the performance adaptation index of an image processing device and its corresponding parameters is shown in Table 1.

[0125] Table 1 Performance adaptation index of image processing equipment and its corresponding parameter changes

[0126]

[0127] Exemplarily, the required minimum free memory is set to 5.8 gigabytes, the reference total traffic is 185 megabytes, the reference CPU utilization is 60%, the reference average network transmission rate is 5 megabits per second, and the value of the impact factor corresponding to the unit value of the free memory deviation value is set to 0.78, and the value of the impact factor corresponding to the unit value of the image recovery deviation time is set to 0.82. It can be seen from Table 1 that under complex communication conditions, if the free memory is large, and the total traffic, CPU utilization and average network transmission rate are slightly different from the corresponding reference values, such as the last row of data in Table 1, the image processing device is highly adapted to the image restoration data set, and the performance adaptation index is correspondingly large, which is 200%, which in turn leads to a significant shortening of the deviation time in the image restoration process.

[0128] S370, performing difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device.

[0129] S380, executing the device adjustment set to adjust the image device and provide feedback to obtain a target image device, and inputting the compressed image set under complex communication conditions into the target image device for image restoration.

[0130] A method for restoring a compressed image provided in embodiment three of the present invention analyzes the execution process parameters of an image processing device and further adjusts and provides feedback to the image processing device. This can timely discover the performance bottleneck of the image processing device and make adjustments, such as releasing the cache, etc., thereby significantly improving the speed and efficiency of the image processing device in processing the restored image, while enhancing the stability and reliability of the image processing device.

[0131] Embodiment 4

[0132] Figure 5 This is a flow chart of a method for restoring a compressed image provided by the fourth embodiment of the present invention. The fourth embodiment is optimized on the basis of the above embodiments. For details not yet fully described in this embodiment, please refer to the first to third embodiments.

[0133] like Figure 5 As shown, a method for restoring a compressed image provided by a fourth embodiment of the present invention includes the following steps:

[0134] S410 . Evaluate an image quality factor of the compressed image set based on image performance parameters of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor.

[0135] S420. Under complex communication conditions, collect first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image.

[0136] S430: Analyze a performance adaptation index of the image processing device based on the first process parameter and the second process parameter.

[0137] S440, performing difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device.

[0138] S450, executing the device adjustment set to adjust the image device and provide feedback to obtain a target image device, and inputting the compressed image set under complex communication conditions into the target image device for image restoration.

[0139] S460: Integrate and mark the compressed images in the compressed image set that have completed image restoration as an optimized image set.

[0140] S470. Determine the image restoration quality coefficient of the optimized image set according to the optimization performance parameters corresponding to the optimized image set.

[0141] The optimized performance parameters of the image set may include parameters such as each gray level and the corresponding probability of occurrence of each gray level, the average brightness value of the highest brightness area, and the average brightness value of the lowest brightness area, etc., and no specific restrictions are made here.

[0142] In this embodiment, by collecting and analyzing the optimization performance parameters of the optimized image set and quantifying the image restoration quality of the optimized image set, it is possible to clearly understand the links in the image restoration process where performance can be further improved, thereby providing strong data support for subsequent image processing and restoration.

[0143] Specifically, determining the image restoration quality coefficient of the optimized image set according to the optimization performance parameter corresponding to the optimized image set includes:

[0144] Extracting each gray level of each sampled optimized image and the corresponding occurrence probability of each gray level from the optimization performance parameters corresponding to the optimized image set, and obtaining the information entropy of each sampled optimized image by processing each gray level of each sampled optimized image and the corresponding occurrence probability of each gray level;

[0145] Extracting a first average brightness value of a highest brightness region and a second average brightness value of a lowest brightness region of each sampled image from the optimization performance parameters corresponding to the optimization image set, and taking a difference between the first average brightness value and the second average brightness value as a contrast of each sampled optimized image;

[0146] The image restoration quality coefficient of the optimized image set is determined after comprehensive analysis of the information entropy of each sampled optimized image, the contrast of each sampled optimized image, the image restoration deviation duration of each sampled optimized image and the image quality factor of the optimized image set.

[0147] In this embodiment, each sampled optimized image refers to each sampled optimized image obtained by extracting image samples from the optimized image set; each gray level to which each sampled optimized image belongs and the corresponding probability of occurrence of each gray level can be obtained by the following method:

[0148] #Read the image

[0149] image_path='path_to_your_image.jpg'#Replace with the actual image path

[0150] image = cv2.imread(image_path, cv2.IMREAD_GRAYSCALE) #Read as grayscale image

[0151] #Statistical gray level distribution

[0152] Histogra, bins = np.histogram (image.flatten (), bins = np.arange (257)) # use numpy to count the gray level distribution

[0153] # Calculate the probability of occurrence

[0154]

[0155] probability=histogram / total_pixels

[0156] Exemplarily, the information entropy is calculated by the following formula, and the specific expression is:

[0157] ;

[0158] Where p(j) is the occurrence probability of gray level j of the g-th sampled optimized image, j is the number of the gray level, j={1,2,3,...,z}, and z is the total number of gray levels.

[0159] In this embodiment, taking a sampled image as an example, the specific process of obtaining the contrast of a sampled optimized image is: dividing the sampled optimized image into sampled optimized sub-images of equal area, obtaining the brightness value of each pixel in each sampled optimized sub-image through functions such as gray_image, and performing mean processing to obtain the average brightness value of each sampled optimized sub-image, sorting the average brightness values ​​in order from large to small, marking the sampled optimized sub-image corresponding to the first ranking as the highest brightness area, and marking the sampled optimized sub-image corresponding to the last ranking as the lowest brightness area.

[0160] In this embodiment, the optimized image set is the part of the compressed image set that has been restored. Therefore, the image quality factor of the optimized image set can be evaluated again by using the evaluation method of the image quality factor of the compressed image set. The image restoration deviation time of each sampled optimized image is consistent with the method of obtaining the image restoration deviation time of the image processing device during the execution monitoring cycle.

[0161] Furthermore, the calculation formula of the image restoration quality coefficient of the optimized image set is:

[0162] ;

[0163] Among them, IRQF is the image restoration quality factor of the optimized image set, Optimize the information entropy of the image for the g-th sample, Optimize the contrast of the image for the gth sample, To optimize the image quality factor of a set of images, The image recovery deviation duration for the g-th sampled optimized image, is the impact factor corresponding to the information entropy unit value preset in the image database, is the impact factor corresponding to the contrast unit value preset in the image database, B is the weight factor corresponding to the image quality factor preset in the image database, is the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database, g is the number of each sampled optimized image, g={1,2,3,...,r}, and r is the total number of sampled optimized images.

[0164] In this embodiment, IRQF is the image restoration quality factor of the optimized image set. When the image quality factor of the optimized image set is small, it indicates that the restored compressed image still maintains a high degree of blur. Specifically, this situation is not only accompanied by a decrease in the information entropy of the optimized image, but also a significant decrease in contrast. Information entropy is a key indicator for measuring the information content of an image. Its decrease means that the amount of information in the image is decreasing, which is directly manifested as the blurring of image details and features. The reduction in contrast further aggravates the degree of blurring, making the light and dark differences in the image blurred and difficult to distinguish. It is worth noting that there is a close connection between information entropy and contrast. Images with high contrast often have more The changes in light and dark contain more information, that is, they have higher information entropy. On the contrary, blurred images have less information due to the unclear difference in light and dark, and the information entropy also decreases accordingly. In addition, a smaller image quality factor of the optimized image set may also have an adverse effect on the image restoration process. During the image restoration process, if the performance of the image restoration data set is poor, more time and computing resources are required to try to restore the details and features of the image. This additional computing burden often leads to an increase in the image restoration deviation time. Therefore, the comprehensive analysis of the above parameters can deeply analyze the image restoration quality of the optimized image set from multiple dimensions, reduce the deviation of single-dimensional analysis, and thus guide effective measures to improve the image restoration effect.

[0165] S480. Feedback adjustment is performed on the image compression recovery under complex communication conditions so that the image recovery quality coefficient is greater than or equal to the image recovery quality threshold.

[0166] Specifically, the process of feedback adjustment for image compression recovery under complex communication conditions includes:

[0167] comparing the image restoration quality coefficient of the optimized image set with the image restoration quality threshold;

[0168] If the image restoration quality coefficient is less than the image restoration quality threshold, then calculating the ratio of the image restoration quality coefficient to the image restoration quality threshold to obtain the image restoration quality coefficient ratio of the optimized image set;

[0169] Matching the image restoration quality coefficient ratio with the image compression restoration adjustment set corresponding to each image restoration quality coefficient ratio interval in the image database to obtain an image compression restoration adjustment set for an optimized image set;

[0170] The image compression recovery adjustment set is input into the image processing device for execution, the optimized image set is restored and the image compression recovery under complex communication conditions is continuously monitored to complete feedback adjustment of the image compression recovery under complex communication conditions.

[0171] Among them, the image restoration quality threshold represents the minimum value of the reasonable range of the image restoration quality coefficient of the optimized image set, which can be extracted from the image database; if the image restoration quality coefficient of the optimized image set is greater than or equal to the image restoration quality threshold, it indicates that the image restoration quality of the image restoration dataset has reached the established image restoration quality threshold requirement during the restoration process of this optimized image set, so the compressed image can continue to be restored and monitored; if the image restoration quality coefficient of the optimized image set is less than the image restoration quality threshold, it indicates that the image restoration dataset has failed to successfully make the image restoration quality reach the established image restoration quality threshold requirement during the restoration process of this optimized image set due to some special communication factors or other related reasons, so feedback is required on image compression recovery under complex communication conditions.

[0172] Exemplarily, assuming that the image restoration quality coefficient ratio of the optimized image set is G, in the image restoration quality coefficient ratio interval [G-10%, D+10%] stored in the image database, the image compression restoration adjustment set corresponding to the image restoration quality coefficient ratio interval [G-10%, D+10%] includes: image restoration is achieved through an inverse filtering algorithm and a constrained least square filtering algorithm, and image enhancement is achieved through a comprehensive method of grayscale transformation, a histogram processing principle, and a spatial filtering principle. Specifically, the image is filtered through an inverse filtering algorithm to try to eliminate degradation effects such as blur and motion artifacts, and the clarity and details of the image are initially restored, and then additional constraints are added, such as image smoothness and edge retention. By solving the least square problem under constraints through the constrained least square filtering algorithm, blur and noise can be removed, as well as the sharpness and texture characteristics of the image can be better maintained. Finally, in the later stage of image restoration, the grayscale distribution of the image is adjusted through the grayscale transformation principle to improve its contrast and brightness. The grayscale is redistributed through the histogram processing principle to enhance the contrast of the image or achieve specific grayscale distribution characteristics. The texture and details of the image are further improved through the spatial domain filtering principle. The image compression recovery adjustment set of the optimized image set includes: image restoration through the inverse filtering algorithm and the constrained least square filtering algorithm, and the restored image enhancement is achieved through the grayscale transformation principle, the histogram processing principle and the spatial domain filtering principle.

[0173] In an example embodiment, after the image processing device executes the image compression recovery adjustment set of the optimized image set, the performance adaptation index of the image processing device is re-analyzed so that the performance adaptation index of the image processing device is greater than or equal to the performance adaptation threshold, thereby re-restoring the optimized image set and continuing to restore and monitor the compressed images that have not been fully restored, thereby enabling continuous monitoring of the recovery process.

[0174] It should be noted that the image restoration data set is developed based on the common features of a large number of images. It aims to provide a generally applicable image restoration solution. In contrast, the image compression and restoration adjustment set is customized for the defects existing in a specific image set. Its purpose is to optimize the image restoration effect through targeted adjustments. Therefore, after executing the image compression and restoration adjustment set, the image processing device restores the optimized image set so that the image restoration quality coefficient of the optimized image set is greater than or equal to the image restoration quality threshold.

[0175] A compressed image restoration method provided in a fourth embodiment of the present invention determines the image restoration quality coefficient of the optimized image set by collecting performance parameters of the optimized image set, thereby providing feedback on image compression recovery under complex communication conditions, thereby improving the adaptability and reliability of image compression recovery technology; by collecting and analyzing the optimized performance parameters of the optimized image set, the image restoration quality of the optimized image set is quantified, thereby clearly understanding the links in the image restoration process where performance can be further improved, thereby providing strong data support for subsequent image processing and restoration.

[0176] Embodiment 5

[0177] Figure 6 This is a schematic diagram of the structure of a compressed image recovery device provided in Embodiment 5 of the present invention. The device can be used to recover compressed images under complex communication conditions, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.

[0178] like Figure 6 As shown, the device includes: a first matching module 110 , a collection module 120 , an analysis module 130 , a second matching module 140 and a feedback module 150 .

[0179] A first matching module 110, configured to evaluate an image quality factor of a compressed image set based on an image performance parameter of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor;

[0180] A collecting module 120, configured to collect, under complex communication conditions, first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image;

[0181] An analysis module 130, configured to analyze a performance adaptation index of an image processing device based on the first process parameter and the second process parameter;

[0182] The second matching module 140 is used to perform difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and match the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device;

[0183] The feedback module 150 is used to execute the device adjustment set to adjust the image device to obtain a target image device, and input the compressed image set under complex communication conditions into the target image device for image restoration.

[0184] In this embodiment, the device first evaluates the image quality factor of the compressed image set based on the image performance parameters of the compressed image set through the first matching module 110, and matches the image restoration data set of the compressed image set from the image database based on the image quality factor; secondly, under complex communication conditions, the first process parameters of the image processing device executing the image restoration data set and the second process parameters of the image processing device restoring the demonstration image are collected through the collection module 120; then, the performance adaptation index of the image processing device is analyzed based on the first process parameters and the second process parameters through the analysis module 130; then, the performance adaptation index and the performance adaptation threshold are subjected to difference processing through the second matching module 140 to obtain the performance adaptation index difference of the image processing device, and the performance adaptation index difference is matched with the device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain the device adjustment set of the image processing device; finally, the feedback module 150 executes the device adjustment set to adjust and feedback the image device to obtain the target image device, and the compressed image set under the complex communication conditions is input into the target image device for image restoration.

[0185] This embodiment provides a compressed image restoration device, which can effectively improve the restoration quality of the compressed image.

[0186] Furthermore, the first matching module 110 includes an evaluation unit, which is used to:

[0187] Extracting the grayscale value of each pixel of each sampled compressed image from the image performance parameters of the compressed image set, and calculating the grayscale variance of each sampled compressed image;

[0188] Extracting the grayscale value probability change curve of each sampled compressed image from the image performance parameters of the compressed image set, and obtaining the grayscale value probability change rate curve of each sampled compressed image after data processing of the grayscale value probability change curve;

[0189] Obtaining the grayscale value probability change rate of each sampling detection position point from the grayscale value probability change rate curve, and performing mean processing on the grayscale value probability change rate to obtain the grayscale value probability average change rate of each sampled compressed image;

[0190] Extract the width of each sampled edge of each sampled compressed image from the image performance parameters of the compressed image set and perform mean processing to obtain the average edge width of each sampled compressed image;

[0191] The grayscale variance, the grayscale value probability average change rate, the edge average width and the reference edge average width preset in the image database are comprehensively analyzed to determine the image quality factor of the compressed image set.

[0192] Based on the above technical solution, the calculation formula of the image quality factor of the compressed image set is:

[0193] ;

[0194] Where QVP is the image quality factor of the compressed image set, is the grayscale variance of the dth sampled compressed image, is the average probability change rate of the gray value of the dth sampled compressed image, is the average edge width of the d-th sampled compressed image, is the average width of the reference edge preset in the image database, is the influence factor corresponding to the grayscale variance unit value preset in the image database, is the influence factor corresponding to the unit value of the average gray value probability change rate preset in the image database, and s is the total number of sampled compressed images.

[0195] Furthermore, the analysis module 130 is specifically used to: extract the remaining memory of the image processing device at the start time of the execution monitoring cycle from the first process parameter, and at the same time accumulate the memory occupancy of the compressed image set and the memory occupancy of the image recovery data set to obtain the expected memory occupancy; perform difference processing on the remaining memory and the expected memory occupancy to obtain the free memory of the image processing device at the end time of the execution detection cycle; extract the total traffic used by the image processing device during the execution monitoring cycle, the average network transmission rate of the image processing device during the execution monitoring cycle, and the CPU utilization of the image processing device during the execution monitoring cycle from the first process parameter; extract the image recovery time of the demonstration image belonging to the image processing device during the execution monitoring cycle from the second process parameter, and calculate the absolute value of the difference between the image recovery time and the image recovery reference time to obtain the image recovery deviation time of the image processing device during the execution monitoring cycle; and perform a comprehensive analysis on the free memory, the total traffic used, the average network transmission rate, the CPU utilization, and the image recovery deviation time to determine the performance adaptation index of the image processing device.

[0196] Based on the above technical solution, the calculation formula of the performance adaptation index of the image processing device is:

[0197] ;

[0198] Among them, PFI represents the performance adaptation index of the image processing device, FMA represents the amount of free memory of the image processing device at the end of the execution monitoring cycle, TDU represents the total traffic used by the image processing device during the execution monitoring cycle, UZN represents the CPU utilization of the image processing device during the execution monitoring cycle, DRT represents the image recovery deviation duration of the image processing device during the execution monitoring cycle, and ACV represents the average network transmission rate of the image processing device during the execution monitoring cycle. represents the average transmission rate of the reference network preset in the image database, Indicates the preset minimum amount of free memory required in the image database. Indicates the total reference usage flow preset in the image database. represents the reference CPU utilization preset in the image database, e represents a natural constant, Indicates the impact factor corresponding to the unit value of the preset free memory deviation value in the image database, Indicates the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database.

[0199] Furthermore, the device also includes a feedback module, including:

[0200] An integration unit, used for integrating and marking the compressed images in the compressed image set that have completed image restoration as an optimized image set;

[0201] A determination unit, configured to determine an image restoration quality coefficient of the optimized image set according to an optimization performance parameter corresponding to the optimized image set;

[0202] The feedback unit is used to perform feedback adjustment on the image compression recovery under complex communication conditions so that the image recovery quality coefficient is greater than or equal to the image recovery quality threshold.

[0203] Based on the above technical scheme, the judgment unit is specifically used to: extract the grayscale levels of each sampled optimized image and the corresponding occurrence probability of each grayscale level from the optimization performance parameters corresponding to the optimized image set, and obtain the information entropy of each sampled optimized image through data processing of the grayscale levels of each sampled optimized image and the corresponding occurrence probability of each grayscale level; extract the first average brightness value of the highest brightness area and the second average brightness value of the lowest brightness area of ​​each sampled image from the optimization performance parameters corresponding to the optimized image set, and use the difference between the first average brightness value and the second average brightness value as the contrast of each sampled optimized image; determine the image restoration quality coefficient of the optimized image set after comprehensively analyzing the information entropy of each sampled optimized image, the contrast of each sampled optimized image, the image restoration deviation time of each sampled optimized image, and the image quality factor of the optimized image set.

[0204] Among them, the calculation formula of the image restoration quality coefficient of the optimized image set is:

[0205] ;

[0206] Among them, IRQF is the image restoration quality factor of the optimized image set, Optimize the information entropy of the image for the g-th sample, Optimize the contrast of the image for the gth sample, To optimize the image quality factor of a set of images, The image recovery deviation duration for the g-th sampled optimized image, is the impact factor corresponding to the information entropy unit value preset in the image database, is the impact factor corresponding to the contrast unit value preset in the image database, B is the weight factor corresponding to the image quality factor preset in the image database, is the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database, g is the number of each sampled optimized image, g={1,2,3,...,r}, and r is the total number of sampled optimized images.

[0207] Furthermore, the feedback unit is specifically used to: compare the image restoration quality coefficient of the optimized image set with the image restoration quality threshold; if the image restoration quality coefficient is less than the image restoration quality threshold, calculate the ratio of the image restoration quality coefficient to the image restoration quality threshold to obtain the image restoration quality coefficient ratio of the optimized image set; match the image restoration quality coefficient ratio with the image compression restoration adjustment set corresponding to each image restoration quality coefficient ratio interval in the image database to obtain the image compression restoration adjustment set of the optimized image set; input the image compression restoration adjustment set into the image processing device for execution, re-restore the optimized image set and continuously monitor the image compression recovery under complex communication conditions, so as to complete the feedback adjustment of the image compression recovery under complex communication conditions.

[0208] The compressed image recovery device described above can execute the compressed image recovery method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0209] Embodiment 6

[0210] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0211] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0212] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0213] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a method for restoring a compressed image.

[0214] In some embodiments, the method for restoring a compressed image may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps in the method for restoring a compressed image described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method for restoring a compressed image in any other appropriate manner (e.g., by means of firmware).

[0215] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0216] In some embodiments, the method for restoring a compressed image may be implemented as a computer program, which is invisibly included in a computer program product. When the computer program is executed by a processor, the method for restoring a compressed image of the present invention is implemented. The computer program product may be understood as a software product that implements its solution mainly through a computer program. The computer program for implementing the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as an independent software package and partially on a remote machine, or entirely on a remote machine or server.

[0217] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0218] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0219] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0220] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0221] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0222] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for restoring a compressed image, characterized in that: The method comprises: evaluating an image quality factor of the compressed image set based on an image performance parameter of the compressed image set, and matching an image restoration data set of the compressed image set from an image database based on the image quality factor; Under complex communication conditions, collecting first process parameters of the image processing device executing the image restoration data set and second process parameters of the image processing device restoring the demonstration image; Analyzing a performance adaptation index of the image processing device based on the first process parameter and the second process parameter; Performing difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and matching the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device; The device adjustment set is executed to adjust and feedback the image device to obtain a target image device, and a compressed image set under complex communication conditions is input into the target image device for image restoration.

2. The method according to claim 1, characterized in that Evaluating an image quality factor of a compressed image set based on an image performance parameter of the compressed image set includes: Extracting the grayscale value of each pixel of each sampled compressed image from the image performance parameters of the compressed image set, and calculating the grayscale variance of each sampled compressed image; Extracting the grayscale value probability change curve of each sampled compressed image from the image performance parameters of the compressed image set, and obtaining the grayscale value probability change rate curve of each sampled compressed image after data processing of the grayscale value probability change curve; Obtaining the grayscale value probability change rate of each sampling detection position point from the grayscale value probability change rate curve, and performing mean processing on the grayscale value probability change rate to obtain the grayscale value probability average change rate of each sampled compressed image; Extract the width of each sampled edge of each sampled compressed image from the image performance parameters of the compressed image set and perform mean processing to obtain the average edge width of each sampled compressed image; The grayscale variance, the grayscale value probability average change rate, the edge average width and the reference edge average width preset in the image database are comprehensively analyzed to determine the image quality factor of the compressed image set.

3. The method according to claim 2, characterized in that The calculation formula of the image quality factor of the compressed image set is: ; Where QVP is the image quality factor of the compressed image set, is the grayscale variance of the dth sampled compressed image, is the average probability change rate of the gray value of the dth sampled compressed image, is the average edge width of the d-th sampled compressed image, is the average width of the reference edge preset in the image database, is the influence factor corresponding to the grayscale variance unit value preset in the image database, is the influence factor corresponding to the unit value of the average gray value probability change rate preset in the image database, and s is the total number of sampled compressed images.

4. The method according to claim 1, characterized in that: The analyzing the performance adaptation index of the image processing device based on the first process parameter and the second process parameter includes: Extracting the remaining memory amount of the image processing device at the start time of the monitoring cycle from the first process parameter, and accumulating the memory occupancy of the compressed image set and the memory occupancy of the image recovery data set to obtain the estimated memory occupancy; performing difference processing between the remaining memory amount and the estimated memory occupancy to obtain the free memory amount of the image processing device at the end time of the detection cycle; Extracting the total flow rate used by the image processing device during the execution monitoring period, the average network transmission rate of the image processing device during the execution monitoring period, and the CPU utilization rate of the image processing device during the execution monitoring period from the first process parameters; Extracting the image recovery time of the demonstration image of the image processing device within the execution monitoring cycle from the second process parameter, and calculating the absolute value of the difference between the image recovery time and the image recovery reference time as the image recovery deviation time of the image processing device within the execution monitoring cycle; A comprehensive analysis is performed on the free memory amount, the total used traffic, the average network transmission rate, the CPU utilization rate, and the image recovery deviation duration to determine a performance adaptation index of the image processing device.

5. The method according to claim 4, characterized in that The calculation formula of the performance adaptation index of the image processing device is: ; Among them, PFI represents the performance adaptation index of the image processing device, FMA represents the amount of free memory of the image processing device at the end of the execution monitoring cycle, TDU represents the total traffic used by the image processing device during the execution monitoring cycle, UZN represents the CPU utilization of the image processing device during the execution monitoring cycle, DRT represents the image recovery deviation duration of the image processing device during the execution monitoring cycle, and ACV represents the average network transmission rate of the image processing device during the execution monitoring cycle. represents the average transmission rate of the reference network preset in the image database, Indicates the preset minimum amount of free memory required in the image database. Indicates the total reference usage flow preset in the image database. represents the reference CPU utilization preset in the image database, e represents a natural constant, Indicates the impact factor corresponding to the unit value of the preset free memory deviation value in the image database, Indicates the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database.

6. The method according to claim 1, characterized in that The method further comprises: Integrate and mark the compressed images in the compressed image set that have completed image restoration as an optimized image set; Determining an image restoration quality coefficient of the optimized image set according to an optimization performance parameter corresponding to the optimized image set; Feedback adjustment is performed on the image compression recovery under complex communication conditions so that the image recovery quality coefficient is greater than or equal to the image recovery quality threshold.

7. The method according to claim 6, characterized in that The step of determining the image restoration quality coefficient of the optimized image set according to the optimization performance parameter corresponding to the optimized image set includes: Extracting each gray level of each sampled optimized image and the corresponding occurrence probability of each gray level from the optimization performance parameters corresponding to the optimized image set, and obtaining the information entropy of each sampled optimized image by processing each gray level of each sampled optimized image and the corresponding occurrence probability of each gray level; Extracting a first average brightness value of a highest brightness region and a second average brightness value of a lowest brightness region of each sampled image from the optimization performance parameters corresponding to the optimization image set, and taking a difference between the first average brightness value and the second average brightness value as a contrast of each sampled optimized image; The image restoration quality coefficient of the optimized image set is determined after comprehensive analysis of the information entropy of each sampled optimized image, the contrast of each sampled optimized image, the image restoration deviation duration of each sampled optimized image and the image quality factor of the optimized image set.

8. The method according to claim 7, characterized in that The calculation formula of the image restoration quality coefficient of the optimized image set is: ; Among them, IRQF is the image restoration quality factor of the optimized image set, Optimize the information entropy of the image for the g-th sample, Optimize the contrast of the image for the gth sample, To optimize the image quality factor of a set of images, The image recovery deviation duration for the g-th sampled optimized image, is the impact factor corresponding to the information entropy unit value preset in the image database, is the impact factor corresponding to the contrast unit value preset in the image database, B is the weight factor corresponding to the image quality factor preset in the image database, is the impact factor corresponding to the unit value of the image restoration deviation time preset in the image database, g is the number of each sampled optimized image, g={1,2,3,...,r}, and r is the total number of sampled optimized images.

9. The method according to any one of claims 6 to 8, characterized in that: The process of feedback adjustment for image compression recovery under complex communication conditions includes: comparing the image restoration quality coefficient of the optimized image set with the image restoration quality threshold; If the image restoration quality coefficient is less than the image restoration quality threshold, then calculating the ratio of the image restoration quality coefficient to the image restoration quality threshold to obtain the image restoration quality coefficient ratio of the optimized image set; Matching the image restoration quality coefficient ratio with the image compression restoration adjustment set corresponding to each image restoration quality coefficient ratio interval in the image database to obtain an image compression restoration adjustment set for an optimized image set; The image compression recovery adjustment set is input into the image processing device for execution, the optimized image set is restored and the image compression recovery under complex communication conditions is continuously monitored to complete feedback adjustment of the image compression recovery under complex communication conditions.

10. A compressed image recovery device, characterized in that: The device comprises: A first matching module, configured to evaluate an image quality factor of the compressed image set based on an image performance parameter of the compressed image set, and match an image restoration data set of the compressed image set from an image database based on the image quality factor; A collecting module, used for collecting, under complex communication conditions, a first process parameter of the image processing device executing the image restoration data set and a second process parameter of the image processing device restoring the demonstration image; An analysis module, configured to analyze a performance adaptation index of an image processing device based on the first process parameter and the second process parameter; A second matching module is used to perform difference processing on the performance adaptation index and the performance adaptation threshold to obtain a performance adaptation index difference of the image processing device, and match the performance adaptation index difference with a device adjustment set corresponding to each performance adaptation index difference interval in the image database to obtain a device adjustment set of the image processing device; The feedback module is used to execute the device adjustment set to adjust the image device to obtain a target image device, and input the compressed image set under complex communication conditions into the target image device for image restoration.

Citation Information

Patent Citations

  • Image restoration method, device and equipment

    CN113222855A

  • Image processing method and device, medium and computing equipment

    CN114022361A

  • Image compression recovery method under complex communication condition

    CN116055460A

  • Image restoration method and apparatus

    US20220138924A1