Electronic intelligent identification method and device for power grid infrastructure archives based on improved LSTM-CTC

Through the improved LSTM-CTC model and CTC loss function optimization, combined with MSER and NMS algorithms, the problem of low efficiency and accuracy in identification of power grid infrastructure files is solved, efficient and accurate text recognition is achieved, and the generalization ability and recognition of the model are improved. performance.

CN117576713BActive Publication Date: 2024-09-13ECONOMIC & TECH RES INST OF HUBEI ELECTRIC POWER COMPANY SGCC +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311332666.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2024-09-13
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

In the existing technology, the recognition efficiency and accuracy of power grid infrastructure files are poor, input text with contextual connections cannot be effectively processed, and the recognition efficiency is low due to differences in character length and quantity.

Method used

The improved LSTM-CTC model is used, combined with MSER and NMS algorithms for image processing, and the model parameters are optimized through the CTC loss function and SGD gradient descent method to improve the accuracy and generalization ability of text recognition.

Benefits of technology

It has significantly improved the recognition efficiency and accuracy of power grid infrastructure files, improved the generalization and recognition generalization of the model, can better handle complex image text, and reduced the loss rate and training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117576713B
    Figure CN117576713B
Patent Text Reader

Abstract

A method for electronic intelligent recognition of power grid infrastructure archives based on improved LSTM-CTC, comprising: dividing a power grid infrastructure archive image data set into a training set and a test set, and inputting the images in the training set into an LSTM network to extract a feature sequence of text in the power grid infrastructure archive image; inputting the feature sequence into a CTC loss function, and continuously adjusting the weights in the iterative optimization process until the optimal hyperparameters are found, and inputting the optimal hyperparameters into an LSTM-CTC model to obtain a trained LSTM-CTC model; and inputting the image to be recognized into the trained LSTM-CTC model to obtain a text recognition result. The present invention can significantly improve the recognition efficiency and accuracy of power grid infrastructure archives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent identification technology, and in particular to an electronic intelligent identification method and device for power grid infrastructure archives based on improved LSTM-CTC. Background Art

[0002] With the increase in the number and volume of power grid infrastructure projects, the traditional archive management model can no longer cope with the increasingly complex archive management. In order to improve the standardization and regularization of project archive management, establish an efficient and orderly infrastructure archive library, and realize the digitization of various business documents, online approval, automatic archiving and other functions, it is necessary to conduct in-depth research on the electronic intelligent identification of power grid infrastructure archives.

[0003] In the prior art, the document "Scene Text Detection and Recognition Based on Deep Learning" proposes a complex scene text recognition method based on deep learning. This method uses an improved progressive expansion network and differentiable binarization operation to improve the accuracy of text detection and recognition; however, the above deep learning algorithms all assume that the input is an independent and unrelated unit. For inputs with up-and-down connections, such as the recognition of fixed phrases in infrastructure archives, the neural network needs to have a certain "memory function". The document "Evaluation of Transient Voltage Stability of Power Systems Based on Deep Residual Network" establishes a deep learning model with a cross-entropy loss function for sample training to improve the accuracy of online evaluation; however, the above loss function ignores the problem of differences in character length and number, and it is difficult to ensure the efficiency of the result output. The document "Fuzzy License Plate Character Recognition Algorithm Based on Deep Learning" constructs a connectionist temporal classification (CTC) loss function to solve the problem of difficult alignment of time series labels and speed up the learning speed during training, but there are still deficiencies in the model generalization problem. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects and problems of poor recognition efficiency and accuracy in the prior art, and to provide an electronic intelligent recognition method and device for power grid infrastructure archives based on improved LSTM-CTC with high recognition efficiency and accuracy.

[0005] To achieve the above objectives, the technical solution of the present invention is: a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, comprising:

[0006] The power grid infrastructure archive image dataset is divided into a training set and a test set, and the images in the training set are input into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive images;

[0007] Input the feature sequence into the CTC loss function, and continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found. Input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model.

[0008] Input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

[0009] The MSER algorithm is used to identify and locate the images in the training set, and the NMS algorithm is used to determine the text recognition box. The processed images are input into the LSTM network.

[0010] The MSER algorithm identification and positioning includes the following steps:

[0011] The power grid infrastructure archive image is binarized and recognized when the threshold is increased to a value close to the gray value of the text in the image; the expression of the change rate of the connected domain area in the image is:

[0012]

