Method and system for transmitting monitoring video of chemical device
By performing dimensionality reduction and Huffman coding compression on the YUV values of monitoring videos from chemical plants, the problems of congestion and latency in video monitoring data transmission in chemical plants were solved, achieving efficient and accurate video transmission and timely risk monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2024-10-15
- Publication Date
- 2026-04-17
AI Technical Summary
Data congestion and latency issues exist in the data transmission process of video monitoring in chemical plants. Existing compression methods are not suitable for monitoring videos of chemical plants, resulting in high bandwidth requirements, low data processing efficiency, and affecting the timeliness of risk monitoring and early warning.
By acquiring the YUV values of each frame of the image, a dimensionality reduction matrix is generated, which is then decomposed into block matrices and quantized. The YUV color space array is compressed using Huffman coding, thereby achieving multiple serialization, sorting, and encoding compression of the image.
While ensuring that the main information of the image is not lost, efficient and accurate video transmission is achieved, which alleviates data congestion and latency, improves transmission and processing efficiency, and supports the timeliness of risk monitoring.
Smart Images

Figure CN121887985A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of chemical safety monitoring technology, and in particular relates to a method and system for transmitting monitoring videos of chemical plants. Background Technology
[0002] To ensure the safe and stable operation of chemical plants and reduce the occurrence of abnormal events and personal injury accidents, the safety status of key equipment and facilities such as pumps, towers, and valves, as well as on-site personnel during maintenance and repair operations, is usually monitored online through video surveillance and other means. This helps operators in the central control room to have a clear understanding and analysis of the actual risk status on the production site.
[0003] Currently, image acquisition technology is developing rapidly, and the acquisition resolution (1080P) and frame rate (120Hz) of video surveillance have both improved significantly, requiring huge bandwidth for on-site video surveillance transmission. At the same time, since most single-unit devices have more than 100 video surveillance channels, the large number of edge nodes connecting to the cloud storage platform can cause data congestion during data transmission, leading to increased network transmission latency in cloud-edge communication.
[0004] Currently, video surveillance during equipment operation mostly follows the transmission, switching, and control requirements of the national standard GB28181, transmitting data using media stream channel encoding and compression formats such as H.264 and H.265. Transmitting even one channel of 1080P video surveillance requires a minimum network bandwidth of 2Mbps. However, the dedicated video surveillance acquisition network typically cannot meet the requirements for centralized transmission, switching, and control of hundreds of video surveillance channels during equipment production.
[0005] Existing technology discloses a data compression and decompression method, apparatus, device, and medium. This method involves determining the initial number of bits and the number of bits to be compressed in the grayscale value; dividing the compression bits into multiples of the high-number bits and base bits of the low-number bits, and determining the number of base bits based on compression accuracy requirements and a formula for calculating the compression bit value; compressing the initial data into compressed data based on the number of base bits; and / or decompressing the compressed data back to the original initial data based on the formula for calculating the compression bit value. This method primarily targets the multiple compression of grayscale data in images, making it suitable for compressing and decompressing grayscale data to be displayed on LEDs. However, given the human eye's high sensitivity to dark details and low sensitivity to bright details in LED images, some precision loss is acceptable when grayscale values are high without affecting normal display, while all details are preserved when grayscale values are low. Therefore, it is not suitable for compressing and decompressing monitoring videos from chemical plants.
[0006] Existing technology also discloses a method for compressing and storing road image data. This method includes: acquiring a road image and segmenting it into multiple pixel blocks; obtaining the confidence level of a pixel block belonging to a road category based on the disorder of the pixel blocks; identifying road pixel blocks in the road image based on the confidence level; determining a target road pixel block chain; performing a first degree of blurring on road pixel blocks outside the target road pixel block chain; performing a second degree of blurring on non-road pixel blocks; obtaining a blurred target road image; performing data compression on the target road image to obtain compressed data; and sending the compressed data to a server for storage. This method mainly targets unrelated image regions for blurring compression. It can perform different degrees of blurring on different regions of information according to their importance, thereby reducing data volume and alleviating data transmission and storage pressure. However, it is not suitable for the compression and decompression of monitoring videos from chemical plants.
[0007] In addition, existing technologies also disclose a dynamically adaptive image compression method, which mainly targets the selective discarding of image data frames. This method includes: receiving image data and marking frame headers or tails; storing the image data in a first storage module and determining whether a second storage module is full; if the second storage module is full and the current output image data from the first storage module is not a frame header or tail, discarding the current image data and recording the discarded image data information; if the second storage module is full and the current output image data from the first storage module is a frame header or tail, temporarily storing the current image data and waiting for the second storage module to become less full before storing it in the second storage module; statistically analyzing all discarded image data information and generating tail data based on preset rules; and sending the output data from the second storage module and the tail data to an image compression engine for data compression processing. This method is not suitable for the compression and decompression of monitoring videos in chemical plants.
[0008] In summary, there is an urgent need for a compression method suitable for video monitoring data of chemical plants, to further reduce the file size of massive monitoring videos and anomaly detection images of chemical plants, improve the data processing efficiency of videos and images during transmission and storage, alleviate data congestion and latency in data cloud-edge communication, and provide technical support for improving the timeliness of status analysis in risk monitoring and early warning processes. Summary of the Invention
[0009] To address the aforementioned problems, this invention provides a method for transmitting monitoring video of a chemical plant, comprising: acquiring the YUV values of each frame of the video to be transmitted; generating multiple first matrices representing the YUV color space for each frame, corresponding to components Y, U, and V respectively; converting each first matrix into a projection matrix to obtain a dimensionality-reduced matrix for extracting key image features; decomposing each dimensionality-reduced matrix into several block matrices of the same dimension and quantizing each block matrix; then, for each dimensionality-reduced matrix, performing a first serialization sort on the single quantized block matrix, and then performing a second serialization sort on all quantized block matrices after the first serialization sort to obtain a YUV color space array for each frame; and encoding and compressing each frame using the YUV color space array, thereby completing video transmission by transmitting the encoded and compressed image.
[0010] Preferably, the step of obtaining the YUV values of each frame of the video to be transmitted and generating multiple first matrices representing the YUV color space corresponding to the components Y, U, and V for each frame of the video includes: obtaining the RGB values of each frame of the video to be transmitted; generating multiple second matrices representing the RGB color space corresponding to the components R, G, and B for each frame of the video; using all the second matrices of each frame of the video, calculating the components Y, U, and V of the corresponding image, and forming first matrices corresponding to different components, thereby obtaining the multiple first matrices.
[0011] Preferably, the step of converting each first matrix into a projection matrix includes: obtaining the covariance matrix corresponding to each first matrix, then performing eigenvalue decomposition on each covariance matrix to obtain the eigenvector of each covariance matrix, and then using each eigenvector to obtain the corresponding projection matrix.
[0012] Preferably, the process of obtaining the covariance matrix corresponding to each first matrix includes: centering each first matrix respectively, and then using the centered first matrix to calculate the corresponding covariance matrix.
[0013] Preferably, the process of obtaining the eigenvector of each covariance matrix includes: extracting a specified number of eigenvalues from the decomposition results of each covariance matrix in descending order to form the corresponding eigenvector.
[0014] Preferably, the step of obtaining the dimensionality reduction matrix for extracting key features of the image includes: obtaining the dimensionality reduction matrix of each frame of the image by calculating the product of each first matrix and the corresponding projection matrix.
[0015] Preferably, the step of decomposing each dimension-reduced matrix into several block matrices of the same dimension includes: dividing each dimension-reduced matrix into blocks according to a specified dimension to obtain the several block matrices, wherein if there is a block matrix that cannot satisfy the specified dimension, the corresponding element is assigned a value of zero so that all block matrices satisfy the specified dimension.
[0016] Preferably, before quantizing each block matrix, the method further includes: processing each block matrix using a variation analysis method to obtain the corresponding optimal YUV color space array based on filtering high-frequency information in each frame of the image.
[0017] Preferably, the specified dimension is 8*8, wherein each block matrix is processed using the following expression:
[0018] x, y = 0, 1, ..., 7
[0019]
[0020] in, Let A represent the block matrix after the transformation analysis, and let A represent the transformation matrix. Let represent a block matrix, where x and y represent the number of rows and columns of the matrix, respectively, and alpha represents the correction function. This represents the value in the i-th row and j-th column of the block matrix, where u represents the number of rows or columns of the matrix.
[0021] Preferably, each block matrix is quantized using the following expression:
[0022]
[0023] in, This represents the quantized block matrix, and Q represents the custom standard quantization matrix.
[0024] Preferably, both the first and second serialization sorting are performed using the Zigzag arrangement method.
[0025] Preferably, the step of encoding and compressing each frame of image using the YUV color space array includes: constructing a Huffman tree based on the Huffman coding principle, using the frequency of occurrence of different values in the YUV color space array as the weight of the Huffman tree node, and forming a corresponding Huffman tree encoding table; writing the Huffman tree encoding table and the block matrix after all quantizations have been completed for the second serialization sorting into a binary file adapted to each frame of image, to obtain the encoding and compression result of each frame of image.
[0026] The present invention also provides a computer-readable storage medium comprising a series of instructions for performing method steps for transmitting monitoring video of a chemical plant.
[0027] On the other hand, the present invention also provides a system for transmitting monitoring videos of chemical plants. The system includes the following modules: a dimensionality reduction matrix generation module, which is used to obtain the YUV values of each frame of the video to be transmitted, generate multiple first matrices representing the YUV color space corresponding to the components Y, U, and V for each frame of the video, and then convert each first matrix into a projection matrix to obtain a dimensionality reduction matrix for extracting key features of the image; a color space array acquisition module, which is used to decompose each dimensionality reduction matrix into several block matrices of the same dimension, quantize each block matrix, and then, for each dimensionality reduction matrix, first perform a first serialization sort on the single quantized block matrix, and then perform a second serialization sort on all the quantized block matrices after the first serialization sort to obtain the YUV color space array of each frame of the image; and a compression module, which is used to encode and compress each frame of the image using the YUV color space array, thereby completing video transmission by transmitting the encoded and compressed image.
[0028] Compared with the prior art, one or more embodiments of the above solutions may have the following advantages or beneficial effects:
[0029] This invention provides a method and system for transmitting monitoring video from a chemical plant. The method utilizes the YUV values of each frame in the video to obtain a dimensionality-reduced matrix for extracting key image features. Then, each dimensionality-reduced matrix is decomposed, and the decomposition results are serialized and sorted multiple times to obtain the YUV color space array for each frame, thereby reconstructing the image while ensuring no loss of key information. Finally, Huffman coding is used to compress the data bytes in the YUV color space array to complete the encoding and compression of each frame, thus completing video transmission by transmitting the encoded and compressed image. This invention alleviates data congestion and latency issues in cloud-edge communication, solves problems such as large video monitoring data files, high bandwidth requirements, and data processing congestion in chemical plant production processes, and ensures high compression ratios and low compression errors for video monitoring data while preserving the original main features and key information. This improves the transmission and processing efficiency of video monitoring data, achieving efficient and accurate transmission of monitoring video. This invention provides technical support for reducing the loading time of video images during video surveillance retrieval, making it more convenient to view the actual safety production situation of chemical plants, and improving the timeliness of status assessment and analysis during risk monitoring and early warning.
[0030] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description
[0031] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0032] Figure 1 This is a step diagram of a method for transmitting monitoring video of a chemical plant according to an embodiment of this application.
[0033] Figure 2 This is a block diagram of a system for transmitting monitoring videos of a chemical plant, according to an embodiment of this application. Detailed Implementation
[0034] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples, so that the process of how the present invention uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly. It should be noted that, as long as there is no conflict, the various embodiments and features in the various embodiments of the present invention can be combined with each other, and the resulting technical solutions are all within the protection scope of the present invention.
[0035] Furthermore, the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0036] To ensure the safe and stable operation of chemical plants and reduce the occurrence of abnormal events and personal injury accidents, the safety status of key equipment and facilities such as pumps, towers, and valves, as well as on-site personnel during maintenance and repair operations, is usually monitored online through video surveillance and other means. This helps operators in the central control room to have a clear understanding and analysis of the actual risk status on the production site.
[0037] Currently, image acquisition technology is developing rapidly, and the acquisition resolution (1080P) and frame rate (120Hz) of video surveillance have both improved significantly, requiring huge bandwidth for on-site video surveillance transmission. At the same time, since most single-unit devices have more than 100 video surveillance channels, the large number of edge nodes connecting to the cloud storage platform can cause data congestion during data transmission, leading to increased network transmission latency in cloud-edge communication.
[0038] Currently, video surveillance during equipment operation mostly follows the transmission, switching, and control requirements of the national standard GB28181, transmitting data using media stream channel encoding and compression formats such as H.264 and H.265. Transmitting even one channel of 1080P video surveillance requires a minimum network bandwidth of 2Mbps. However, the dedicated video surveillance acquisition network typically cannot meet the requirements for centralized transmission, switching, and control of hundreds of video surveillance channels during equipment production.
[0039] Existing technology discloses a data compression and decompression method, apparatus, device, and medium. This method involves determining the initial number of bits and the number of bits to be compressed in the grayscale value; dividing the compression bits into multiples of the high-number bits and base bits of the low-number bits, and determining the number of base bits based on compression accuracy requirements and a formula for calculating the compression bit value; compressing the initial data into compressed data based on the number of base bits; and / or decompressing the compressed data back to the original initial data based on the formula for calculating the compression bit value. This method primarily targets the multiple compression of grayscale data in images, making it suitable for compressing and decompressing grayscale data to be displayed on LEDs. However, given the human eye's high sensitivity to dark details and low sensitivity to bright details in LED images, some precision loss is acceptable when grayscale values are high without affecting normal display, while all details are preserved when grayscale values are low. Therefore, it is not suitable for compressing and decompressing monitoring videos from chemical plants.
[0040] Existing technology also discloses a method for compressing and storing road image data. This method includes: acquiring a road image and segmenting it into multiple pixel blocks; obtaining the confidence level of a pixel block belonging to a road category based on the disorder of the pixel blocks; identifying road pixel blocks in the road image based on the confidence level; determining a target road pixel block chain; performing a first degree of blurring on road pixel blocks outside the target road pixel block chain; performing a second degree of blurring on non-road pixel blocks; obtaining a blurred target road image; performing data compression on the target road image to obtain compressed data; and sending the compressed data to a server for storage. This method mainly targets unrelated image regions for blurring compression. It can perform different degrees of blurring on different regions of information according to their importance, thereby reducing data volume and alleviating data transmission and storage pressure. However, it is not suitable for the compression and decompression of monitoring videos from chemical plants.
[0041] In addition, existing technologies also disclose a dynamically adaptive image compression method, which mainly targets the selective discarding of image data frames. This method includes: receiving image data and marking frame headers or tails; storing the image data in a first storage module and determining whether a second storage module is full; if the second storage module is full and the current output image data from the first storage module is not a frame header or tail, discarding the current image data and recording the discarded image data information; if the second storage module is full and the current output image data from the first storage module is a frame header or tail, temporarily storing the current image data and waiting for the second storage module to become less full before storing it in the second storage module; statistically analyzing all discarded image data information and generating tail data based on preset rules; and sending the output data from the second storage module and the tail data to an image compression engine for data compression processing. This method is not suitable for the compression and decompression of monitoring videos in chemical plants.
[0042] In summary, there is an urgent need for a compression method suitable for video monitoring data of chemical plants, to further reduce the file size of massive monitoring videos and anomaly detection images of chemical plants, improve the data processing efficiency of videos and images during transmission and storage, alleviate data congestion and latency in data cloud-edge communication, and provide technical support for improving the timeliness of status analysis in risk monitoring and early warning processes.
[0043] Therefore, to address the aforementioned problems, this invention proposes a method and system for transmitting monitoring videos of chemical plants. This method utilizes the YUV values of each frame in the video to be transmitted to obtain a dimensionality-reduced matrix for extracting key image features. Then, each dimensionality-reduced matrix is decomposed, and the decomposition results are serialized and sorted multiple times to obtain the YUV color space array for each frame, thereby achieving image reconstruction while ensuring no loss of key image information. Finally, Huffman coding is used to compress the data bytes in the YUV color space array to complete the encoding and compression of each frame, thus completing video transmission by transmitting the encoded and compressed image. This invention alleviates data congestion and latency issues in cloud-edge communication, solves problems such as large video monitoring data files, high bandwidth requirements, and data processing congestion in chemical plant production processes, and ensures high compression ratios and low compression errors for video monitoring data while preserving the original main features and key information. This improves the transmission and processing efficiency of video monitoring data, achieving efficient and accurate transmission of monitoring videos. This invention provides technical support for reducing the loading time of video images during video surveillance retrieval, making it more convenient to view the actual safety production situation of chemical plants, and improving the timeliness of status assessment and analysis during risk monitoring and early warning.
[0044] Example 1
[0045] Figure 1 This is a step diagram illustrating a method for transmitting monitoring video of a chemical plant according to an embodiment of this application. The following refers to... Figure 1 This will explain each step of the method.
[0046] like Figure 1 As shown, in step S110, the YUV values of each frame of the video to be transmitted are obtained. For each frame, multiple first matrices representing the YUV color space are generated, corresponding to the Y, U, and V components respectively. Then, each first matrix is converted into a projection matrix to obtain a dimensionality-reduced matrix for extracting key image features. Specifically, in this embodiment, the Y, U, and V values of each pixel in each frame of the video to be transmitted are obtained, thus obtaining a first set of values composed of the Y, U, and V values of each frame, which is used as the YUV value of the corresponding image. Based on this, for each frame, the same frame is converted into different matrix forms, using the Y value as component Y, the U value as component U, and the V value as component V respectively. The different matrix forms obtained are the multiple first matrices representing the YUV color space. Next, each first matrix is converted into a projection matrix, thereby using the projection matrix to reduce the dimensionality of each first matrix, finally obtaining a dimensionality-reduced matrix for extracting key image features (e.g., the location of key equipment and facilities in chemical plants and the area where on-site personnel are located during maintenance and repair operations).
[0047] In the step of obtaining the YUV values of each frame of the video to be transmitted and generating multiple first matrices representing the YUV color space for each frame of the video, corresponding to the components Y, U, and V respectively, the RGB values of each frame of the video to be transmitted are first obtained, and multiple second matrices representing the RGB color space corresponding to the components R, G, and B respectively are generated for each frame of the video. Then, using all the second matrices of each frame of the video, the components Y, U, and V of the corresponding image are calculated, and first matrices corresponding to different components are formed, thereby obtaining multiple first matrices.
[0048] Specifically, after obtaining the video to be transmitted, images are extracted frame by frame from the current video to be transmitted, and each extracted frame is preprocessed. Since most of the extracted images are grayscale images with RGB colors, this embodiment obtains the R, G, and B values of each pixel in each frame, thereby obtaining a second set of values composed of the R, G, and B values of each frame, which is used as the RGB values of the corresponding image. Based on this, for each frame, the same frame is converted into different matrix forms using the R value as component R, the G value as component G, and the B value as component B, respectively. The different matrix forms are multiple second matrices representing the RGB color space. Next, using all the second matrices of each frame, the Y, U, and V values of each pixel in the corresponding image are calculated, thereby forming different first matrices adapted to the positions of the elements in each second matrix, using the Y value as component Y, the U value as component U, and the V value as component V, respectively, resulting in multiple first matrices.
[0049] In this embodiment, the Y, U, and V values of each pixel in the corresponding image are calculated using the following expressions:
[0050] Y=0.299×R+0.587×G+0.114×B (1)
[0051] U=0.5×R-0.4187×G-0.0813×G+128 (2)
[0052] V=-0.1687×R-0.3313×G+0.5×B+128 (3)
[0053] Where Y, U, and V represent the Y value, U value, and V value, respectively, and R, G, and B represent the R value, G value, and B value, respectively.
[0054] In the step of converting each first matrix into a projection matrix, the covariance matrix corresponding to each first matrix is obtained. Then, eigenvalue decomposition is performed on each covariance matrix to obtain the eigenvector of each covariance matrix. Finally, the corresponding projection matrix is obtained using each eigenvector.
[0055] Specifically, in this embodiment, the covariance matrix of each first matrix is calculated, thereby obtaining the corresponding projection matrix by solving for the eigenvalues and eigenvectors of the covariance matrix. In solving for the eigenvalues and eigenvectors of the covariance matrix, eigenvalue decomposition is first performed on each covariance matrix to obtain eigenvalues, and then eigenvectors corresponding to each eigenvalue are obtained. For each covariance matrix, the eigenvectors are arranged in descending order according to their corresponding eigenvalues to form a new matrix (i.e., the eigenvector matrix). Finally, the new matrix is used to calculate the projection matrix, which has the ability to obtain a dimensionality-reduced matrix for extracting key image features.
[0056] In obtaining the covariance matrix corresponding to each first matrix, each first matrix is centered, and the centered first matrix is then used to calculate the corresponding covariance matrix. In this embodiment, for each first matrix, the mean of each dimension is subtracted to make the mean of each dimension zero, thereby achieving the purpose of centering each first matrix. After obtaining the centered first matrix, the corresponding covariance matrix is further calculated using each centered first matrix.
[0057] In this embodiment, the first matrix is centered using the following expression:
[0058]
[0059] Among them, X ′ Let x represent the first matrix after centering, m represent the number of columns in the first matrix, and i represent the i-th row of the first matrix.
[0060] Next, in this embodiment of the application, the covariance matrix is calculated using the following expression:
[0061]
[0062] Among them, X * Let X be the mean matrix of the first matrix after centering. conv Let T denote the covariance matrix, and T denote the transpose.
[0063] In obtaining the eigenvectors of each covariance matrix, a specified number of eigenvalues are extracted from the decomposition results of each covariance matrix in descending order to form the corresponding eigenvectors. Specifically, in this embodiment, after completing the eigenvalue decomposition, the eigenvalues of each covariance matrix are arranged in descending order, and then a specified number of eigenvalues from the first to the specified number are extracted to form the eigenvectors of each covariance matrix. In one specific embodiment of this application, the specified number is 50.
[0064] In one specific embodiment of this application, the projection matrix capable of obtaining a dimensionality-reduced matrix for extracting key image features is calculated using the following expression:
[0065] X conv ·w i =λ i ·w i (7)
[0066] W = {w1, w2, ..., w} 50} (8)
[0067] Where λ represents the eigenvector of the covariance matrix, w represents the eigenvalue, and W represents the projection matrix.
[0068] In the step of obtaining the dimensionality reduction matrix for extracting key image features, the dimensionality reduction matrix of each frame is obtained by calculating the product of each first matrix and the corresponding projection matrix. In this embodiment, the dimensionality reduction matrix is calculated using the following expression:
[0069]
[0070] in, Let X represent the dimension reduction matrix, and let X represent the first matrix.
[0071] Further, in step S120, each dimensionality reduction matrix is decomposed into several block matrices of the same dimension, and each block matrix is quantized. Then, for each dimensionality reduction matrix, a first serialization sort is performed on the single quantized block matrix, and a second serialization sort is performed on all quantized block matrices after the first serialization sort to obtain the YUV color space array of each frame image. In this embodiment, each dimensionality reduction matrix is decomposed into several block matrices with a specified dimension preset below, forming a data matrix combination of block matrices for each frame image. At the same time, a custom standard quantization matrix is used to quantize each block matrix to obtain the corresponding quantized block matrix, thus realizing the initial compression of the video to be transmitted. Next, for each dimension-reduced matrix, the data in each quantized block matrix is first serialized and sorted as the sorting object, which is called the first serialization sort, forming an array corresponding to each block matrix. Then, the arrays corresponding to all quantized block matrices after the first serialization sort are used as sorting objects for the second serialization sort, obtaining color space arrays for components Y, U, and V respectively, thus forming the YUV color space array for each frame of image that can be transmitted.
[0072] In the embodiments of this application, both the first and second serialization sorting are performed using the Zigzag arrangement method.
[0073] Next, the process of forming a YUV color space array for each frame of image that can be transmitted will be illustrated with an example. In a specific embodiment of this application, each dimension-reduced matrix is decomposed into several block matrices of dimension 8*8, and quantized block matrices are obtained. Then, for each dimension-reduced matrix, each data in a single quantized block matrix is first sorted by Zigzag serialization to form a 64-bit array that can be transmitted for each block matrix. Then, each array corresponding to all quantized block matrices after the first serialization sort is sorted by Zigzag serialization to obtain color space arrays for components Y, U, and V, respectively, thereby forming a YUV color space array for each frame of image that can be transmitted.
[0074] In the step of decomposing each dimensionality-reduced matrix into several block matrices of the same dimension, each dimensionality-reduced matrix is divided into blocks according to a specified dimension, resulting in several block matrices. If any block matrix fails to satisfy the specified dimension, its corresponding elements are set to zero, ensuring that all block matrices satisfy the specified dimension. Specifically, this embodiment pre-sets a specified dimension for dividing each dimensionality-reduced matrix into blocks, resulting in each block matrix with the specified dimension. In practical applications, during the decomposition process, block matrices that fail to satisfy the specified dimension may arise due to the inability to meet the equal division condition. In such cases, zero values are used to fill the block matrices that fail to satisfy the specified dimension; that is, the missing elements in the block matrices that fail to satisfy the specified dimension are set to zero, thereby achieving the goal of ensuring that all block matrices satisfy the specified dimension.
[0075] Before quantizing each block matrix, this invention employs a change analysis method to process each block matrix, obtaining the optimal YUV color space array based on filtering high-frequency information in each frame of the image. In practical applications, frequency domain transformation methods can be used to filter high-frequency insensitive information in the image. Therefore, this embodiment uses a change analysis method to process each block matrix to filter high-frequency information in each frame of the image, thereby effectively reducing the amount of data during transmission and improving transmission efficiency.
[0076] In this embodiment of the application, the specified dimension is preferably 8*8, wherein each block matrix is processed using the following expression:
[0077]
[0078] x, y = 0, 1, ..., 7 (11)
[0079]
[0080] in, Let A represent the block matrix after the transformation analysis, and let A represent the transformation matrix. Let represent a block matrix, where x and y represent the number of rows and columns of the matrix, respectively, and alpha represents the correction function. This represents the value in the i-th row and j-th column of the block matrix, where u represents the number of rows or columns of the matrix.
[0081] In one specific embodiment of this application, each dimensionality-reduced matrix is decomposed into several 8*8 block matrices. Then, each block matrix is quantized using the following expression:
[0082]
[0083] in, This represents the quantized block matrix, and Q represents the custom standard quantization matrix.
[0084] Furthermore, in step S130, each frame of the image is encoded and compressed using a YUV color space array, thereby completing video transmission by transmitting the encoded and compressed image. Specifically, this embodiment uses a YUV color space array to encode and compress each frame of the image, that is, further compression of the video to be transmitted is achieved on the basis of the initial compression. Therefore, this invention, based on a fusion processing method of image feature extraction and byte encoding compression, completes video transmission by transmitting encoded and compressed (multiple compressions completed) images, improving data transmission efficiency, reducing network bandwidth loss, and significantly reducing the parsing time of the storage process, thus possessing practical research significance and application value.
[0085] In the step of encoding and compressing each frame of image using the YUV color space array, firstly, based on the Huffman coding principle, the frequency of occurrence of different values in the YUV color space array is used as the weight of the Huffman tree node to construct a Huffman tree and form a corresponding Huffman tree coding table; then, the Huffman tree coding table and the block matrix after the second serialization sorting are written into a binary file that is compatible with each frame of image to obtain the encoding and compression result of each frame of image.
[0086] Specifically, this embodiment, based on the Huffman coding principle, constructs a Huffman tree for each of the YUV color space arrays (components Y, U, and V) using the frequency of different values as weights for the Huffman tree nodes. A Huffman tree adapted to each value is constructed, recursively generating an encoding for each value and forming a corresponding Huffman tree encoding table. Simultaneously, an array matching the corresponding color space array is used to store each generated encoding. Next, the quantized block matrix after the second serialization sort is converted to binary form, obtaining the encoding of the quantized block matrix after the second serialization sort. Finally, the Huffman tree encoding table and the encoding of the quantized block matrix after the second serialization sort are written together into the image's binary file. The resulting binary file is the encoded compression result for each frame of the image.
[0087] Example 2
[0088] This invention also provides a computer-readable storage medium storing at least one instruction that is loaded and executed by a processor to perform the operation of transmitting monitoring video of a chemical plant as described in the above embodiments. For example, the computer-readable storage medium may be ROM (Read Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc-Read Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.
[0089] Example 3
[0090] In this embodiment of the invention, a processor converts the video to be transmitted into an encoded and compressed image, and then, based on the production operation network or dedicated video network of the chemical plant, transmits the encoded and compressed image to a storage device via a network interface to achieve video transmission. The storage device, following the reverse process of data processing in the processor, converts the encoded and compressed image back into video for video storage.
[0091] Example 4
[0092] Based on the method for transmitting monitoring video of a chemical plant described in Embodiment 1 above, this embodiment of the invention also provides a system for transmitting monitoring video of a chemical plant (hereinafter referred to as "video transmission system").
[0093] Figure 2 This is a block diagram of a system for transmitting monitoring video of a chemical plant, according to an embodiment of this application. Figure 2As shown, the video transmission system in this embodiment of the invention includes: a dimensionality reduction matrix generation module 21, a color space array acquisition module 22, and a compression module 23. Specifically, the dimensionality reduction matrix generation module 21 is implemented according to the method described in step S110 above, configured to acquire the YUV values of each frame of the video to be transmitted, generate multiple first matrices representing the YUV color space corresponding to the components Y, U, and V for each frame of the image, and then convert each first matrix into a projection matrix to obtain a dimensionality reduction matrix for extracting key features of the image; the color space array acquisition module 22 is implemented according to the method described in step S120 above, configured to decompose each dimensionality reduction matrix into several block matrices of the same dimension, quantize each block matrix, and then, for each dimensionality reduction matrix, first perform a first serialization sort on the single quantized block matrix, and then perform a second serialization sort on all the quantized block matrices after the first serialization sort to obtain the YUV color space array of each frame of the image; the compression module 23 is implemented according to the method described in step S130 above, configured to encode and compress each frame of the image using the YUV color space array, thereby completing video transmission by transmitting the encoded and compressed image.
[0094] This invention proposes a method and system for transmitting monitoring videos of chemical plants. The method utilizes the YUV values of each frame in the video to be transmitted to obtain a dimensionality-reduced matrix for extracting key image features. Then, each dimensionality-reduced matrix is decomposed, and the decomposition results are serialized and sorted multiple times to obtain the YUV color space array for each frame, thereby reconstructing the image while ensuring no loss of key information. Finally, Huffman coding is used to compress the data bytes in the YUV color space array to complete the encoding and compression of each frame, thus completing video transmission by transmitting the encoded and compressed image. This invention alleviates data congestion and latency issues in cloud-edge communication, and solves problems such as large video monitoring data files, high bandwidth requirements, and data processing congestion in production processes of chemical plants such as atmospheric and vacuum distillation, catalytic cracking, and ethylene cracking. While preserving the original main features and key information of the video monitoring images, it ensures high compression ratios and low compression errors for video monitoring data, improving the transmission and processing efficiency of video monitoring data and achieving efficient and accurate transmission of monitoring videos. This invention provides technical support for reducing the loading time of video images during video surveillance retrieval, making it more convenient to view the actual safety production situation of chemical plants, and improving the timeliness of status assessment and analysis during risk monitoring and early warning.
[0095] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0096] Of course, the present invention may have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and modifications according to the present invention, but these corresponding changes and modifications should all fall within the protection scope of the claims of the present invention.
[0097] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.
[0098] While the embodiments disclosed in this invention are as described above, the content is merely for the purpose of facilitating understanding of the invention and is not intended to limit the invention. Any person skilled in the art to which this invention pertains may make any modifications and variations in form and detail of the implementation without departing from the spirit and scope disclosed herein; however, the scope of patent protection for this invention shall still be determined by the scope defined in the appended claims.
Claims
1. A method for transmitting monitoring video of a chemical plant, characterized in that, include: The YUV values of each frame in the video to be transmitted are obtained. For each frame, multiple first matrices representing the YUV color space are generated, corresponding to the Y, U and V components respectively. Then, each first matrix is converted into a projection matrix to obtain a dimension reduction matrix for extracting key features of the image. Each dimension reduction matrix is decomposed into several block matrices of the same dimension, and each block matrix is quantized. Then, for each dimension reduction matrix, the block matrix after single quantization is first serialized and sorted, and then all the quantized block matrices after the first serialization and sorting are serialized and sorted a second time to obtain the YUV color space array of each frame image. The YUV color space array is used to encode and compress each frame of the image, thereby completing the video transmission by transmitting the encoded and compressed image.
2. The method according to claim 1, characterized in that, The step of obtaining the YUV values of each frame in the video to be transmitted, and generating multiple first matrices representing the YUV color space for each frame, corresponding to the Y, U, and V components respectively, includes: Obtain the RGB values of each frame in the video to be transmitted, and generate multiple second matrices representing the RGB color space for each frame, corresponding to the components R, G, and B respectively. Using all the second matrices of each frame of image, calculate the corresponding image components Y, U and V, and form the first matrices corresponding to different components, thereby obtaining the plurality of first matrices.
3. The method according to claim 1 or 2, characterized in that, The step of converting each first matrix into a projection matrix includes: Obtain the covariance matrix corresponding to each first matrix, then perform eigenvalue decomposition on each covariance matrix to obtain the eigenvector of each covariance matrix, and then use each eigenvector to obtain the corresponding projection matrix.
4. The method according to claim 3, characterized in that, The process of obtaining the covariance matrix corresponding to each first matrix includes: Each first matrix is centered, and the corresponding covariance matrix is then calculated using the centered first matrix.
5. The method according to claim 3 or 4, characterized in that, The process of obtaining the eigenvectors of each covariance matrix includes: Extract a specified number of eigenvalues from the decomposition results of each covariance matrix in descending order to form the corresponding eigenvectors.
6. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the dimensionality-reduced matrix used to extract key image features includes: The dimensionality reduction matrix of each frame of the image is obtained by calculating the product of each first matrix and the corresponding projection matrix.
7. The method according to any one of claims 1 to 6, characterized in that, The step of decomposing each dimension-reduced matrix into several block matrices of the same dimension includes: Each dimension-reduced matrix is divided into blocks according to a specified dimension to obtain the plurality of block matrices. If there is a block matrix that cannot satisfy the specified dimension, the corresponding element is assigned a value of zero so that all block matrices satisfy the specified dimension.
8. The method according to claim 7, characterized in that, Before quantizing each block matrix, the method further includes: A variation analysis method is used to process each block matrix to obtain the corresponding optimal YUV color space array based on filtering high-frequency information in each frame of the image.
9. The method according to claim 8, characterized in that, The specified dimension is preferably 8*8, wherein each block matrix is processed using the following expression: x, y = 0, 1, ..., 7 in, Let A represent the block matrix after the transformation analysis, and let A represent the transformation matrix. Let represent a block matrix, where x and y represent the number of rows and columns of the matrix, respectively, and alpha represents the correction function. This represents the value in the i-th row and j-th column of the block matrix, where u represents the number of rows or columns of the matrix.
10. The method according to claim 9, characterized in that, Each block matrix is quantized using the following expression: in, This represents the quantized block matrix, and Q represents the custom standard quantization matrix.
11. The method according to any one of claims 1 to 10, characterized in that, Both the first and second serialization sorting are performed using the Zigzag arrangement method.
12. The method according to any one of claims 1 to 11, characterized in that, The step of encoding and compressing each frame of image using the YUV color space array includes: Based on the Huffman coding principle, the frequency of occurrence of different values in the YUV color space array is used as the weight of the Huffman tree node to construct the Huffman tree and form the corresponding Huffman tree coding table. The Huffman tree encoding table and the block matrix after the second serialization sorting are written into a binary file adapted to each frame of the image to obtain the encoding compression result of each frame of the image.
13. A computer-readable storage medium, characterized in that, It includes a series of instructions for performing the method steps of transmitting monitoring video of a chemical plant as described in any one of claims 1 to 12.
14. A system for transmitting monitoring video of a chemical plant, characterized in that, The system includes the following modules: The dimension reduction matrix generation module is used to obtain the YUV values of each frame of the video to be transmitted, generate multiple first matrices representing the YUV color space for each frame of the video, corresponding to the Y, U and V components respectively, and then convert each first matrix into a projection matrix to obtain a dimension reduction matrix for extracting key features of the image. The color space array acquisition module is used to decompose each dimension reduction matrix into several block matrices of the same dimension and quantize each block matrix. Then, for each dimension reduction matrix, the first serialization sorting is performed on the single quantized block matrix, and the second serialization sorting is performed on all the quantized block matrices after the first serialization sorting to obtain the YUV color space array of each frame image. The compression module is used to encode and compress each frame of the image using the YUV color space array, thereby completing video transmission by transmitting the encoded and compressed image.