Water conservancy project design drawing online auditing method based on deep learning

The deep learning-based method automates and enhances the accuracy of water conservancy project design drawing review, addressing inefficiencies and inaccuracies in traditional manual methods.

CN119229466AInactive Publication Date: 2024-12-31NANJING ZECHUN WATER ENGINEERING CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411312512.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional manual review of water conservancy project design drawings is time-consuming, labor-intensive, and prone to errors due to human factors, affecting review efficiency and accuracy.

Method used

An online review method using deep learning, involving digitization of drawings, image processing, convolutional neural networks, multi-head self-attention layers, transformer models, and model optimization to automate and enhance the accuracy of drawing review.

Benefits of technology

The method improves review efficiency and accuracy by automatically identifying key elements in drawings, ensuring high-quality and efficient and sustainable water projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229466A_ABST
    Figure CN119229466A_ABST
Patent Text Reader

Abstract

The invention discloses a water conservancy project design drawing online auditing method based on deep learning, and relates to the technical field of computers, and the method comprises the steps: digitalizing an existing water conservancy project design drawing in an information base into an electronic image through an industrial scanner; the image quality of the electronic images in the training image set is improved by using an image processing technology; extracting key information from the to-be-learned image; constructing a multi-head self-attention layer; constructing an encoder and a decoder of the converter model based on the multi-head self-attention layer, the decoder attention layer and the feedforward neural network layer; inputting the electronic images in the test image set into the converter model in sequence to obtain an auditing report of the test image set; performing model optimization processing on the converter model based on an audit report of the test image set; and inputting the to-be-audited hydraulic engineering design drawing into the optimization converter model. Through the deep learning technology, automation and intelligentization of drawing auditing are realized, and the auditing efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an online review method for water conservancy engineering design drawings based on deep learning. Background Art

[0002] With the rapid development of information technology, especially the increasing maturity of deep learning technology, new solutions have been provided for the online review of water conservancy project design drawings. As an important branch of artificial intelligence, deep learning has powerful feature extraction and pattern recognition capabilities, and can automatically learn and extract useful information from large amounts of data, making it possible for the automation and intelligence of drawing review.

[0003] Water conservancy project design drawings are an important basis for guiding project implementation. Their accuracy and rationality directly affect the quality, safety and benefits of the project. The traditional drawing review process often relies on manual review, which is not only time-consuming and labor-intensive, but also easily affected by human factors such as fatigue and experience differences, making it difficult to ensure review efficiency and accuracy. Therefore, the field of water conservancy projects urgently needs an efficient and accurate drawing review method. Summary of the invention

[0004] In order to solve the above technical problems, a method for online review of water conservancy project design drawings based on deep learning is provided. This technical solution solves the problems raised in the above background technology.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is: A method for online review of water conservancy engineering design drawings based on deep learning, comprising: The existing water conservancy project design drawings in the information database are digitized into electronic images by industrial scanners, and the electronic images are divided into a training image set and a test image set; Using image processing technology to improve the image quality of electronic images in the training image set, and performing noise reduction processing on the electronic images to obtain images to be learned; Using deep learning convolutional neural network to extract key information from the image to be learned, the key information includes lines, textures, symbols and text information; By calculating the correlation between each key information and other key information in the image to be learned, a multi-head self-attention layer is constructed; Construct the encoder of the transformer model based on the multi-head self-attention layer and the feed-forward neural network layer; Construct the decoder of the transformer model based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer; Inputting electronic images in the test image set into a converter model in sequence to obtain an audit report of the test image set, wherein the converter model includes a convolutional neural network, an encoder, and a decoder; Based on the audit report of the test atlas, the converter model is optimized to obtain an optimized converter model; Input the design drawings of the water conservancy project to be reviewed into the optimized converter model to obtain an online review report.