[0013] In the formula, S i is the area of ​​a connected domain under threshold i; j is the change in the grayscale of the infrastructure archive image under threshold i; s(i) is the area of ​​a connected domain S under threshold i i The rate of change of , when s(i) becomes a local minimum, S i It is the maximum stable extreme value area.

[0014] The NMS algorithm determines the text recognition frame and includes the following steps:

[0015] Traverse all text pre-selection boxes and determine their confidence;

[0016] Sort all text pre-selection boxes by confidence score, and select the text pre-selection box with the highest score;

[0017] The text pre-selected box with the highest detection score has an IOU with the rest of the text pre-selected boxes. The text pre-selected boxes whose IOU is greater than the set value are deleted.

[0018]

[0019] In the formula, in section is the intersection area of ​​the two text pre-selection boxes; union is the union area of ​​the two text pre-selection boxes;

[0020] Take the next text pre-selection box with the highest score and repeat the above steps until a text pre-selection box without overlapping parts is left, which is output as the result.

[0021] The conditional probability calculation formula of CTC loss function is:

[0022]

[0023] In the formula, P(l|x) is the probability of the model outputting l in the output sequence; l is the true label sequence; B -1 (l) is the set of all possible output sequences corresponding to l; is the output sequence; For a given input sequence x, the output sequence is The conditional probability of

[0024] Selecting the most likely class for each dimension is the result of that dimension:

[0025]

[0026] In the formula, l * Decode for the best path;

[0027] Use the SGD gradient descent method to minimize the CTC loss function as shown below:

[0028]

[0029] In the formula, is the objective function of the CTC layer; X, and x represent the training data, output sequence, and input sequence, respectively.

[0030] The CTC loss function uses an algorithm based on dynamic programming to calculate the sum of all possible output sequence probabilities. The calculation method of the output sequence probability sum is:

[0031] For a given true label sequence l, insert blank labels at the beginning, end and between letters to convert it into a sequence l′;

[0032] The forward probability calculation formula is:

[0033]

[0034]

[0035] Where α(t,u) is the forward factor, which represents the total probability of all output paths with the element at position u in l′ as the end label at time t; Output probability for each frame’s label;

[0036] The backward probability calculation formula is:

[0037]

[0038]

[0039] Where β(t,u) is the backward factor, which means the total probability of all paths that meet the conditions added after the output label at time t is the element at position u in l′;

[0040] The product of the forward factor and the backward factor is summed to obtain the output sequence probability:

[0041]

[0042] The weight update method in the CTC loss function is:

[0043] For a given input sequence, the LSTM-CTC model performs forward propagation to calculate the predicted label sequence; using the predicted label sequence and the true label sequence, the CTC loss function is calculated:

[0044] α*C(y o ,y d )*x=…=β*C(y o ,y d )*y;

[0045] x+…+y=1;

[0046] C(y o ,y d )=-y d *log(y o );

[0047] α+…+β=N;

[0048] Where α and β are the number of samples of one type in a single image; N is the total number of samples; y o and d is the output of the LSTM-CTC model and the dataset label; function C is the CTC loss function calculation formula; x and y are the weights of each type of sample;

[0049] Based on the calculated CTC loss function, back propagation is performed to calculate the gradient relative to the LSTM-CTC model parameters;

[0050] Using the calculated gradient information, the stochastic gradient descent algorithm is used to update the weights. The weight update is performed according to the following formula:

[0051]

[0052] In the formula, λ k+1 is the sample weight in the k+1th iteration; k is the sample weight in the kth iteration; η is the learning rate; is the gradient value of the loss function with respect to the sample weight;

[0053] The above steps are repeated until the predetermined number of training rounds is reached or the stopping condition is met.

[0054] An electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC, comprising:

[0055] A feature sequence extraction module is used to divide the power grid infrastructure archive image data set into a training set and a test set, and input the images in the training set into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive image;

[0056] The model building module is used to input the feature sequence into the CTC loss function, continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found, and then input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model;

[0057] The text recognition module is used to input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

[0058] An electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC, comprising a memory and a processor;

[0059] The memory is used to store computer program code and transmit the computer program code to the processor;

[0060] The processor is used to execute the method as described above according to the instructions in the computer program code.

