Edge Computing Method, System, Medium and Device for Water Service Internet of Things Device Data
Through edge gateway equipment, the video data of water IoT devices is filtered and compressed, and the similarity of the pixels of the image are used for segmentation processing, which solves the problem of video data processing in water scenes, realizes efficient edge computing and accurate information transmission, reduces the delay and complexity of data transmission, and supports intelligent water management.
Patent Information
- Application Number
- CN202510586063.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-05-08
AI Technical Summary
In the prior art, it is difficult to achieve effective edge computing in video data processing in water operations, especially due to the complexity of video data and large amount of data, which leads to data transmission delay and security issues, and it is impossible to respond to pollution incidents and flood disasters in a timely manner.
The video data is filtered and compressed through the edge computing module of the edge gateway device, and the pixel similarity of the frame image in the video data is used for segmentation processing, similar images are filtered and deleted, the video data length and color richness are reduced, the feature matrix is built, and important data is sent to the water management cloud first.
It realizes efficient edge computing and accurate information transmission of video data, reduces data transmission delay and complexity, improves the reliability of data transmission, and provides technical support for intelligent water management.
Smart Images

Figure CN120104348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water management, and specifically relates to a method, system, medium and device for edge computing of water IoT device data. Background Art
[0002] With the increasing shortage of water resources and the severity of water pollution problems, intelligent water management has become one of the important means to solve water resource management and protection. Countless sensors and water IoT devices distributed in various water scenarios can sense and process various data in real time, and transmit the information to the water management cloud, so as to achieve precise management and optimal allocation of water resources. However, there are a large number of various types of sensors and video devices set in water scenarios, and a large amount of multi-type data needs to be processed. The latency and security of data transmission increase the uncertainty of the connection between the water management cloud and water IoT devices, and also lead to the inability to respond in a timely manner when safety events such as pollution incidents and flood disasters occur. Edge computing can realize the processing and analysis of data at the water scenario end, and reduce the difficulty of data transmission between water IoT devices and the water management cloud. However, in the prior art, edge computing gateway devices can realize the edge computing processing of sensor data, but there are few proposed edge processing technologies for video data. For the video data in water scenarios, it has the characteristics of complex video data elements and large data volume, which also increases the difficulty of edge computing and processing of video data. Therefore, there is an urgent need to propose a method, system, medium and device for edge computing of water IoT device data for edge computing and processing of video data. Summary of the Invention
[0003] In view of the above deficiencies in the prior art, the present invention provides a method, system, medium and device for edge computing of water IoT device data, which reduces the data volume of video data by compressing and filtering the video data collected by water IoT devices, and realizes the edge computing and processing of water video data.
[0004] In order to achieve the above invention purpose, the technical solutions adopted by the present invention are as follows:
[0005] Provide a method for edge computing of water IoT device data, which includes:
[0006] Step S1: The water IoT device transmits the video data to the edge gateway device, and an edge computing module is set in the edge gateway device, and the edge computing module is used to filter the video data;
[0007] Step S2: The edge computing module compresses the color in the frame image based on the similarity between pixels in the frame image according to the frame image in the filtered video data, and obtains the compressed video data;
[0008] Step S3: Calculate the importance degree of the video data based on the sizes of the video data before and after compression, and determine the preferentially processed compressed video data based on the importance degrees of the video data processed by the edge computing module within a set time period. , and establish a feature matrix of the video data . ;
[0009] Step S4: The edge gateway device preferentially sends the feature matrix to the water management cloud, and the water management cloud obtains the most important video data collected from the water IoT devices within a set time period by parsing the feature matrix .
[0010] Furthermore, step S1 includes:
[0011] Step S11: The edge gateway device splits the video data into N frame images according to the time series, and splits the video data into different video data segments by using the similarity between two grayscale frame images;
[0012] Step S12: Based on the grayscale frame images within each video data segment, use the pixel grayscale values in the grayscale frame images to identify the contours in the frame images, and judge whether they are similar based on the contour changes between two adjacent frame images, and filter out the similar frame images to shorten the length of the video data segment.
[0013] Furthermore, step S11 includes:
[0014] Step S111: The edge gateway device splits the video data into N frame images according to the time series, performs grayscale processing on each frame image to obtain grayscale frame images, and obtains the grayscale value of each pixel in the grayscale frame images;
[0015] Step S112: Calculate the similarity between two adjacent grayscale frame images in the time series based on the grayscale values of the pixels in the grayscale frame images;
[0016] ;
[0017] Among them, n is the number of the grayscale frame image, is the pixel coordinate on the grayscale frame image, is the n th pixel grayscale value of the grayscale frame image, is the n -1th pixel grayscale value of the grayscale frame image, L is the size of the grayscale frame image, is two adjacent grayscale frame images n and the grayscale frame imagen similarity between -1;
[0018] Step S113: Obtain N similarity data between adjacent two grayscale frame images within a grayscale frame image , for adjacent two grayscale frame images N and grayscale frame image N similarity between -1;
[0019] Step S114: Based on the first similarity, traverse the similarities in sequence starting from the second similarity, and calculate the difference between the first similarity and each traversed similarity ;
[0020] ;
[0021] Step S115: Set the threshold of the difference ;
[0022] If , then judge the similarity corresponding two adjacent grayscale frame images n , grayscale frame image n -1 have large image content changes, and the video segment content between grayscale frame image 1 and grayscale frame image n -1 has small differences. Take the video data within the time series range of grayscale frame image 1 to grayscale frame image n -1 as the first split video data segment;
[0023] Otherwise, the video segment content between the two adjacent grayscale frame images corresponding to the similarity n , grayscale frame image n -1 has small changes;
[0024] Step S116: Return to Step S114, based on the similarity , traverse the remaining similarity data in sequence, and execute Step S114 - Step S115 until all the video data is split into different video data segments.
[0025] Furthermore, Step S12 includes:
[0026] Step S121: Based on the grayscale frame images within each video data segment, screen the pixels on the contour boundary according to the pixel grayscale values in the grayscale frame images;
[0027] When the difference between the pixel grayscale values of two adjacent pixels meets , then determine the pixel i and pixeli -1 is located on the contour boundary; i is the number of the pixel in the grayscale frame image, is the pixel i pixel coordinates, is the pixel i -1 pixel coordinates, is the grayscale difference threshold for determining that the pixel is on the contour boundary, is the pixel i pixel grayscale value, is the pixel i -1 pixel grayscale value;
[0028] Otherwise, it is determined that the pixel i and the pixel i -1 is not located on the contour boundary;
[0029] Step S122: Calculate the coordinates of the midpoint of the pixels on the contour boundary , u is the number of the midpoint of the pixel;
[0030] ;
[0031] Step S123: Obtain the coordinate data of all the midpoints of the pixels on the contour boundary in the frame image , U is the number of the midpoints of the pixels, is the U th coordinate of the midpoint of the pixel;
[0032] Step S124: Screen the midpoints of the pixels located on the same contour boundary from the coordinate data to form a set of midpoints of the pixels on the contour boundary A , and the coordinate data of the midpoints of the pixels in the set of midpoints of the pixels on the contour boundary A satisfies the constraint condition:
[0033] ;
[0034] Among them, are the coordinates of two midpoints of the pixels in the set of midpoints of the pixels on the contour boundary A respectively, d is the side length of a single pixel, a is the number of the midpoints of the pixels in the set of midpoints of the pixels on the contour boundary A ;
[0035] Step S125: Connect all the midpoints of the pixels in the set of midpoints of the pixels on the contour boundary A in sequence to form a contour boundary line, and the midpoints of the pixels on the contour boundary line are used as contour points, and calculate the pixel grayscale values of each contour point on the contour boundary line ;
[0036] Step S126: Obtain all the contour boundary lines existing in each grayscale frame image within the video data segment, and project the contour boundary lines in the grayscale frame image of the previous frame within the video data segment t onto the grayscale frame image t +1 of the next frame, and calculate the pixel grayscale values of each contour point on the projected contour boundary line in the grayscale frame image t +1; , which are respectively the pixel grayscale values of the pixels on both sides of the contour point on the projected contour boundary line in the grayscale frame image t +1 and the pixel i -1; i
[0037] Step S127: Calculate the contour change coefficient according to the pixel grayscale values of the corresponding contour points on the contour boundary lines of the grayscale frame image t +1 and the grayscale frame image t ;
[0038] ;
[0039] Among them, S is the number of contour lines in the grayscale frame image t , s is the contour line number, b is the number of contour points on the contour boundary line, is the allowable value of the difference in pixel grayscale values of the contour points;
[0040] Step S128: Set the threshold of the contour change coefficient; if , then it is determined that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, and the grayscale frame image t and the grayscale frame image t +1 are retained; otherwise, it is determined that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, the grayscale frame image t +1 is deleted, and the grayscale frame image t is retained;
[0041] Step S129: Update the grayscale frame images within the video data segment, return to Step S126, and execute Steps S126 - S128 to continue calculating the contour change coefficients between adjacent grayscale frame images until all similar grayscale frame images within the video data segment are deleted;
[0042] Step S1210: Restore the remaining grayscale frame images to frame images, combine them into a filtered video data segment according to the frame order between the remaining frame images, and then splice the filtered video data segments to obtain the filtered video data.
[0043] Further, step S2 includes:
[0044] Step S21: Extract the grayscale frame images corresponding to the frame images in the filtered video data, screen similar pixel groups according to the pixel grayscale values in the grayscale frame images, and the pixels in the pixel group satisfy the constraint conditions:
[0045] ;
[0046] Among them, u 、 v are the numbers of any two pixels in the pixel group, c 、 e are the numbers of two adjacent pixels in the pixel group, are the pixel coordinates of two adjacent pixels in the pixel group, is the error threshold of the pixel grayscale value in the grayscale frame image;
[0047] Step S22: Divide the pixels in the grayscale frame image into M pixel groups, calculate the average value of the pixel grayscale values in each pixel group, m is the number of the pixel group, V is the number of pixels in the pixel group, and adjust the pixel grayscale values of all pixels in the pixel group m to the average value , and unify the pixel grayscale values in the pixel group m ;
[0048] Step S23: After unifying the pixel grayscale values of all pixel groups in the grayscale frame image, form a compressed grayscale frame image, and restore the compressed grayscale frame image to a frame image to form compressed video data.
[0049] Further, step S3 includes:
[0050] Step S31: Calculate the importance degree K 2 of the video data according to the size of the compressed video data, K 1 is the size of the video data received by the edge gateway device;
[0051] Step S32: Obtain the importance degree data of all compressed video data within a set time period, w is the number of compressed video data, is the importance level of the w th compressed video data;
[0052] Step S33: Screen out the minimum value in the importance level data , and process the compressed video data corresponding to the minimum value preferentially, and establish the feature matrix of the video data ; ;
[0053] ; ;
[0054] Among them, W is the number of frame images in the video data , is the feature matrix of the W th frame image, is the feature matrix of the pixel group in the frame image, is the pixel gray value of the M th pixel group, is the coordinate data set of the pixels in the pixel group.
[0055] Provide a water service Internet of Things device data edge computing system, which executes the above-mentioned water service Internet of Things device data edge computing method, and includes:
[0056] Water service Internet of Things devices, including several water service video data acquisition terminals, several water service video data acquisition terminals are connected to the edge gateway device through the Internet of Things, and the video data collected by the water service video data acquisition terminals is sent to the edge gateway device;
[0057] Edge gateway device, used to receive the video data collected by the water service video data acquisition terminals, an edge computing module is built in the edge gateway device, and the edge computing module is used to filter and compress the video data, construct the feature matrix of the video data, and send it to the water service management cloud;
[0058] Water service management cloud, used to analyze the feature matrix of the video data to obtain the video data collected by the water service Internet of Things devices.
[0059] Provide a computer-readable storage medium for storing a program, and when the program is executed by a processor, it implements the steps of the above-mentioned water service Internet of Things device data edge computing method.
[0060] Provide a water service Internet of Things device data edge computing device, which is connected to the edge gateway device, and includes a processor and a memory;
[0061] The memory stores computer execution instructions;
[0062] The processor executes the computer-executable instructions stored in the memory, causing the processor to execute the above-mentioned edge computing method for water IoT device data.
[0063] The beneficial effects of the present invention are as follows: By utilizing the feature similarity between pixels within the frame images of video data, the video data is segmented, and the similar frame images within the video data segments are filtered, reducing the length of the video data while retaining the valid information within the video data. Moreover, it effectively reduces the color richness of the frame images in the video data, reduces the size of the frame images, and thus reduces the size of the video data, achieving the compression of the video data. By extracting the feature matrix of the video data and sending it to the water management cloud, the complexity of the sent data packets can be effectively reduced, the latency of data transmission between the edge gateway device and the water management cloud can be reduced, and the reliability of data transmission can be increased. It can achieve efficient edge computing and accurate information transmission of water service video data, providing reliable technical support for the intelligent management of water services. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a principle block diagram of an edge computing system for water IoT device data.
[0065] Figure 2 It is a schematic diagram of the contour boundary line. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0066] The following describes the specific embodiments of the present invention to facilitate those skilled in the art of the present technology to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the inventive concept of the present invention are within the scope of protection.
[0067] An edge computing method for water IoT device data includes:
[0068] Step S1: The water IoT device transmits video data to the edge gateway device. An edge computing module is provided in the edge gateway device, and the video data is filtered using the edge computing module. In this embodiment, the water IoT device mainly includes water service video data acquisition terminals installed in different water service scenarios. For example, it collects video data of reservoirs, monitors the shape change of the reservoir water level line, and obtains the water level change data of the reservoir; it collects video data of the flood water level change during flood disasters and obtains flood spread data, etc. The edge gateway device serves multiple water service video data acquisition terminals in the water service scenario and provides edge computing services.
[0069] Step S1 specifically includes:
[0070] Step S11: The edge gateway device splits the video data into N frame images according to the time series, and splits the video data into different video data segments by using the similarity between two grayscale frame images. Step S11 specifically includes:
[0071] Step S111: The edge gateway device splits the video data into N frame images according to the time series, performs grayscale processing on each frame image to obtain grayscale frame images, and obtains the grayscale values of each pixel in the grayscale frame images;
[0072] Step S112: Calculate the similarity between two adjacent grayscale frame images in the time series based on the grayscale values of the pixels in the grayscale frame images;
[0073] ;
[0074] Among them, n is the number of the grayscale frame image, is the pixel coordinate on the grayscale frame image, is the n th pixel grayscale value of the grayscale frame image, is the n th - 1 pixel grayscale value of the grayscale frame image, L is the size of the grayscale frame image, is the similarity between two adjacent grayscale frame images n and the grayscale frame image n -1;
[0075] Similarity represents the similarity degree in pixel color expression between two adjacent grayscale frame images. The larger the similarity, the smaller the similarity degree, and vice versa, thus expressing the similar length of the content on two frame images.
[0076] Step S113: Obtain N the similarity data between two adjacent grayscale frame images within the grayscale frame images ; N is the similarity between two adjacent grayscale frame images N and the grayscale frame image
[0077] Step S114: Based on the first similarity, traverse the similarities starting from the second similarity, and calculate the difference between the first similarity and each traversed similarity ;
[0078] ;
[0079] Indicates the difference in the degree of change in the frame image content on the left and right of two video frame nodes. The difference value The larger the value, the greater the difference in the degree of change in the frame content between the two video frame nodes. From this, it is judged whether the video content between the two video frame nodes changes little, and then whether it can be used as a video data segment.
[0080] Step S115: Set the threshold of the difference value , the threshold value Indicates the maximum allowable difference in the similarity degree between the frame images on both sides of two video frame nodes, and is used as the judgment criterion for whether to segment the video data. When the difference value is greater than the threshold value , it indicates that the difference in the image content change between the corresponding two video frame nodes is large, and the second video frame node is used as the segmentation node to segment the video data. Otherwise, it indicates that the difference in the image content change corresponding to the two video frame nodes is small and can be used as a segment of video data;
[0081] If , then judge the similarity degree The corresponding two adjacent grayscale frame images n and the grayscale frame image n -1 have a large difference in the image content change. The video segment content between the grayscale frame image 1 and the grayscale frame image n -1 has a small difference. The video data within the time series range of the grayscale frame image 1 to the grayscale frame image n -1 is used as the first segment of video data split out, and the video frame corresponding to the grayscale frame image n -1 is used as the segmentation node;
[0082] Otherwise, the similarity degree The corresponding two adjacent grayscale frame images n and the grayscale frame image n -1 have a small difference in the video segment content change;
[0083] Step S116: Return to step S114, and based on the similarity degree , sequentially traverse the remaining similarity data, and execute steps S114 - S115 until all the video data is split into different video data segments.
[0084] Step S12: Based on the grayscale frame images within each video data segment, use the pixel grayscale values in the grayscale frame images to identify the contours in the frame images, and judge whether they are similar based on the contour changes between two adjacent frame images, and filter out the similar frame images to shorten the length of the video data segment.
[0085] During the video monitoring of the water level line, the contour line is mainly the water level line in the reservoir. There will be an obvious color difference between the water level line and the surrounding mountains. And when the water level changes, the submerged depth of the surrounding mountains will also change, which will also cause the contour line of the mountains in the video to change.
[0086] During the video monitoring of the flood line, as the flood spreads, the flood line will move and change its contour in the video. From this, the speed of the flood spread can be judged. Similarly, according to the flooding situation of the flood, the contour lines of the mountains and other elements in the video will also change.
[0087] Step S12 specifically includes:
[0088] Step S121: Based on the grayscale frame images within each video data segment, filter the pixels on the contour boundary according to the pixel grayscale values within the grayscale frame images;
[0089] When the difference in pixel grayscale values between two adjacent pixels satisfies , then it is determined that the pixel i and the pixel i -1 are located on the contour boundary; i is the number of the pixel within the grayscale frame image, is the pixel coordinate of the pixel i , is the pixel coordinate of the pixel i -1, is the grayscale difference threshold for determining that a pixel is located on the contour boundary, serving as the judgment standard for the grayscale difference between the pixels on both sides of the contour boundary, are respectively the pixel grayscale values of the pixel i and the pixel i -1;
[0090] Otherwise, it is determined that the pixel i and the pixel i -1 are not located on the contour boundary;
[0091] Step S122: Calculate the coordinates of the midpoints of the pixels on the contour boundary , u is the number of the pixel midpoint;
[0092] ;
[0093] Step S123: Obtain the coordinate data of the midpoints of all pixels on the contour boundary in the frame image , U is the number of pixel midpoints, is the U th coordinate of the pixel midpoint;
[0094] Step S124: From the coordinate data Filter the midpoints of the pixels located on the same contour boundary to form a set of midpoints of the pixels on the contour boundary A , the set of midpoints of the pixels A The coordinate data of the midpoints of the pixels in the set satisfy the constraint conditions:
[0095] ;
[0096] Among them, are the coordinates of two midpoints of the pixels in the set of midpoints of the pixels A respectively, d is the side length of a single pixel, a is the number of the midpoint of the pixel in the set of midpoints of the pixels A ;
[0097] Step S125: Connect all the midpoints of the pixels in the set of midpoints of the pixels A in sequence to form a contour boundary line. The midpoints of the pixels on the contour boundary line are used as contour points, and the pixel gray values of each contour point on the contour boundary line are calculated ;
[0098] As Figure 2 shown, a schematic diagram of the contour boundary line obtained after pixel magnification is provided. In the figure, a square represents a pixel. Whether the midpoint of the pixel (i.e., the contour point) is located on the contour boundary is filtered by the distance difference between adjacent pixels. Only when the distance between the midpoints of the pixels is between d and is it located on the same boundary contour.
[0099] Step S126: Obtain all the contour boundary lines existing in each grayscale frame image in the video data segment, project the contour boundary lines in the grayscale frame image t of the previous frame in the video data segment onto the grayscale frame image t +1 of the next frame, and calculate the pixel gray values of each contour point on the projected contour boundary line in the grayscale frame image t +1 , are the gray values of the pixels t and the pixel i on both sides of the contour point on the projected contour boundary line in the grayscale frame image i -1 respectively;
[0100] Step S127: Calculate the contour change coefficient according to the pixel gray values of the corresponding contour points on the contour boundary lines of the grayscale frame image t +1 and the grayscale frame image t ;
[0101] ;
[0102] Among them, S is the number of contour lines on the grayscale frame image t , s is the contour line number, b is the number of contour points on the contour boundary line, is the allowable value of the difference in pixel grayscale values of the contour points;
[0103] Step S128: Set the threshold of the contour change coefficient , the threshold is used as the standard for determining whether the image content is similar by the contour similarity between images;
[0104] If , then it is determined that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, and the grayscale frame image t and the grayscale frame image t +1 are retained; otherwise, it is determined that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, the grayscale frame image t +1 is deleted, and the grayscale frame image t is retained;
[0105] Step S129: Update the grayscale frame images in the video data segment, return to Step S126, and execute Steps S126 - S128 to continue calculating the contour change coefficient between adjacent grayscale frame images until all similar grayscale frame images in the video data segment are deleted;
[0106] Step S1210: Restore the remaining grayscale frame images to frame images, combine them into a filtered video data segment according to the frame order between the remaining frame images, and then splice the filtered video data segment to obtain the filtered video data.
[0107] Step S2: The edge computing module compresses the color in the frame image based on the similarity between pixels in the frame image according to the frame images in the filtered video data to obtain the compressed video data. Step S2 specifically includes:
[0108] Step S21: Extract the grayscale frame image corresponding to the frame image in the filtered video data, and screen similar pixel groups according to the pixel grayscale values in the grayscale frame image. The pixels in the pixel group satisfy the constraint conditions:
[0109] ;
[0110] Among them, u , v are the numbers of any two pixels in the pixel group, c ,e is the number of two adjacent pixels within a pixel group, are the pixel coordinates of two adjacent pixels within a pixel group, is the error threshold of the pixel grayscale value within the grayscale frame image;
[0111] Step S22: Divide the pixels within the grayscale frame image into M pixel groups, calculate the average value of the pixel grayscale values within each pixel group , m is the number of the pixel group, V is the number of pixels within the pixel group, adjust the pixel grayscale values of all pixels within the pixel group m to the average value , and unify the pixel grayscale values within the pixel group m ;
[0112] Step S23: After unifying the pixel grayscale values of all pixel groups within the grayscale frame image, form a compressed grayscale frame image, and restore the compressed grayscale frame image to a frame image to form compressed video data. After the pixel grayscale values are unified, on the basis of meeting the fine degree of image color expression, reduce the color complexity of the frame image, thereby reducing the size of the video data and the storage space occupied by the video data.
[0113] Step S3: Calculate the importance degree of the video data according to the size of the video data before and after compression. Based on the importance degree of the video data processed by the edge computing module within a set time period, according to the computing power of the edge computing module, the video data within the set time period will be segmented, and the most important segment of video data will be selected and sent to the water management cloud to reduce the data transmission volume and determine the compressed video data to be preferentially processed , and establish a feature matrix of the video data . Step S3 specifically includes: .
[0114] Step S31: According to the size of the compressed video data K 2, calculate the importance degree of the video data , K 1 is the size of the video data received by the edge gateway device. The importance degree represents the change degree of the size of the video data before and after filtering and compression. The larger the importance degree data, the more video content is filtered and compressed, and the more single the content displayed in the video data. On the contrary, the more abundant the video data content;
[0115] Step S32: Obtain the importance degree data of all compressed video data within a set time period , w is the number of compressed video data, is thew The importance level of the compressed video data;
[0116] Step S33: Screen out the importance level data with the minimum value , and use the minimum value to correspond to the compressed video data for priority processing, and establish the feature matrix of the video data ; ;
[0117] ;
[0118] wherein, W is the number of frame images in the video data , is the feature matrix of the W th frame image, is the feature matrix of the pixel group in the frame image, is the pixel gray value of the M th pixel group, is the coordinate data set of the pixels within the pixel group.
[0119] Step S4: The edge gateway device preferentially sends the feature matrix to the water management cloud, and the water management cloud obtains the most important video data collected from the water IoT devices within the set time period by parsing the feature matrix .
[0120] As Figure 1 shown, a water IoT device data edge computing system that executes the above water IoT device data edge computing method includes:
[0121] Water IoT devices, including several water video data collection terminals, and several water video data collection terminals are connected to the edge gateway device through the Internet of Things. The video data collected by the water video data collection terminals is sent to the edge gateway device;
[0122] Edge gateway device, which is used to receive the video data collected by the water video data collection terminals. An edge computing module is built in the edge gateway device, and the edge computing module is used to filter and compress the video data, construct the feature matrix of the video data, and send it to the water management cloud;
[0123] Water management cloud, which is used to parse the feature matrix of the video data to obtain the video data collected by the water IoT devices.
[0124] A computer-readable storage medium is used to store a program. When the program is executed by a processor, the steps of the above-mentioned edge computing method for water IoT device data are implemented. The edge computing method for water IoT device data in this embodiment has been described in detail above and will not be elaborated here.
[0125] An edge computing device for water IoT device data is connected to an edge gateway device and includes a processor and a memory;
[0126] The memory stores computer-executable instructions;
[0127] The processor executes the computer-executable instructions stored in the memory, causing the processor to execute the above-mentioned edge computing method for water IoT device data. The edge computing method for water IoT device data here in this embodiment is the same as that described above and will not be elaborated.
[0128] The present invention utilizes the feature similarity between pixels within a frame image of video data to segment the video data, filters out similar frame images within the video data segment, reduces the length of the video data, and at the same time retains the valid information within the video data. Moreover, it effectively reduces the color richness of the frame images in the video data, reduces the size of the frame images, and thus reduces the size of the video data, achieving compression of the video data. By extracting the feature matrix of the video data and sending it to the water management cloud, the complexity of the sent data packets can be effectively reduced, the latency of data transmission between the edge gateway device and the water management cloud can be reduced, and the reliability of data transmission can be increased. It can achieve efficient edge computing and accurate information transmission of water IoT video data, providing reliable technical support for intelligent water management.
Claims
1. A method for edge computing of water service Internet of Things device data, characterized in that, Including: Step S1: The water service Internet of Things device transmits video data to the edge gateway device. An edge computing module is set in the edge gateway device, and the edge computing module is used to filter the video data. Step S2: Based on the frame images in the filtered video data, the edge computing module compresses the colors in the frame images based on the similarity between the pixels in the frame images to obtain the compressed video data. Step S3: Calculate the importance level of the video data based on the sizes of the video data before and after compression. Determine the compressed video data to be preferentially processed based on the importance levels of the video data processed by the edge computing module within a set time period , and establish the video data feature matrix ; Step S4: The edge gateway device preferentially sends the feature matrix to the water management cloud. The water management cloud obtains the most important video data collected from the water IoT devices within a set period by parsing the feature matrix ; The said step S1 includes: Step S11: The edge gateway device splits the video data into N frame images according to the time series, and splits the video data into different video data segments by using the similarity between two grayscale frame images; Step S12: Based on the grayscale frame images in each video data segment, the edge contours in the frame images are identified using the pixel grayscale values in the grayscale frame images. Whether they are similar is judged based on the contour changes between two adjacent frame images, and the similar frame images are filtered to shorten the length of the video data segment. The said step S2 includes: Step S21: The grayscale frame images corresponding to the frame images in the filtered video data are extracted, and similar pixel groups are screened according to the pixel grayscale values in the grayscale frame images. The pixels in the pixel group satisfy the constraint conditions: ; Wherein, u and v are the numbers of any two pixels in the pixel group; c and e are the numbers of two adjacent pixels in the pixel group; are the pixel coordinates of two adjacent pixels in the pixel group; is the error threshold of the pixel gray value in the gray frame image. Step S22: Divide the pixels in the grayscale frame image into M pixel groups, and calculate the average value of the pixel grayscale values within each pixel group , m is the number of the pixel group, V is the number of pixels within the pixel group, and adjust the pixel grayscale values of all pixels within the pixel group m to the average value , and unify the pixel grayscale values within the pixel group m ; Step S23: After the pixel grayscale values of all pixel groups in the grayscale frame image are unified, a compressed grayscale frame image is formed, and the compressed grayscale frame image is restored to a frame image to form the compressed video data. The said step S3 includes: Step S31: According to the size of the compressed video data K 2, calculate the importance level of the video data , K 1 is the size of the video data received by the edge gateway device; Step S32: Obtain the importance data of all compressed video data within a set time period , w is the quantity of compressed video data, is the importance of the w th compressed video data; Step S33: Screen out the minimum value of the importance level data among them , and use the minimum value to preferentially process the corresponding compressed video data and establish the feature matrix of the video data ; ; ; Among them, W is the number of frame images in the video data ; is the feature matrix of the W th frame image, is the feature matrix of the pixel group in the frame image, is the M th pixel gray value of the pixel group, is the coordinate data set of the pixels in the pixel group.
2. The method for edge computing of water service Internet of Things device data according to claim 1, wherein The said step S11 includes: Step S111: The edge gateway device splits the video data into N frame images according to the time series, grayscales each frame image to obtain a grayscale frame image, and acquires the grayscale value of each pixel in the grayscale frame image; Step S112: Based on the grayscale values of the pixels in the grayscale frame image, the similarity between two adjacent grayscale frame images in the time series is calculated. ; wherein, n is the number of the grayscale frame image, are the pixel coordinates on the grayscale frame image, is the n th pixel grayscale value of the grayscale frame image, is the pixel grayscale value of the n -1 th grayscale frame image, L is the size of the grayscale frame image, is the similarity between two adjacent grayscale frame images n and the grayscale frame image n -1; Step S113: Obtain N similarity data between two adjacent grayscale frame images within the grayscale frame images , for two adjacent grayscale frame images N and the grayscale frame image N -1; Step S114: Based on the first similarity, traverse the similarities starting from the second similarity, and calculate the difference between the first similarity and each traversed similarity in turn ; ; Step S115: Set the threshold value of the difference ; If , then judge the similarity for the two adjacent grayscale frame images n , grayscale frame image n -1, the image content changes greatly between them, and the video segment content between grayscale frame image 1 and grayscale frame image n -1 has little difference. Take the video data within the time series range where grayscale frame image 1 to grayscale frame image n -1 are located as the first segment of video data split out; Otherwise, the similarity between two corresponding adjacent grayscale frame images n and the grayscale frame image n -1 has a relatively small change in the video segment content; Step S116: Return to step S114, and based on the similarity traverse the remaining similarity data in sequence, and execute steps S114 - S115 until all the video data is split into different video data segments.
3. The method for edge computing of water service Internet of Things device data according to claim 2, characterized in that The said step S12 includes: Step S121: Based on the grayscale frame images in each video data segment, the pixels on the contour boundary are screened according to the pixel grayscale values in the grayscale frame images. When the difference in grayscale values between two adjacent pixels satisfies , it is determined that pixel i and pixel i -1 are located on the contour boundary; i is the number of the pixel within the grayscale frame image, is the pixel coordinate of pixel i , is the pixel coordinate of pixel i -1, is the grayscale difference threshold for determining that the pixel is located on the contour boundary; Otherwise, determine that the pixel i and the pixel i -1 are not located on the contour boundary; Step S122: Calculate the coordinates of the midpoints of the pixels on the contour boundary , u is the number of the pixel midpoint; ; Step S123: Obtain the coordinate data of the midpoints of the pixels on all contour boundaries in the frame image , U is the number of pixel midpoints, is the U coordinates of the nth pixel midpoint; Step S124: Select the midpoints of pixels located on the same contour boundary from the coordinate data to form a set of midpoints of pixels on the contour boundary A , and the coordinate data of the midpoints of pixels in the set of midpoints of pixels A satisfies the constraint condition: ; Among them, are the coordinates of the midpoints of two pixels within A the set of pixel midpoints respectively, d is the side length of a single pixel, a is the set of pixel midpoints A and the number of the pixel midpoint within it; Step S125: Connect all the pixel midpoints A in sequence to form a contour boundary line. The pixel midpoints on the contour boundary line are used as contour points, and the pixel grayscale values of each contour point on the contour boundary line are calculated ; Step S126: Obtain all the contour boundary lines existing in each grayscale frame image within the video data segment, and project the contour boundary lines in the grayscale frame image of the previous frame within the video data segment t onto the grayscale frame image of the next frame t +1, and calculate the pixel gray values of each contour point on the projected contour boundary line in the grayscale frame image t +1 , which are respectively the pixel gray values of the pixels on both sides of the contour point on the projected contour boundary line within the grayscale frame image t +1 i and the pixel i -1; Step S127: Calculate a contour change coefficient according to the pixel gray values of the contour points on the upper contour boundary line of the grayscale frame image t +1 and the grayscale frame image t ; Among them, S is the number of contour lines t on the grayscale frame image, s is the contour line number, b is the number of contour points on the contour boundary line, is the allowable value of the difference in pixel grayscale values of the contour points; Step S128: Set the threshold of the contour change coefficient ; If , then determine that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, and retain the grayscale frame image t and the grayscale frame image t +1; Otherwise, determine that the image content between the grayscale frame image t and the grayscale frame image t +1 is not similar, delete the grayscale frame image t +1, and retain the grayscale frame image t ; Step S129: Update the grayscale frame images in the video data segment, return to step S126, and execute steps S126 - S128. Continue to calculate the contour change coefficient between the grayscale frame images of two adjacent frames until all the similar grayscale frame images in the video data segment are deleted. Step S1210: Restore the remaining grayscale frame images to frame images, combine them into the filtered video data segment according to the frame order between the remaining frame images, and then splice the filtered video data segments to obtain the filtered video data.
4. A water service Internet of Things device data edge computing system, which executes the water service Internet of Things device data edge computing method described in claim 3, and is characterized in that, Including: The water service Internet of Things device includes several water service video data collection terminals. Several said water service video data collection terminals are connected to the edge gateway device through the Internet of Things. The video data collected by the water service video data collection terminals is sent to the edge gateway device. The edge gateway device is used to receive the video data collected by the water service video data collection terminals. An edge computing module is built in the edge gateway device. The edge computing module is used to filter and compress the video data, construct the feature matrix of the video data, and send it to the water service management cloud. The water service management cloud is used to analyze the feature matrix of the video data to obtain the video data collected by the water service Internet of Things device.
5. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it realizes the steps of the water service Internet of Things device data edge computing method described in claim 3.
6. A data edge computing device for water service Internet of Things devices, connected to an edge gateway device, characterized in that, Including a processor and a memory; Computer execution instructions are stored in the memory; The processor executes the computer execution instructions stored in the memory, so that the processor executes the water service Internet of Things device data edge computing method described in claim 3.
Citation Information
Patent Citations
Cross-device target detection computing reuse technology for edge intelligent service
CN114998806A
High-definition video image processing method
CN116403137A