[0006] Preferably, the digitizing the existing water conservancy project design drawings in the information database into electronic images by an industrial scanner, and dividing the electronic images into a training image set and a test image set specifically includes: Scan the existing water conservancy project design drawings in the information database through an industrial scanner to obtain drawing images; Get the red, green and blue color components of each pixel in the drawing image; Obtain the weighted coefficients of human eye sensitivity to red, green and blue; Calculate the grayscale value of each pixel of the drawing image according to the grayscale value formula, and the grayscale value range is [0, 255]; The grayscale value of each pixel is used to replace each pixel in the drawing image to obtain an electronic image; The electronic images corresponding to the existing water conservancy project design drawings in all information bases are evenly divided into two sets, which are set as a training image set and a test image set; The gray value formula is:

[0007] In the formula, is the grayscale of the pixel at the i-th row and j-th column of the drawing image, , , are the weighted coefficients of human eye sensitivity to red, green and blue, respectively. , , They are the red, green and blue color components of the pixel in the i-th row and j-th column of the drawing image respectively.

[0008] Preferably, the step of using image processing technology to improve the image quality of electronic images in the training image set and performing noise reduction processing on the electronic images to obtain the image to be learned specifically includes: Obtain the number of pixels M*N of the electronic image in the training image set; Use element 0 to fill the blank part of the 2M*2N rectangle; Use the centralization transformation formula to calculate the centralization function corresponding to the 2M*2N rectangle; Perform discrete Fourier transform on the centralization function corresponding to the 2M*2N rectangle to obtain the intermediate function; Get the ideal low-pass filter function; The output function is calculated using the discrete Fourier transform inverse transform formula; Intercept the M*N pixels in the upper left corner of the image corresponding to the output function and output them as the image to be learned; The centralization transformation formula is:

[0009] In the formula, is the centralization function corresponding to the 2M*2N rectangle, The input function corresponds to the 2M*2N rectangle. The coordinates of the pixel points in the 2M*2N rectangle; The intermediate function is:

[0010] In the formula, is the intermediate function, is an imaginary unit, is the frequency domain coordinate; The ideal low-pass filter function is:

[0011] In the formula, is an ideal low-pass filter function, for The distance between the point and the center point of the frequency domain, is the preset frequency domain radius; The output function is:

[0012] In the formula, is the output function.

[0013] Preferably, the convolutional neural network using deep learning to extract key information from the image to be learned specifically includes: The input layer uses the normalization formula to convert the pixel data in the image to be learned into normalized data; The convolution layer uses a 3*3 preset convolution kernel matrix to extract low-level features in the normalized data, including line and texture information; Extracting high-level features from the normalized data by stacking at least two convolutional layers, wherein the high-level features include symbol and text information; Insert a pooling layer between convolutional layers to divide the image into at least four regions of equal size, calculate the average value of the image region as the pooled value of the region, and reduce the spatial size of the feature; The activation layer uses the hyperbolic tangent function to map the output into a nonlinear space; The fully connected layer integrates all the extracted features and outputs them as key information; The normalization formula is:

[0014] In the formula, is the i-th normalized data, is the pixel data of the i-th image to be learned, , are the maximum and minimum values ​​of the data of each pixel in the image to be learned; The hyperbolic tangent function is:

[0015] In the formula, Enter data for the hyperbolic tangent function, Output data for the hyperbolic tangent function.

[0016] Preferably, the step of constructing a multi-head self-attention layer by calculating the correlation between each key information and other key information in the image to be learned specifically includes: Calculate each key information in the learning image independently and simultaneously; Preset adjustable query transformation matrix, key value transformation matrix and value transformation matrix; Multiplying the corresponding matrices of each key information by the preset adjustable query transformation matrix, key-value transformation matrix and value transformation matrix respectively to obtain a query matrix, a key-value matrix and a value matrix; Based on the query matrix, key-value matrix and value matrix, the self-attention formula is used to calculate the output value of the multi-head self-attention layer of each key information; The multi-head self-attention layer output values ​​of each key information are concatenated to obtain the multi-head self-attention layer output value of the image to be learned; The self-attention formula is:

[0017] In the formula, is the output value of the multi-head self-attention layer for each key information, , , They are query matrix, key value matrix and value matrix respectively. for The transposed matrix of is the number of columns of the key-value matrix, is the probability distribution activation function; The probability distribution activation function is:

[0018] In the formula, is the probability distribution activation function value of the i-th input value, The total number of input values ​​for the probability distribution activation function, is the independent variable of the probability distribution activation function.

[0019] Preferably, the encoder for constructing the transformer model based on the multi-head self-attention layer and the feedforward neural network layer specifically includes: Get the multi-head self-attention layer structure; Set the number of neurons in the input layer of the feedforward neural network to be the same as the number of features of the input data; The number of layers and the number of neurons in each layer of the feedforward neural network are preset and adjustable, and learning is performed by reviewing the key information of the hidden layer at least once; The number of neurons in the output layer of the feedforward neural network is determined according to the number of audit task categories; The neurons in the feedforward neural network layer are arranged in layers, and each layer of neurons is only connected to the neurons in the next layer, forming a directed acyclic graph structure; The encoder of the Transformer model is constructed based on the multi-head self-attention layer and the feed-forward neural network layer.

[0020] Preferably, the decoder for constructing the transformer model based on the multi-head self-attention layer, the decoder attention layer and the feedforward neural network layer specifically includes: Get the multi-head self-attention layer structure; Add a mask operation to the multi-head self-attention layer structure. When generating the output sequence, only the information of the current position and the previous position can be queried, and the information of the future position cannot be queried. The decoder attention layer obtains the attention score by performing a dot product operation on the decoder's query matrix and the encoder's key matrix and dividing by a scaling factor, where the scaling factor is the square root of the dimension of the key matrix. The attention score is weighted by the probability distribution activation function to obtain the attention weight; Use the normalized attention weights to weight the encoder value matrix to get the weighted output of the decoder attention layer; Get the feedforward neural network layer structure; The decoder of the Transformer model is constructed based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer.

[0021] Preferably, the audit report based on the test atlas performs model optimization processing on the converter model to obtain the optimized converter model specifically including: Determine whether the results of the model audit report of the test set are the same as those of the actual audit report. If so, output the result as a true example; if not, output the result as a false example. Determine whether the actual audit report result corresponding to the true example is qualified. If so, output the result as a true example; if not, output the result as a true counterexample; Determine whether the actual audit report result corresponding to the false example is qualified. If so, output the result as a false positive example; if not, output the result as a false negative example; The recall rate of the transformer model is calculated using the recall rate formula; Calculate the accuracy of the converter model using the accuracy formula; Calculate the evaluation score of the transformer model based on the recall and precision of the transformer model; Determine whether the evaluation score of the converter model is lower than a preset threshold. If so, optimize all parameters in the model, rebuild the converter model, and obtain an optimized converter model. If not, do not output. The recall formula is:

[0022] In the formula, is the recall rate of the transformer model, is the number of true examples, is the number of false counterexamples; The accuracy formula is:

[0023] In the formula, is the accuracy of the converter model, is the number of false positive examples; The evaluation scores are:

[0024] In the formula, is the evaluation score of the transformer model.

[0025] Compared with the prior art, the present invention has the following beneficial effects: Deep learning technology can be applied to image recognition and understanding of water conservancy project design drawings. By training the deep learning model, it can automatically identify the key elements and attributes in the drawings. By utilizing the powerful capabilities of deep learning technology, the automation and intelligence of drawing review is realized, the review efficiency and accuracy are improved, and strong support is provided for the safe, efficient and sustainable construction of water conservancy projects. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of the online review method of water conservancy engineering design drawings based on deep learning of the present invention; Figure 2 A flow chart of the method for digitizing an electronic image according to the present invention; Figure 3 This is a flow chart of the method for performing noise reduction processing on electronic images of the present invention; Figure 4A flow chart of the convolutional neural network method for deep learning of the present invention; Figure 5 A flow chart of the method for constructing a multi-head self-attention layer of the present invention; Figure 6 A flow chart of an encoder method for constructing a converter model of the present invention; Figure 7 A flow chart of a decoder method for constructing a converter model of the present invention; Figure 8 This is a flow chart of the method for performing model optimization processing on a converter model according to the present invention. DETAILED DESCRIPTION

