Data compression transmission method and system applied to ferry inspection images
By performing area segmentation and adaptive compression of ferry patrol images, and combining with convolutional neural network to optimize the transmission link, the image quality and efficiency problems in the existing technology are solved, and efficient and clear data transmission is achieved.
Patent Information
- Application Number
- CN202510747281.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-08-12
AI Technical Summary
The existing image data compression and transmission methods fail to perform differentiation processing according to different characteristics of the image content, resulting in large differences in image quality between key areas and background areas, and the compression ratio cannot be dynamically adjusted, affecting image quality and transmission efficiency.
By segmenting the image areas in real time, lossless, lossy and adaptive compression technology is adopted, combined with the convolutional neural network model to dynamically allocate the transmission link, and hierarchical data packets are constructed, and transmission strategies are optimized to preserve the clarity of the key area and reduce redundant data.
It realizes efficient data compression transmission, ensures the clarity and real-timeness of patrol images, improves overall transmission efficiency, and optimizes bandwidth utilization and delay during transmission.
Smart Images

Figure CN120475170A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to image data compression transmission, and in particular to a data compression transmission method and system applied to ferry inspection images. Background Art
[0002] With the rapid development of the Internet, mobile communications, and cloud computing technologies, the use of image data has become increasingly widespread, especially in the fields of smartphone photography, satellite remote sensing, medical imaging, and video streaming. By effectively compressing image data, not only storage space is saved, but also data transmission efficiency is improved, and the demand for network bandwidth is reduced, thereby providing more efficient support for technologies such as real-time communication, data analysis, and artificial intelligence.
[0003] The image data compression and transmission methods and systems currently available on the market fail to perform differentiated processing based on the different characteristics of the image content, and often adopt a unified compression strategy. This results in large differences in image quality between key areas and background areas, which may affect the clarity of key inspection targets. Secondly, existing lossy compression methods usually do not have the ability to dynamically adjust the compression strategy and cannot optimize the compression ratio according to changes in image content, which can easily cause a decline in image quality or over-compression. In addition, many methods lack adaptive compression coding technology and cannot dynamically adjust the compression effect according to the boundary distance of different areas, which may lead to uneven compression effects and affect the overall quality of the image. More importantly, existing methods are relatively simple in optimizing transmission efficiency, usually relying on fixed transmission strategies, and fail to intelligently adjust based on the real-time status of the transmission link, resulting in bandwidth waste or high latency during transmission. Summary of the Invention
[0004] In order to improve the existing methods and systems, a data compression and transmission method and system for ferry inspection images are provided. This method achieves efficient data compression and transmission by accurately segmenting image areas and adopting lossless, lossy, and adaptive compression technologies. At the same time, it improves the overall transmission efficiency through intelligent transmission optimization, ensuring the clarity and real-time performance of the inspection images.
[0005] In order to achieve the above objects, the technical solution adopted by the present invention is:
[0006] The data compression and transmission method applied to ferry inspection images includes:
[0007] Real-time acquisition of ferry inspection images, identification of key inspection target areas in the images, and image segmentation based on target edge gradient change detection to obtain key inspection target areas, background areas, and transition areas;
[0008] Compress key inspection target areas based on lossless compression coding to retain the original clarity of key inspection target areas;
[0009] By comparing the statistical variance of background pixels between consecutive frames, the quantization step size is dynamically adjusted to perform lossy compression encoding on the background area.
[0010] Based on the transition area between the key inspection target area and the background area, adaptive compression coding is adopted according to the boundary distance between the two areas;
[0011] Based on the compressed coded data of each area, a layered data packet is constructed, including a base layer containing the background area, a core layer containing the key target area and the transition area, and a metadata layer containing the position coordinates, compression parameters and timestamps;
[0012] Based on the transmission efficiency of each communication link, the number of packets to be processed, and the priority of the packets, a convolutional neural network model is used to train historical data, build a data transmission optimization model, dynamically allocate data transmission links, and obtain the transmission plan with the highest total transmission.
[0013] Preferably, the real-time acquisition of the ferry inspection image, identification of the key inspection target area in the image, segmentation of the image based on target edge gradient change detection, and acquisition of the key inspection target area, background area, and transition area specifically include:
[0014] Real-time collection of images or video streams of the ferry through cameras or drone monitoring equipment;
[0015] Identify key inspection targets in images based on the YOLOv7-Tiny object detection model, including lifesaving equipment, cracks in the hull structure, water accumulation on deck, abnormal passenger behavior, and cable anchorage points.
[0016] By calculating the gradient value of each pixel in the image, the edge gradient change of the image is obtained and the boundary of the object or the outline of the target area in the image is identified;
[0017] Based on the results of edge gradient changes, the image is segmented to obtain the key inspection target area with strong gradient changes, the background area with gentle gradient changes, and the transition area with relatively gentle gradient changes;
[0018] Based on the image data of each divided area, edge optimization and area merging correction are performed.
[0019] Preferably, compressing the key inspection target area based on lossless compression coding to retain the original clarity of the key inspection target area specifically includes:
[0020] Encode and compress image pixel data based on the PNG lossless compression algorithm to obtain and remove redundant pixel information in key inspection target areas;
[0021] The quality of compressed images of key inspection target areas is evaluated and tested by comparing peak signal-to-noise ratio and structural similarity.
[0022] Preferably, dynamically adjusting the quantization step size by comparing the statistical variance of background pixels between consecutive frames to perform lossy compression encoding on the background area specifically includes:
[0023] Based on the continuous video frames or static images of the background area, the background pixels are counted to obtain the grayscale value changes of the pixels of each frame of the background image in the continuous frames, and the variance of the pixel point is calculated;
[0024] Based on the variance of each pixel, the overall statistical variance of the background area of the current frame is obtained;
[0025] Based on the statistical variance of the background area, the quantization step size of the compression is dynamically adjusted. When the variance of the background area is small, a larger quantization step size is selected for compression; when the variance of the background area is large, a smaller quantization step size is selected for compression;
[0026] Based on the dynamically adjusted quantization step size, the background area is quantized and encoded, and the continuous values of the image pixels are mapped to finite discrete values to reduce redundant image data.
[0027] Preferably, the method of using adaptive compression coding based on the boundary distance between the transition area between the key inspection target area and the background area specifically includes:
[0028] Identify the boundary between the key inspection target area and the background area based on the edge detection algorithm, and obtain the distance between the two boundaries;
[0029] Based on the distance between the two boundaries, an adaptive quantization step size is set, with a low compression ratio near the key inspection target area and a high compression ratio near the background area.
[0030] Preferably, the layered data packet is constructed based on the compressed coded data of each region, including a base layer including a background region, a core layer including a key target region and a transition region, and a metadata layer including position coordinates, compression parameters and a timestamp, specifically including:
[0031] Constructing layered data packets based on the compressed coded data of each region;
[0032] Storing the compressed coded data of the background area in the base layer of the layered data packet with a high compression ratio;
[0033] The compressed coded data of key inspection target areas and transition areas are stored in the core layer of the layered data packet, using a low compression ratio;
[0034] Storing additional information data of the image data in the metadata layer of the layered data packet, including the position coordinates of key areas in the image, compression parameters, and timestamps;
[0035] After data transmission is completed, the image data of the background area of the base layer is obtained by decoding the data packet. The target area and transition area of the core layer are decoded and fused into the image according to the position coordinate information in the metadata.
[0036] Verify the correctness of the decoding strategy based on the compression parameters and timestamp information in the metadata.
[0037] Preferably, the transmission scheme with the highest total transmission rate is obtained by training historical data using a convolutional neural network model based on the transmission efficiency of each communication link, the number of data packets to be processed, and the priority of the data packets, constructing a data transmission optimization model, and dynamically allocating data transmission links. Specifically, the scheme includes:
[0038] Extract characteristic data based on historical transmission data of multiple communication links, including transmission efficiency, number of pending packets, and packet priority;
[0039] Perform model training through the convolutional neural network model to obtain the trained data transmission optimization model;
[0040] Based on the current transmission efficiency of each transmission link, the number of packets to be processed, and the priority of each packet, the model is input to obtain a link allocation plan that maximizes the overall transmission efficiency;
[0041] Based on the real-time data transmission situation and changes in link status, the link allocation strategy is dynamically adjusted by calling the backup link.
[0042] Furthermore, a data compression and transmission system for ferry inspection images is proposed, comprising:
[0043] Data acquisition module: The data acquisition module is used to collect ferry inspection images or video streams in real time, and obtain image data through cameras, drones and other devices;
[0044] Image segmentation module: The image segmentation module identifies key inspection targets in the image based on the YOLOv7-Tiny model, segments the image, and extracts the key target area, background area, and transition area;
[0045] Compression coding module: The compression coding module includes lossless compression coding, lossy compression coding and adaptive compression coding. Lossless compression coding is used for key inspection target areas to retain the original clarity of the target area. Lossy compression coding is used for background areas. By comparing the statistical variance of background pixels in consecutive frames, the quantization step size is dynamically adjusted for compression. Adaptive compression coding is used for transition areas. The adaptive quantization step size is set for compression according to the boundary distance between the key target area and the background area.
[0046] Layered data packet module: The layered data packet module constructs layered data packets based on the compressed coded data of each area, and stores the data of the background area, key target area and transition area in layers;
[0047] Data transmission module: The data transmission module uses convolutional neural networks to train historical data and dynamically allocates the best transmission link based on transmission efficiency, number of packets to be processed, and priority, thereby improving overall transmission efficiency.
[0048] Processor: The processor is used to process the calculation process of each formula and the construction calculation process of each model.
[0049] Compared with the prior art, the advantages of the present invention are:
[0050] By precisely segmenting the image into key inspection target areas, background areas, and transition areas, this method preserves the clarity of key inspection targets while using lossless compression. The background area is losslessly compressed by dynamically adjusting the quantization step size, reducing unnecessary data transmission and optimizing transmission efficiency. At the same time, adaptive compression coding is used in the transition area to ensure a smooth transition between different areas. Furthermore, the layered data packet construction method makes the data structure more rational, ensuring efficient data storage and transmission. By training the convolutional neural network model on historical data, the system can dynamically adjust the transmission link and optimize the data transmission scheme based on different transmission requirements and link status, thereby improving overall transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of the method proposed in the present invention;
[0052] Figure 2 This is a schematic diagram of image segmentation proposed by the present invention;
[0053] Figure 3 This is a schematic diagram of the lossless compression coding proposed by the present invention;
[0054] Figure 4 This is a schematic diagram of the lossy compression coding proposed by the present invention;
[0055] Figure 5 This is a schematic diagram of the adaptive compression coding proposed by the present invention;
[0056] Figure 6 Schematic diagram of layered data packets proposed by the present invention;
[0057] Figure 7 A schematic diagram of the transmission scheme proposed by the present invention;
[0058] Figure 8 This is a diagram of the architecture of the electronic equipment in this solution;
[0059] Figure 9 This is a schematic diagram of the computer-readable storage medium structure in this solution. DETAILED DESCRIPTION
[0060] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.
[0061] The data compression and transmission system for ferry inspection images includes:
[0062] Data acquisition module: The data acquisition module is used to collect ferry inspection images or video streams in real time, and obtain image data through cameras, drones and other devices;
[0063] Image segmentation module: The image segmentation module identifies key inspection targets in the image based on the YOLOv7-Tiny model, segments the image, and extracts the key target area, background area, and transition area;
[0064] Compression coding module: The compression coding module includes lossless compression coding, lossy compression coding and adaptive compression coding. Lossless compression coding is used for key inspection target areas to retain the original clarity of the target area. Lossy compression coding is used for background areas. By comparing the statistical variance of background pixels in consecutive frames, the quantization step size is dynamically adjusted for compression. Adaptive compression coding is used for transition areas. The adaptive quantization step size is set for compression according to the boundary distance between the key target area and the background area.
[0065] Layered data packet module: The layered data packet module constructs layered data packets based on the compressed coded data of each area, and stores the data of the background area, key target area and transition area in layers;
[0066] Data transmission module: The data transmission module uses convolutional neural networks to train historical data and dynamically allocates the best transmission link based on transmission efficiency, number of packets to be processed, and priority, thereby improving overall transmission efficiency.
[0067] Processor: The processor is used to process the calculation process of each formula and the construction calculation process of each model.
[0068] See Figure 1 As shown, the data compression and transmission method applied to ferry inspection images includes:
[0069] Step 1: Real-time acquisition of ferry inspection images, identification of key inspection target areas in the images, and image segmentation based on target edge gradient change detection to obtain key inspection target areas, background areas, and transition areas.
[0070] Step 2: compress the key inspection target area based on lossless compression coding to retain the original clarity of the key inspection target area;
[0071] Step 3: Dynamically adjust the quantization step size by comparing the statistical variance of background pixels between consecutive frames, and perform lossy compression encoding on the background area;
[0072] Step 4: Based on the transition area between the key inspection target area and the background area, adaptive compression coding is used according to the boundary distance between the two areas;
[0073] Step 5: Based on the compressed coded data of each area, a layered data package is constructed, including a base layer containing the background area, a core layer containing the key target area and the transition area, and a metadata layer containing the location coordinates, compression parameters, and timestamps;
[0074] Step 6: Based on the transmission efficiency of each communication link, the number of packets to be processed, and the packet priority, the historical data is trained through the convolutional neural network model to build a data transmission optimization model, dynamically allocate data transmission links, and obtain the transmission plan with the highest total transmission.
[0075] See Figure 2 As shown, real-time acquisition of ferry inspection images is performed, key inspection target areas in the images are identified, and the images are segmented based on target edge gradient change detection to obtain key inspection target areas, background areas, and transition areas. Specifically, the following are performed:
[0076] Real-time collection of images or video streams of the ferry through cameras or drone monitoring equipment;
[0077] Identify key inspection targets in images based on the YOLOv7-Tiny object detection model, including lifesaving equipment, cracks in the hull structure, water accumulation on deck, abnormal passenger behavior, and cable anchorage points.
[0078] By calculating the gradient value of each pixel in the image, the edge gradient change of the image is obtained and the boundary of the object or the outline of the target area in the image is identified;
[0079] Based on the results of edge gradient changes, the image is segmented to obtain the key inspection target area with strong gradient changes, the background area with gentle gradient changes, and the transition area with relatively gentle gradient changes;
[0080] Based on the image data of each divided area, edge optimization and area merging correction are performed.
[0081] Specifically, based on the YOLOv7-Tiny object detection model, it automatically identifies key inspection targets in images, such as life-saving equipment, cracks in the hull structure, water accumulation on deck, abnormal passenger behavior, and cable fixing points, and outputs the category, location, and confidence level of each target.
[0082] The gradient of the image is calculated using the Sobel operator, including the horizontal and vertical directions. The gradient calculation formula is:
[0083]
[0084]
[0085] in, is the horizontal direction, is the vertical direction, is the image pixel value, 、 are the horizontal and vertical kernels of the Sobel operator, ;
[0086] Based on the edge gradient changes, the image is divided into multiple areas, including: the key inspection target area has a larger gradient amplitude; the background area has a smaller gradient amplitude; the transition area has an intermediate gradient value;
[0087] After image segmentation, inaccurate edge detection or inconsistent segmented areas may occur. Therefore, it is necessary to optimize the edges and merge adjacent areas.
[0088] See Figure 3 As shown, the key inspection target area is compressed based on lossless compression coding, and the original clarity of the key inspection target area is retained. Specifically, the following are performed:
[0089] Encode and compress image pixel data based on the PNG lossless compression algorithm to obtain and remove redundant pixel information in key inspection target areas;
[0090] The quality of compressed images of key inspection target areas is evaluated and tested by comparing peak signal-to-noise ratio and structural similarity.
[0091] Specifically, the PNG format uses the DEFLATE compression algorithm, a lossless compression method that combines Huffman coding and the LZ77 algorithm. Huffman coding reduces the amount of data by assigning binary codes of different lengths to pixel values of different frequencies. More frequent pixel values receive shorter codes, while the LZ77 algorithm compresses data by finding duplicate data in the image and replacing them with references. Whenever an identical pixel sequence is found, it is replaced with a pointer to the sequence.
[0092] Peak signal-to-noise ratio (PSNR) is used to measure the quality of image reconstruction, usually in dB. The calculation of PSNR is based on the error between the original image and the compressed image. The formula is:
[0093]
[0094] in, is the peak signal-to-noise ratio, is the square of the maximum pixel value in the image, is the mean square error, which represents the difference between the original image and the compressed image;
[0095] The structural similarity index is used to measure the perceptual similarity between two images. It reflects the image quality perceived by the human eye better than the peak signal-to-noise ratio. The calculation of structural similarity takes into account brightness, contrast, and structural information. The formula is:
[0096]
[0097] in, For structural similarity, is the local window of the two images, For images The mean of is their variance, is the covariance of the two images, 、 To avoid constants with zero denominators;
[0098] The PSNR and SSIM values of the compressed image are calculated to evaluate the quality retention of the PNG lossless compression algorithm after removing redundant pixel information.
[0099] See Figure 4 As shown in FIG, by dynamically adjusting the quantization step size by comparing the statistical variance of background pixels between consecutive frames, lossy compression encoding of the background area specifically includes:
[0100] Based on the continuous video frames or static images of the background area, the background pixels are counted to obtain the gray value changes of the pixels of each frame of the background image in the continuous frames, and the variance of the pixel point is calculated;
[0101] Based on the variance of each pixel, the overall statistical variance of the background area of the current frame is obtained;
[0102] Based on the statistical variance of the background area, the quantization step size of the compression is dynamically adjusted. When the variance of the background area is small, a larger quantization step size is selected for compression; when the variance of the background area is large, a smaller quantization step size is selected for compression;
[0103] Based on the dynamically adjusted quantization step size, the background area is quantized and encoded, and the continuous values of the image pixels are mapped to finite discrete values to reduce redundant image data.
[0104] Specifically, for the background area of each frame, we first need to calculate the grayscale value change of each pixel in the consecutive frames, and then calculate the mean of the variance of all pixels in the entire background area as the overall statistical variance of the background area;
[0105] Quantization is a step in image compression that aims to reduce redundant data by mapping continuous pixel values to a finite number of discrete values. The quantization step size is dynamically adjusted based on the statistical variance of the background area.
[0106] If the overall variance of the background area is small, it means that the background area has changed little and the grayscale values of adjacent frames have not changed much. A larger quantization step size can be selected. A larger quantization step size can further reduce the amount of data. If the overall variance of the background area is large, it means that the background area has changed significantly and the grayscale values of adjacent frames have changed significantly. In this case, a smaller quantization step size should be selected to retain more detailed information.
[0107] The core purpose of quantization is to map pixel values from continuous grayscale values to finite discrete values. Through this quantization process, the pixel values of the original image are mapped to discrete quantized values, thereby achieving data compression.
[0108] See Figure 5 As shown, based on the transition area between the key inspection target area and the background area, adaptive compression coding is adopted according to the boundary distance between the two areas, specifically including:
[0109] Identify the boundary between the key inspection target area and the background area based on the edge detection algorithm, and obtain the distance between the two boundaries;
[0110] Based on the distance between the two boundaries, an adaptive quantization step size is set, with a low compression ratio near the key inspection target area and a high compression ratio near the background area.
[0111] Specifically, the compression method of the transition area needs to be dynamically adjusted according to the boundary distance. In areas close to the target area, the transition area usually has more details, so the compression ratio should be moderately low to retain sufficient details. In areas close to the background area, the transition area has relatively fewer details, so a higher compression ratio can be used.
[0112] The compression parameters are adaptively adjusted based on the boundary distance of the transition region. When the boundary distance is small, a lower compression ratio is used to preserve more details; when the boundary distance is large, a higher compression ratio is used to improve compression efficiency.
[0113] See Figure 6 As shown, based on the compressed coded data of each area, a layered data packet is constructed, including a base layer containing the background area, a core layer containing the key target area and the transition area, and a metadata layer containing the position coordinates, compression parameters and timestamps. Specifically, it includes:
[0114] Constructing layered data packets based on the compressed coded data of each region;
[0115] Storing the compressed coded data of the background area in the base layer of the layered data packet with a high compression ratio;
[0116] The compressed coded data of key inspection target areas and transition areas are stored in the core layer of the layered data packet, using a low compression ratio;
[0117] Storing additional information data of the image data in the metadata layer of the layered data packet, including the position coordinates of key areas in the image, compression parameters, and timestamps;
[0118] After data transmission is completed, the image data of the background area of the base layer is obtained by decoding the data packet. The target area and transition area of the core layer are decoded and fused into the image according to the position coordinate information in the metadata.
[0119] Verify the correctness of the decoding strategy based on the compression parameters and timestamp information in the metadata.
[0120] Specifically, the compressed data of different regions are organized into layered data packets for subsequent storage, transmission and decoding. The layered data packets include three levels: base layer, core layer and metadata layer;
[0121] After data transmission is complete, the receiving end needs to perform layered decoding and accurately reconstruct the image based on the information in the metadata. First, the base layer data is decoded to obtain the image information of the background area. Due to the high compression ratio, this image data will lose some details, but it is sufficient to provide the basic scene context. Based on the position coordinate information in the metadata, the specific positions of the target area and transition area are located, and the core layer data is decoded. Based on the position coordinate information in the metadata, the decoded target area and transition area are correctly fused with the base layer background image to reconstruct the complete inspection image.
[0122] During the decoding process, the correctness of the decoding strategy is verified based on the compression parameters and timestamp information in the metadata. During the decoding process, the correctness of the decoding strategy is verified based on the compression parameters and timestamp information in the metadata. According to the timestamp information, the decoding and synthesis order of the image is ensured to be correct, especially in multi-frame images or real-time transmission scenarios, to ensure the timing consistency of the image.
[0123] See Figure 7 As shown in the figure, based on the transmission efficiency of each communication link, the number of packets to be processed, and the packet priority, a convolutional neural network model is used to train historical data, build a data transmission optimization model, dynamically allocate data transmission links, and obtain the transmission solution with the highest total transmission. Specifically, the following are the steps:
[0124] Extract characteristic data based on historical transmission data of multiple communication links, including transmission efficiency, number of packets to be processed, and packet priority;
[0125] Perform model training through the convolutional neural network model to obtain the trained data transmission optimization model;
[0126] Based on the current transmission efficiency of each transmission link, the number of packets to be processed, and the priority of each packet, the model is input to obtain a link allocation plan that maximizes the overall transmission efficiency;
[0127] Based on the real-time data transmission situation and changes in link status, the link allocation strategy is dynamically adjusted by calling the backup link.
[0128] Specifically, the model outputs an allocation plan for each link, indicating the amount of transmission data each link should handle. For example, link 1 might be allocated 50% of the data packets, link 2 30%, and link 3 20%. During actual data transmission, the model monitors the transmission status, bandwidth utilization, packet loss rate, and other indicators of each link in real time. When the transmission efficiency of a link decreases (such as excessive latency or increased packet loss rate), the model dynamically calls on a backup link for data transmission based on the prediction to ensure that overall transmission efficiency is not affected.
[0129] Reallocate link resources based on real-time transmission conditions and changes in link status. For example, when link 1 is heavily loaded, some packets can be reallocated to link 2 or link 3 to ensure link 1 is not overly congested. Flexible link resource management is achieved by calling on backup links or adjusting packet priorities and allocation ratios in real time.
[0130] Furthermore, the method according to the embodiment of the present application can also be used with the aid of Figure 8 The electronic device architecture shown in FIG. Figure 8 As shown, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as the ROM 503 or the hard disk 507, may store the data compression and transmission method and system for ferry inspection images provided in this application. The electronic device 500 may also include a terminal interface 508. Of course, Figure 8 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 8 One or more components of an electronic device are shown.
[0131] Figure 9 This is a schematic diagram of the computer-readable storage medium structure provided by an embodiment of the present application. Figure 9 1 shows a computer-readable storage medium 600 according to one embodiment of the present application. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are executed by a processor, the data compression and transmission method and system for ferry inspection images according to the embodiments of the present application described with reference to the above figures can be executed. The storage medium 600 includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, flash memory, etc.
[0132] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0133] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data compression and transmission method for ferry inspection images, characterized in that: include: Real-time acquisition of ferry inspection images, identification of key inspection target areas in the images, and image segmentation based on target edge gradient change detection to obtain key inspection target areas, background areas, and transition areas; Compress key inspection target areas based on lossless compression coding to retain the original clarity of key inspection target areas; By comparing the statistical variance of background pixels between consecutive frames, the quantization step size is dynamically adjusted to perform lossy compression encoding on the background area. Based on the transition area between the key inspection target area and the background area, adaptive compression coding is adopted according to the boundary distance between the two areas; Based on the compressed coded data of each area, a layered data packet is constructed, including a base layer containing background areas, a core layer containing key target areas and transition areas, and a metadata layer containing location coordinates, compression parameters, and timestamps; Based on the transmission efficiency of each communication link, the number of packets to be processed, and the priority of the packets, a convolutional neural network model is used to train historical data, build a data transmission optimization model, dynamically allocate data transmission links, and obtain the transmission plan with the highest total transmission.
2. The data compression and transmission method for ferry inspection images according to claim 1 is characterized in that: The real-time acquisition of the ferry inspection image, identification of the key inspection target area in the image, segmentation of the image based on target edge gradient change detection, and acquisition of the key inspection target area, background area, and transition area specifically include: Real-time collection of images or video streams of the ferry through cameras or drone monitoring equipment; Identify key inspection targets in images based on the YOLOv7-Tiny object detection model, including lifesaving equipment, cracks in the hull structure, water accumulation on deck, abnormal passenger behavior, and cable anchorage points. By calculating the gradient value of each pixel in the image, the edge gradient change of the image is obtained and the boundary of the object or the outline of the target area in the image is identified; Based on the results of edge gradient changes, the image is segmented to obtain the key inspection target area with strong gradient changes, the background area with gentle gradient changes, and the transition area with relatively gentle gradient changes; Based on the image data of each divided area, edge optimization and area merging correction are performed.
3. The data compression and transmission method for ferry inspection images according to claim 1, characterized in that: The compressing of the key inspection target area based on lossless compression coding to retain the original clarity of the key inspection target area specifically includes: Encode and compress image pixel data based on the PNG lossless compression algorithm to obtain and remove redundant pixel information in key inspection target areas; The quality of compressed images of key inspection target areas is evaluated and tested by comparing peak signal-to-noise ratio and structural similarity.
4. The data compression and transmission method for ferry inspection images according to claim 1 is characterized in that: Dynamically adjusting the quantization step size by comparing the statistical variance of background pixels between consecutive frames to perform lossy compression coding on the background area specifically includes: Based on the continuous video frames or static images of the background area, the background pixels are counted to obtain the grayscale value changes of the pixels of each frame of the background image in the continuous frames, and the variance of the pixel point is calculated; Based on the variance of each pixel, the overall statistical variance of the background area of the current frame is obtained; Based on the statistical variance of the background area, the quantization step size of the compression is dynamically adjusted. When the variance of the background area is small, a larger quantization step size is selected for compression; when the variance of the background area is large, a smaller quantization step size is selected for compression; Based on the dynamically adjusted quantization step size, the background area is quantized and encoded, and the continuous values of the image pixels are mapped to finite discrete values to reduce redundant image data.
5. The data compression and transmission method for ferry inspection images according to claim 1, characterized in that: The method of using adaptive compression coding based on the transition area between the key inspection target area and the background area according to the boundary distance between the two areas specifically includes: Identify the boundary between the key inspection target area and the background area based on the edge detection algorithm, and obtain the distance between the two boundaries; Based on the distance between the two boundaries, an adaptive quantization step size is set, with a low compression ratio near the key inspection target area and a high compression ratio near the background area.
6. The data compression and transmission method for ferry inspection images according to claim 1, characterized in that: The layered data packet is constructed based on the compressed coded data of each region, including a base layer containing a background region, a core layer containing a key target region and a transition region, and a metadata layer containing position coordinates, compression parameters, and a timestamp. Specifically, the following are described: Constructing layered data packets based on the compressed coded data of each region; Storing the compressed coded data of the background area in the base layer of the layered data packet with a high compression ratio; The compressed coded data of key inspection target areas and transition areas are stored in the core layer of the layered data packet, using a low compression ratio; Storing additional information data of the image data in the metadata layer of the layered data packet, including the position coordinates of key areas in the image, compression parameters, and timestamps; After data transmission is completed, the image data of the background area of the base layer is obtained by decoding the data packet. The target area and transition area of the core layer are decoded and fused into the image according to the position coordinate information in the metadata. Verify the correctness of the decoding strategy based on the compression parameters and timestamp information in the metadata.
7. The data compression and transmission method for ferry inspection images according to claim 1, characterized in that: The method of training historical data using a convolutional neural network model based on the transmission efficiency of each communication link, the number of packets to be processed, and the priority of the packets, constructing a data transmission optimization model, and dynamically allocating data transmission links to obtain a transmission solution with the highest total transmission efficiency specifically includes: Extract characteristic data based on historical transmission data of multiple communication links, including transmission efficiency, number of pending packets, and packet priority; Perform model training through the convolutional neural network model to obtain the trained data transmission optimization model; Based on the current transmission efficiency of each transmission link, the number of packets to be processed, and the priority of each packet, the model is input to obtain a link allocation plan that maximizes the overall transmission efficiency; Based on the real-time data transmission situation and changes in link status, the link allocation strategy is dynamically adjusted by calling the backup link.
8. A data compression and transmission system for ferry inspection images, for implementing the data compression and transmission method for ferry inspection images according to any one of claims 1 to 7, characterized in that: include: Data acquisition module: The data acquisition module is used to collect ferry inspection images or video streams in real time, and obtain image data through cameras, drones and other devices; Image segmentation module: The image segmentation module identifies key inspection targets in the image based on the YOLOv7-Tiny model, segments the image, and extracts the key target area, background area, and transition area; Compression coding module: The compression coding module includes lossless compression coding, lossy compression coding and adaptive compression coding. Lossless compression coding is used for key inspection target areas to retain the original clarity of the target area. Lossy compression coding is used for background areas. By comparing the statistical variance of background pixels in consecutive frames, the quantization step size is dynamically adjusted for compression. Adaptive compression coding is used for transition areas. The adaptive quantization step size is set for compression according to the boundary distance between the key target area and the background area. Layered data packet module: The layered data packet module constructs layered data packets based on the compressed coded data of each area, and stores the data of the background area, key target area and transition area in layers; Data transmission module: The data transmission module uses convolutional neural networks to train historical data and dynamically allocates the best transmission link based on transmission efficiency, number of packets to be processed, and priority, thereby improving overall transmission efficiency. Processor: The processor is used to process the calculation process of each formula and the construction calculation process of each model.
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data compression and transmission method for ferry inspection images as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the data compression and transmission method for ferry inspection images according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Remote monitoring system of intelligent laser obstacle removing instrument
CN120812300A
Intelligent laser obstacle clearing instrument remote monitoring system
CN120812300B
Remote image transmission system and method based on compression algorithm
CN120956910A
Digital image transmission method and system for reservoir environment
CN121000878A
Unmanned aerial vehicle electric power inspection image compression method and system based on directional bounding box, and medium
CN121120808A