[0061] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] In the electronic intelligent recognition method and device of power grid infrastructure archives based on improved LSTM-CTC of the present invention, first, the image data of the power grid infrastructure archives is extracted, and the image is input into the LSTM network to extract the sequence characteristics of the text in the power grid infrastructure archive image; secondly, the weight update method is used to improve the CTC loss function and calculate the final text recognition result to improve the recognition generalization of the model. Finally, the process of the electronic intelligent recognition method of power grid infrastructure archives based on CTC is established. The electronic intelligent recognition method of power grid infrastructure archives based on improved LSTM-CTC proposed by the present invention can significantly improve the recognition efficiency and accuracy of power grid infrastructure archives. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1The present invention is a flow chart of an electronic intelligent identification method for power grid infrastructure archives based on improved LSTM-CTC.

[0065] Figure 2 2 is a comparison chart of loss rates of different schemes in the embodiments of the present invention.

[0066] Figure 3 It is a generalization comparison diagram of different schemes in the embodiments of the present invention.

[0067] Figure 4 The present invention is a structural block diagram of an electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC.

[0068] Figure 5 The present invention is a structural block diagram of an electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC. DETAILED DESCRIPTION

[0069] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0070] Embodiment 1:

[0071] See also Figure 1 , a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, including:

[0072] S1. Divide the power grid infrastructure archive image dataset into a training set and a test set, and input the images in the training set into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive image;

[0073] The MSER algorithm is used to identify and locate the images in the training set, and the NMS algorithm is used to determine the text recognition box. The processed images are input into the LSTM network.

[0074] The MSER algorithm identification and positioning includes the following steps:

[0075] The power grid infrastructure archive image is binarized and recognized when the threshold is increased to a value close to the gray value of the text in the image; the expression of the change rate of the connected domain area in the image is:

[0076]

[0077] In the formula, S i is the area of ​​a connected domain under threshold i; j is the change in the grayscale of the infrastructure archive image under threshold i; s(i) is the area of ​​a connected domain S under threshold i i The rate of change of , when s(i) becomes a local minimum, S i It is the maximum stable extreme value area.

[0078] In infrastructure archive positioning, the MSER algorithm can be used to extract stable areas containing text in the image, that is, to remove impurities in the image and leave only the text area that needs to be identified. The maximum stable extreme value region algorithm is mainly used to detect feature areas in the image, and can quickly and accurately locate the area containing text in the image. A power grid infrastructure archive image is binarized, and the threshold increases from 0 to 255. If some connected areas in the image do not get smaller during the threshold increase, then the area is the maximum stable extreme value area; on an infrastructure archive image, the grayscale value of the text area is basically the same, so the text will not be screened out during the continuous increase of the threshold, and it will not be recognized until the threshold increases to a grayscale value close to the text.

[0079] The NMS algorithm determines the text recognition frame and includes the following steps:

[0080] Traverse all text pre-selection boxes and determine their confidence;

[0081] Sort all text pre-selection boxes by confidence score, and select the text pre-selection box with the highest score;

[0082] The text pre-selected box with the highest detection score has an IOU with the rest of the text pre-selected boxes. The text pre-selected boxes whose IOU is greater than the set value are deleted.

[0083]

[0084] In the formula, in section is the intersection area of ​​the two text pre-selection boxes; union is the union area of ​​the two text pre-selection boxes;

[0085] Take the next text pre-selection box with the highest score and repeat the above steps until a text pre-selection box without overlapping parts is left, which is output as the result.

[0086] The NMS method is used to deal with the overlapping problem when identifying the text area of ​​infrastructure archives. The idea of ​​the NMS method is to suppress non-maximum elements, that is, to suppress boxes that are not of the maximum size, which is equivalent to removing small boxes contained in large boxes, so as to achieve the purpose of removing duplicate areas and finding the best detection position.

[0087] S2. Input the feature sequence into the CTC loss function, and continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found. Input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model.

[0088] The conditional probability calculation formula of CTC loss function is:

[0089]

[0090] In the formula, P(l|x) is the probability of the model outputting l in the output sequence; l is the true label sequence; B -1 (l) is the set of all possible output sequences corresponding to l; is the output sequence; For a given input sequence x, the output sequence is The conditional probability of

[0091] Since the process of finding the maximum likelihood sequence involves a huge amount of calculation, we need to simplify the calculation through the following formula. The most likely class for each dimension is the result of that dimension:

[0092]

[0093] In the formula, l * Decode for the best path;

[0094] Use the SGD gradient descent method to minimize the CTC loss function as shown below:

[0095]

[0096] In the formula, is the objective function of the CTC layer; X, and x represent the training data, output sequence, and input sequence, respectively.