[0027] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.

[0028] Reference Figure 1 As shown, a method for online review of water conservancy engineering design drawings based on deep learning includes: The existing water conservancy project design drawings in the information database are digitized into electronic images by industrial scanners, and the electronic images are divided into a training image set and a test image set; Using image processing technology to improve the image quality of electronic images in the training image set, and performing noise reduction processing on the electronic images to obtain images to be learned; Using deep learning convolutional neural network to extract key information from the image to be learned, the key information includes lines, textures, symbols and text information; By calculating the correlation between each key information and other key information in the image to be learned, a multi-head self-attention layer is constructed; Construct the encoder of the transformer model based on the multi-head self-attention layer and the feed-forward neural network layer; Construct the decoder of the transformer model based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer; Inputting electronic images in the test image set into a converter model in sequence to obtain an audit report of the test image set, wherein the converter model includes a convolutional neural network, an encoder, and a decoder; Based on the audit report of the test atlas, the converter model is optimized to obtain an optimized converter model; Input the design drawings of the water conservancy project to be reviewed into the optimized converter model to obtain an online review report.

[0029] Reference Figure 2 As shown, the existing water conservancy project design drawings in the information database are digitized into electronic images through an industrial scanner, and the electronic images are divided into a training image set and a test image set, which specifically include: Scan the existing water conservancy project design drawings in the information database through an industrial scanner to obtain drawing images; Get the red, green and blue color components of each pixel in the drawing image; Obtain the weighted coefficients of human eye sensitivity to red, green and blue; Calculate the grayscale value of each pixel of the drawing image according to the grayscale value formula, and the grayscale value range is [0, 255]; The grayscale value of each pixel is used to replace each pixel in the drawing image to obtain an electronic image; The electronic images corresponding to the existing water conservancy project design drawings in all information bases are evenly divided into two sets, which are set as a training image set and a test image set; The gray value formula is:

[0030] In the formula, is the grayscale of the pixel at the i-th row and j-th column of the drawing image, , , are the weighted coefficients of human eye sensitivity to red, green and blue, respectively. , , They are the red, green and blue color components of the pixel in the i-th row and j-th column of the drawing image respectively.

[0031] After the pixel value is quantized, it is represented by a byte. For example, the grayscale value of black, gray and white that changes continuously is quantized into 256 gray levels. The grayscale value ranges from 0 to 255, indicating that the brightness ranges from light to dark. The corresponding colors in the image range from white to black. Black and white photos contain all gray tones between black and white. Each pixel value is one of the 256 gray levels between black and white.

[0032] Reference Figure 3 As shown, the image quality of the electronic images in the training image set is improved by using image processing technology, and the electronic images are subjected to noise reduction processing to obtain the image to be learned, which specifically includes: Obtain the number of pixels M*N of the electronic image in the training image set; Use element 0 to fill the blank part of the 2M*2N rectangle; Use the centralization transformation formula to calculate the centralization function corresponding to the 2M*2N rectangle; Perform discrete Fourier transform on the centralization function corresponding to the 2M*2N rectangle to obtain the intermediate function; Get the ideal low-pass filter function; The output function is calculated using the discrete Fourier transform inverse transform formula; Intercept the M*N pixels in the upper left corner of the image corresponding to the output function and output them as the image to be learned; The centralization transformation formula is:

[0033] In the formula, is the centralization function corresponding to the 2M*2N rectangle, The input function corresponds to the 2M*2N rectangle. The coordinates of the pixel points in the 2M*2N rectangle; The intermediate function is:

[0034] In the formula, is the intermediate function, is an imaginary unit, is the frequency domain coordinate; The ideal low-pass filter function is:

[0035] In the formula, is an ideal low-pass filter function, for The distance between the point and the center point of the frequency domain, is the preset frequency domain radius; The output function is:

[0036] In the formula, is the output function.

[0037] In frequency domain filtering, the low frequency corresponds to the slowly changing grayscale components in the image, and corresponds to the overall grayscale display of the image; the high frequency part corresponds to the image edge and the part with sudden grayscale changes, and corresponds to the changing components and details of the image.

[0038] Reference Figure 4 As shown in the figure, the deep learning convolutional neural network is used to extract key information from the image to be learned, including: The input layer uses the normalization formula to convert the pixel data in the image to be learned into normalized data; The convolution layer uses a 3*3 preset convolution kernel matrix to extract low-level features in the normalized data, including line and texture information; Extracting high-level features from the normalized data by stacking at least two convolutional layers, wherein the high-level features include symbol and text information; Insert a pooling layer between convolutional layers to divide the image into at least four regions of equal size, calculate the average value of the image region as the pooled value of the region, and reduce the spatial size of the feature; The activation layer uses the hyperbolic tangent function to map the output into a nonlinear space; The fully connected layer integrates all the extracted features and outputs them as key information; The normalization formula is:

[0039] In the formula, is the i-th normalized data, is the pixel data of the i-th image to be learned, , are the maximum and minimum values ​​of the data of each pixel in the image to be learned; The hyperbolic tangent function is:

[0040] In the formula, Enter data for the hyperbolic tangent function, Output data for the hyperbolic tangent function.

[0041] The pooling operation makes the model pay more attention to whether certain features exist rather than the specific location of the features. The invariance includes translation invariance, rotation invariance and scale invariance. Pooling is equivalent to dimensionality reduction in the spatial range, so that the model can extract a wider range of features, while reducing the input size of the next layer, thereby reducing the amount of calculation and the number of parameters.

[0042] Reference Figure 5 As shown in the figure, by calculating the correlation between each key information and other key information in the image to be learned, constructing a multi-head self-attention layer specifically includes: Calculate each key information in the learning image independently and simultaneously; Preset adjustable query transformation matrix, key value transformation matrix and value transformation matrix; Multiplying the corresponding matrices of each key information by the preset adjustable query transformation matrix, key-value transformation matrix and value transformation matrix respectively to obtain a query matrix, a key-value matrix and a value matrix; Based on the query matrix, key-value matrix and value matrix, the self-attention formula is used to calculate the output value of the multi-head self-attention layer of each key information; The multi-head self-attention layer output values ​​of each key information are concatenated to obtain the multi-head self-attention layer output value of the image to be learned; The self-attention formula is:

[0043] In the formula, is the output value of the multi-head self-attention layer for each key information, , , They are query matrix, key value matrix and value matrix respectively. for The transposed matrix of is the number of columns of the key-value matrix, is the probability distribution activation function; The probability distribution activation function is:

[0044] In the formula, is the probability distribution activation function value of the i-th input value, The total number of input values ​​for the probability distribution activation function, is the independent variable of the probability distribution activation function.

[0045] The multi-head self-attention layer is the core of the Transformer model, capturing dependencies in the input sequence by computing the correlation between the representation of each position in the input sequence and the representation of all other positions.

[0046] Reference Figure 6 As shown in the figure, based on the multi-head self-attention layer and the feedforward neural network layer, the encoder of the transformer model is constructed specifically including: Get the multi-head self-attention layer structure; Set the number of neurons in the input layer of the feedforward neural network to be the same as the number of features of the input data; The number of layers and the number of neurons in each layer of the feedforward neural network are preset and adjustable, and learning is performed by reviewing the key information of the hidden layer at least once; The number of neurons in the output layer of the feedforward neural network is determined according to the number of audit task categories; The neurons in the feedforward neural network layer are arranged in layers, and each layer of neurons is only connected to the neurons in the next layer, forming a directed acyclic graph structure; The encoder of the Transformer model is constructed based on the multi-head self-attention layer and the feed-forward neural network layer.

[0047] The feedforward neural network layer can further enhance the expressiveness of the transformer model by performing nonlinear transformation on the output results of the multi-head self-attention layer.