[0097] The advantages of the above steps are: SGD gradient descent method can be used to iteratively adjust model parameters to minimize the CTC loss function, thereby finding the parameter value that minimizes the loss function and helping the model converge to a better solution, which helps improve the performance of the model for sequence classification tasks. CTC loss function is a common method for sequence classification tasks, especially effective in fields such as speech recognition and handwriting recognition; using SGD gradient descent method to minimize CTC loss function can improve the prediction ability of the model and improve the accuracy of correct classification of input sequences. SGD gradient descent method usually uses small batch samples during training, and only part of the data is used to calculate gradients and update parameters in each iteration, thereby reducing the amount of calculation and memory requirements, which makes SGD gradient descent method more efficient when training models on large-scale data sets and accelerates the training process.

[0098] The feature sequence output by the LSTM model enters the CTC loss function. Assuming that the dimension of the data is T, and there are L possible tags at each time step, then without any restrictions, the overall sequence will have L*T possibilities. In order to avoid repeated tags and consecutive empty tags, the CTC loss function uses an algorithm based on dynamic programming to calculate the sum of all possible output sequence probabilities. The calculation method for the sum of output sequence probabilities is:

[0099] For a given true label sequence l, insert blank labels at the beginning, end and between letters to convert it into a sequence l′;

[0100] The forward probability calculation formula is:

[0101]

[0102]

[0103] Where α(t,u) is the forward factor, which represents the total probability of all output paths with the element at position u in l′ as the end label at time t; Output probability for each frame’s label;

[0104] The backward probability calculation formula is:

[0105]

[0106]

[0107] Where β(t,u) is the backward factor, which means the total probability of all paths that meet the conditions added after the output label at time t is the element at position u in l′;

[0108] The product of the forward factor and the backward factor is summed to obtain the output sequence probability:

[0109]

[0110] The weight update method in the CTC loss function is:

[0111] For a given input sequence, the LSTM-CTC model performs forward propagation to calculate the predicted label sequence; using the predicted label sequence and the true label sequence, the CTC loss function is calculated:

[0112] α*C(y o ,y d )*x=…=β*C(y o ,y d )*y;

[0113] x+…+y=1;

[0114] C(y o ,y d )=-y d *log(y o );

[0115] α+…+β=N;

[0116] Where α and β are the number of samples of one type in a single image; N is the total number of samples; yo and d is the output of the LSTM-CTC model and the dataset label; function C is the CTC loss function calculation formula; x and y are the weights of each type of sample;

[0117] Based on the calculated CTC loss function, back propagation is performed to calculate the gradient relative to the LSTM-CTC model parameters;

[0118] Using the calculated gradient information, the stochastic gradient descent algorithm is used to update the weights. The weight update is performed according to the following formula:

[0119]

[0120] In the formula, λ k+1 is the sample weight in the k+1th iteration; k is the sample weight in the kth iteration; η is the learning rate; is the gradient value of the loss function with respect to the sample weight;

[0121] The above steps are repeated until the predetermined number of training rounds is reached or the stopping condition is reached. The weights are updated for each training sample, and the model is continuously optimized to minimize the CTC loss function.

[0122] The test set is input into the trained LSTM-CTC model to verify the recognition performance of the model.

[0123] S3. Input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

[0124] The present invention adopts dynamic weights to improve the CTC loss function. During the model training process, the learning status of each sample is counted after each round of iteration, and a larger weight is added to the samples with poor learning effect, so as to strengthen the model's emphasis on complex samples and achieve the purpose of accurate identification of complex samples.

[0125] Figure 2 It is a comparison chart of loss rates of different schemes. In order to verify the effectiveness and superiority of the electronic intelligent identification method of power grid infrastructure archives based on improved LSTM-CTC proposed in the present invention, three intelligent identification schemes are set for comparative analysis. Scheme 1: Intelligent identification method based on traditional LSTM model; Scheme 2: Intelligent identification method based on LSTM-CTC model; Scheme 3: Electronic intelligent identification method of power grid infrastructure archives based on improved LSTM-CTC, that is, the method proposed in the present invention. Figure 2It can be seen that Scheme 1 can achieve a loss rate of 20% after nearly 5000 iterations; Scheme 2 can converge faster; and Scheme 3, which is the electronic intelligent identification method for power grid infrastructure archives based on improved LSTM-CTC proposed in the present invention, can converge quickly and more stably reduce the loss rate, verifying the superiority of the model proposed in the present invention.