[0048] Reference Figure 7 As shown in FIG. 1 , based on the multi-head self-attention layer, the decoder attention layer and the feedforward neural network layer, the decoder of the transformer model is constructed specifically including: Get the multi-head self-attention layer structure; Add a mask operation to the multi-head self-attention layer structure. When generating the output sequence, only the information of the current position and the previous position can be queried, and the information of the future position cannot be queried. The decoder attention layer obtains the attention score by performing a dot product operation on the decoder's query matrix and the encoder's key matrix and dividing by a scaling factor, where the scaling factor is the square root of the dimension of the key matrix. The attention score is weighted by the probability distribution activation function to obtain the attention weight; Use the normalized attention weights to weight the encoder value matrix to get the weighted output of the decoder attention layer; Get the feedforward neural network layer structure; The decoder of the Transformer model is constructed based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer.

[0049] The decoder attention layer is used to calculate the correlation between the representation of the decoder's current position and the encoder's output, which allows the decoder to pay attention to relevant information in the input sequence when generating the output sequence.

[0050] Reference Figure 8 As shown, based on the audit report of the test atlas, the converter model is optimized to obtain the optimized converter model, which specifically includes: Determine whether the results of the model audit report of the test set are the same as those of the actual audit report. If so, output the result as a true example; if not, output the result as a false example. Determine whether the actual audit report result corresponding to the true example is qualified. If so, output the result as a true example; if not, output the result as a true counterexample; Determine whether the actual audit report result corresponding to the false example is qualified. If so, output the result as a false positive example; if not, output the result as a false negative example; The recall rate of the transformer model is calculated using the recall rate formula; Calculate the accuracy of the converter model using the accuracy formula; Calculate the evaluation score of the transformer model based on the recall and precision of the transformer model; Determine whether the evaluation score of the converter model is lower than a preset threshold. If so, optimize all parameters in the model, rebuild the converter model, and obtain an optimized converter model. If not, do not output. The recall formula is:

[0051] In the formula, is the recall rate of the transformer model, is the number of true examples, is the number of false counterexamples; The accuracy formula is:

[0052] In the formula, is the accuracy of the converter model, is the number of false positive examples; The evaluation scores are:

[0053] In the formula, is the evaluation score of the transformer model.

[0054] In practical applications, the selection of evaluation indicators depends on the specific task requirements and scenarios. The calculation of evaluation indicators may require the use of the model's prediction results and true labels. For different evaluation indicators, their value ranges and optimal values ​​may be different, and need to be interpreted according to the specific situation.

[0055] Furthermore, the present solution also proposes a computer-readable storage medium on which a computer-readable program is stored. When the computer-readable program is called, the above-mentioned online review method of water conservancy project design drawings based on deep learning is executed.

[0056] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid state drive (SSD).

[0057] To sum up, the advantages of the present invention are: deep learning technology can be applied to image recognition and understanding of water conservancy project design drawings. By training the deep learning model, it can automatically identify the key elements and attributes in the drawings. By utilizing the powerful capabilities of deep learning technology, the automation and intelligence of drawing review is realized, the review efficiency and accuracy are improved, and strong support is provided for the safe, efficient and sustainable construction of water conservancy projects.

[0058] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for online review of water conservancy engineering design drawings based on deep learning, characterized in that: include: The existing water conservancy project design drawings in the information database are digitized into electronic images by industrial scanners, and the electronic images are divided into a training image set and a test image set; Using image processing technology to improve the image quality of electronic images in the training image set, and performing noise reduction processing on the electronic images to obtain images to be learned; Using deep learning convolutional neural network to extract key information from the image to be learned, the key information includes lines, textures, symbols and text information; By calculating the correlation between each key information and other key information in the image to be learned, a multi-head self-attention layer is constructed; Construct the encoder of the transformer model based on the multi-head self-attention layer and the feed-forward neural network layer; Construct the decoder of the transformer model based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer; Inputting electronic images in the test image set into a converter model in sequence to obtain an audit report of the test image set, wherein the converter model includes a convolutional neural network, an encoder, and a decoder; Based on the audit report of the test atlas, the converter model is optimized to obtain an optimized converter model; Input the design drawings of the water conservancy project to be reviewed into the optimized converter model to obtain an online review report.

2. According to the method for online review of water conservancy engineering design drawings based on deep learning in claim 1, it is characterized in that: The method of digitizing the existing water conservancy project design drawings in the information database into electronic images by using an industrial scanner and dividing the electronic images into a training image set and a test image set specifically includes: Scan the existing water conservancy project design drawings in the information database through an industrial scanner to obtain drawing images; Get the red, green and blue color components of each pixel in the drawing image; Obtain the weighted coefficients of human eye sensitivity to red, green and blue; Calculate the grayscale value of each pixel of the drawing image according to the grayscale value formula, and the grayscale value range is [0, 255]; The grayscale value of each pixel is used to replace each pixel in the drawing image to obtain an electronic image; The electronic images corresponding to the existing water conservancy project design drawings in all information bases are evenly divided into two sets, which are set as a training image set and a test image set; The gray value formula is: In the formula, is the grayscale of the pixel at the i-th row and j-th column of the drawing image, , , are the weighted coefficients of human eye sensitivity to red, green and blue, respectively. , , They are the red, green and blue color components of the pixel in the i-th row and j-th column of the drawing image respectively.

3. According to the method of online review of water conservancy engineering design drawings based on deep learning in claim 2, it is characterized in that: The method of using image processing technology to improve the image quality of electronic images in the training image set and performing noise reduction processing on the electronic images to obtain the image to be learned specifically includes: Obtain the number of pixels M*N of the electronic image in the training image set; Use element 0 to fill the blank part of the 2M*2N rectangle; Use the centralization transformation formula to calculate the centralization function corresponding to the 2M*2N rectangle; Perform discrete Fourier transform on the centralization function corresponding to the 2M*2N rectangle to obtain the intermediate function; Get the ideal low-pass filter function; The output function is calculated using the discrete Fourier transform inverse transform formula; Intercept the M*N pixels in the upper left corner of the image corresponding to the output function and output them as the image to be learned; The centralization transformation formula is: In the formula, is the centralization function corresponding to the 2M*2N rectangle, The input function corresponds to the 2M*2N rectangle. The coordinates of the pixel points in the 2M*2N rectangle; The intermediate function is: In the formula, is the intermediate function, is an imaginary unit, is the frequency domain coordinate; The ideal low-pass filter function is: In the formula, is an ideal low-pass filter function, for The distance between the point and the center point of the frequency domain, is the preset frequency domain radius; The output function is: In the formula, is the output function.

4. According to the method of online review of water conservancy engineering design drawings based on deep learning in claim 3, it is characterized in that: The convolutional neural network using deep learning to extract key information from the image to be learned specifically includes: The input layer uses the normalization formula to convert the pixel data in the image to be learned into normalized data; The convolution layer uses a 3*3 preset convolution kernel matrix to extract low-level features in the normalized data, including line and texture information; Extracting high-level features from the normalized data by stacking at least two convolutional layers, wherein the high-level features include symbol and text information; Insert a pooling layer between convolutional layers to divide the image into at least four regions of equal size, calculate the average value of the image region as the pooled value of the region, and reduce the spatial size of the feature; The activation layer uses the hyperbolic tangent function to map the output into a nonlinear space; The fully connected layer integrates all the extracted features and outputs them as key information; The normalization formula is: In the formula, is the i-th normalized data, is the pixel data of the i-th image to be learned, , are the maximum and minimum values ​​of the data of each pixel in the image to be learned; The hyperbolic tangent function is: In the formula, Enter data for the hyperbolic tangent function, Output data for the hyperbolic tangent function.