[0126] Figure 3 is a comparison chart of generalization under different schemes. Figure 3 It can be seen that as the proportion of image text increases, the difficulty of image recognition increases, and the accuracy decline trend of Scheme 3 is smaller than that of Scheme 1 and Scheme 2. Specifically, when the proportion of image text increases from 10% to 90%, the recognition accuracy of Scheme 1 decreases by 21.29%; the recognition accuracy of Scheme 2 decreases by 9.96%; and the recognition accuracy of Scheme 3 only decreases by 8.48%. This is because the intelligent recognition method proposed in the present invention adds dynamic weights to the loss function link, so that the model pays more attention to the recognition performance of complex images when adjusting parameters in the training stage, and can better handle complex images in the application stage. And the accuracy of Scheme 3 when the image proportion is large is still maintained at more than 87%, while Scheme 1 is reduced to 69.35%, and Scheme 2 is reduced to 85.63%, which verifies the significant advantages of the intelligent recognition method proposed in the present invention in generalization.

[0127] Table 1 shows the recognition performance comparison results of different schemes. As can be seen from Table 1, Scheme 3 improves the recall rate and accuracy by 6.90% and 15.69% respectively compared with Scheme 1; the training time and test time are reduced by 1.1h and 0.3h respectively. This is because during the training process, adding the CTC loss function after the LSTM model can align the text more quickly, achieving the goal of reducing training time and improving recognition efficiency and accuracy. Scheme 3 improves the recall rate and accuracy by 2.58% and 1.91% respectively compared with Scheme 2; the training time increases by 0.2h; and the test time decreases by 0.1h. Scheme 3 adds a small amount of training time compared with Scheme 2, because introducing weight updates into the CTC loss function will extend the time of each iteration, but due to the improved generalization of the model, its recognition recall rate and accuracy are also improved.

[0128] Table 1 Comparison results of recognition performance of different schemes

[0129] Recall / % Accuracy / % Training time / h Test time / h Solution 1 61.35 75.14 13.8 1.7 Solution 2 65.67 88.92 12.5 1.5 Solution 3 68.25 90.83 12.7 1.4

[0130] Embodiment 2:

[0131] See also Figure 4 , a device for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, the device is applied to the method described in Example 1, the device comprising:

[0132] A feature sequence extraction module is used to divide the power grid infrastructure archive image data set into a training set and a test set, and input the images in the training set into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive image;

[0133] The model building module is used to input the feature sequence into the CTC loss function, continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found, and then input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model;

[0134] The text recognition module is used to input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

[0135] Embodiment 3:

[0136] See also Figure 5 , an electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC, including a memory and a processor;

[0137] The memory is used to store computer program code and transmit the computer program code to the processor;

[0138] The processor is used to execute the method described in embodiment 1 according to the instructions in the computer program code.

[0139] A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in Embodiment 1 when executed by a processor.

[0140] Generally speaking, the computer instructions for implementing the method of the present invention may be carried in any combination of one or more computer-readable storage media. Non-transitory computer-readable storage media may include any computer-readable media, except for the signal itself that is temporarily propagating.

[0141] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAn), a read-only memory (Ron), an erasable programmable read-only memory (EKRon or flash memory), an optical fiber, a portable compact disk read-only memory (CD-Ron), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0142] Computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Snalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages, in particular, Kython language suitable for neural network computing and platform frameworks based on TensorFlow, KyTorch, etc. can be used. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer or to an external computer (for example, using an Internet service provider to connect through the Internet) through any type of network, including a local area network (LAN) or a wide area network (WAN).

[0143] The above-mentioned devices and non-temporary computer-readable storage media can be found in the specific description of an electronic intelligent identification method for power grid infrastructure archives based on improved LSTM-CTC and its beneficial effects, which will not be repeated here.

[0144] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An electronic intelligent identification method for power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that include: The power grid infrastructure archive image dataset is divided into a training set and a test set, and the images in the training set are input into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive images; Input the feature sequence into the CTC loss function, and continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found. Input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model. The weight update method in the CTC loss function is: For a given input sequence, the LSTM-CTC model performs forward propagation to calculate the predicted label sequence; using the predicted label sequence and the true label sequence, the CTC loss function is calculated: α*C(and o ,and d )*x=…=β*C(y o ,and d )*and; x+…+y=1; C(and o ,and d )=-y d *log(y o ); α+…+β=N; Where α and β are the number of samples of one type in a single image; N is the total number of samples; y o and d is the output of the LSTM-CTC model and the dataset label; function C is the CTC loss function calculation formula; x and y are the weights of each type of sample; Based on the calculated CTC loss function, back propagation is performed to calculate the gradient relative to the LSTM-CTC model parameters; Using the calculated gradient information, the stochastic gradient descent algorithm is used to update the weights. The weight update is performed according to the following formula: In the formula, λ k+1 is the sample weight in the k+1th iteration; λ k is the sample weight in the kth iteration; η is the learning rate; is the gradient value of the loss function with respect to the sample weight; Repeat the above steps until the predetermined number of training rounds is reached or the stopping condition is met; Input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