5. According to the method of online review of water conservancy engineering design drawings based on deep learning in claim 4, it is characterized in that: The construction of a multi-head self-attention layer by calculating the correlation between each key information and other key information in the image to be learned specifically includes: Calculate each key information in the learning image independently at the same time; Preset adjustable query transformation matrix, key value transformation matrix and value transformation matrix; Multiplying the corresponding matrices of each key information by the preset adjustable query transformation matrix, key-value transformation matrix and value transformation matrix respectively to obtain a query matrix, a key-value matrix and a value matrix; Based on the query matrix, key-value matrix and value matrix, the self-attention formula is used to calculate the output value of the multi-head self-attention layer of each key information; The multi-head self-attention layer output values ​​of each key information are concatenated to obtain the multi-head self-attention layer output value of the image to be learned; The self-attention formula is: In the formula, is the output value of the multi-head self-attention layer for each key information, , , They are query matrix, key value matrix and value matrix respectively. for The transposed matrix of is the number of columns of the key-value matrix, is the probability distribution activation function; The probability distribution activation function is: In the formula, is the probability distribution activation function value of the i-th input value, The total number of input values ​​for the probability distribution activation function, is the independent variable of the probability distribution activation function.

6. According to the method of online review of water conservancy engineering design drawings based on deep learning in claim 5, it is characterized in that: The encoder for constructing the transformer model based on the multi-head self-attention layer and the feedforward neural network layer specifically includes: Get the multi-head self-attention layer structure; Set the number of neurons in the input layer of the feedforward neural network to be the same as the number of features of the input data; The number of layers and the number of neurons in each layer of the feedforward neural network are preset and adjustable, and learning is performed by reviewing the key information of the hidden layer at least once; The number of neurons in the output layer of the feedforward neural network is determined according to the number of audit task categories; The neurons in the feedforward neural network layer are arranged in layers, and each layer of neurons is only connected to the neurons in the next layer, forming a directed acyclic graph structure; The encoder of the Transformer model is constructed based on the multi-head self-attention layer and the feed-forward neural network layer.

7. The method for online review of water conservancy engineering design drawings based on deep learning according to claim 6 is characterized in that: The decoder of the transformer model constructed based on the multi-head self-attention layer, the decoder attention layer and the feedforward neural network layer specifically includes: Get the multi-head self-attention layer structure; Add a mask operation to the multi-head self-attention layer structure. When generating the output sequence, only the information of the current position and the previous position can be queried, and the information of the future position cannot be queried. The decoder attention layer obtains the attention score by performing a dot product operation on the decoder's query matrix and the encoder's key matrix and dividing by a scaling factor, where the scaling factor is the square root of the dimension of the key matrix. The attention score is weighted by the probability distribution activation function to obtain the attention weight; Use the normalized attention weights to weight the encoder value matrix to get the weighted output of the decoder attention layer; Get the feedforward neural network layer structure; The decoder of the Transformer model is constructed based on the multi-head self-attention layer, the decoder attention layer, and the feed-forward neural network layer.

8. The method for online review of water conservancy engineering design drawings based on deep learning according to claim 7 is characterized in that: The audit report based on the test atlas performs model optimization processing on the converter model to obtain the optimized converter model, which specifically includes: Determine whether the results of the model audit report of the test set are the same as those of the actual audit report. If so, output the result as a true example; if not, output the result as a false example. Determine whether the actual audit report result corresponding to the true example is qualified. If so, output the result as a true example; if not, output the result as a true counterexample; Determine whether the actual audit report result corresponding to the false example is qualified. If so, output the result as a false positive example; if not, output the result as a false negative example; The recall rate of the transformer model is calculated using the recall rate formula; Calculate the accuracy of the converter model using the accuracy formula; Calculate the evaluation score of the transformer model based on the recall and precision of the transformer model; Determine whether the evaluation score of the converter model is lower than a preset threshold. If so, optimize all parameters in the model, rebuild the converter model, and obtain an optimized converter model. If not, do not output. The recall formula is: In the formula, is the recall rate of the transformer model, is the number of true examples, is the number of false counterexamples; The accuracy formula is: In the formula, is the accuracy of the converter model, is the number of false positive examples; The evaluation scores are: In the formula, is the evaluation score of the transformer model.

Citation Information

Patent Citations

  • Method of detecting fruit surface defect based on low pass filter

    CN101984346A

  • Transform medical endoscope image report generation method based on memory driving

    CN114944213A

  • Medical image report automatic generation method based on memory ability learning

    CN116364227A

  • Drawing auditing method and system based on artificial intelligence algorithm and terminal

    CN117078184A