2. According to claim 1, a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The MSER algorithm is used to identify and locate the images in the training set, and the NMS algorithm is used to determine the text recognition box. The processed images are input into the LSTM network.

3. According to claim 2, a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The MSER algorithm identification and positioning includes the following steps: The power grid infrastructure archive image is binarized and recognized when the threshold is increased to a value close to the gray value of the text in the image; the expression of the change rate of the connected domain area in the image is: In the formula, S i is the area of ​​a connected domain under threshold i; j is the change in the grayscale of the infrastructure archive image under threshold i; s(i) is the area of ​​a connected domain S under threshold i i The rate of change of , when s(i) becomes a local minimum, S i It is the maximum stable extreme value area.

4. According to claim 3, a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The NMS algorithm determines the text recognition frame and includes the following steps: Traverse all text pre-selection boxes and determine their confidence; Sort all text pre-selection boxes by confidence score, and select the text pre-selection box with the highest score; The text pre-selected box with the highest detection score has an IOU with the rest of the text pre-selected boxes. The text pre-selected boxes whose IOU is greater than the set value are deleted. In the formula, in section is the intersection area of ​​the two text pre-selection boxes; union is the union area of ​​the two text pre-selection boxes; Take the next text pre-selection box with the highest score and repeat the above steps until a text pre-selection box without overlapping parts is left, which is output as the result.

5. According to claim 1, a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The conditional probability calculation formula of CTC loss function is: In the formula, P(l|x) is the probability of the model outputting l in the output sequence; l is the true label sequence; B -1 (l) is the set of all possible output sequences corresponding to l; is the output sequence; For a given input sequence x, the output sequence is The conditional probability of Selecting the most likely class for each dimension is the result of that dimension: In the formula, l * Decode for the best path; Use the SGD gradient descent method to minimize the CTC loss function as shown below: In the formula, is the objective function of the CTC layer; X, and x represent the training data, output sequence, and input sequence, respectively.

6. According to claim 5, a method for electronic intelligent identification of power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The CTC loss function uses an algorithm based on dynamic programming to calculate the sum of all possible output sequence probabilities. The calculation method of the output sequence probability sum is: For a given true label sequence l, insert blank labels at the beginning, end and between letters to convert it into a sequence l′; The forward probability calculation formula is: Where α(t,u) is the forward factor, which represents the total probability of all output paths with the element at position u in l′ as the end label at time t; Output probability for each frame’s label; The backward probability calculation formula is: Where β(t,u) is the backward factor, which means the total probability of all paths that meet the conditions added after the output label at time t is the element at position u in l′; The product of the forward factor and the backward factor is summed to obtain the output sequence probability:

7. An electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that The device is applied to the electronic intelligent identification method of power grid infrastructure archives based on improved LSTM-CTC as described in any one of claims 1 to 6, and the device comprises: A feature sequence extraction module is used to divide the power grid infrastructure archive image data set into a training set and a test set, and input the images in the training set into the LSTM network to extract the feature sequence of the text in the power grid infrastructure archive image; The model building module is used to input the feature sequence into the CTC loss function, continuously adjust the weights in the iterative optimization process until the optimal hyperparameters are found, and then input the optimal hyperparameters into the LSTM-CTC model to obtain a trained LSTM-CTC model; The text recognition module is used to input the image to be recognized into the trained LSTM-CTC model to obtain the text recognition result.

8. An electronic intelligent identification device for power grid infrastructure archives based on improved LSTM-CTC, It is characterized in that including memory and processor; The memory is used to store computer program code and transmit the computer program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 6 according to the instructions in the computer program code.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Text line character recognition method, device, medium and electronic device

    CN109117848A

  • Multi-channel container number identification method, device and system

    CN111382733A

  • Character recognition model training method, character recognition method and device, electronic device and medium

    CN114462489A

  • Method and device for generating editable document based on non-editable image-text images

    CN115392188A

  • Substation on-site progress identification method based on improved Mask-RCNN

    CN115953666A