Ocr sensitive data identification method based on deep learning attention model

Through the deep learning-based attention model, combined with the VGG16 network and the MSRA-TD500 dataset, the problem of low recognition accuracy of traditional OCR methods under complex backgrounds and variable fonts is solved, and high accuracy and robustness are achieved. Sensitive data identification, suitable for a variety of OCR application scenarios.

CN119007222APending Publication Date: 2024-11-22SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411002556.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Traditional OCR methods have low recognition accuracy when dealing with complex backgrounds, variable fonts, and character distortions, and cannot adapt to changing sensitive data types.

Method used

Using a deep learning-based attention model, image features are extracted through preprocessing and feature extraction, multiple convolutional layers and pooling layers are used, and attention mechanism is introduced to weight the sensitive data area, combining the VGG16 network model and MSRA- TD500 dataset is trained.

Benefits of technology

It improves the accuracy of sensitive data recognition under complex backgrounds and varied fonts, enhances robustness, reduces dependence on manually set thresholds, and realizes automated recognition, suitable for the fields of protecting user privacy and preventing data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007222A_ABST
    Figure CN119007222A_ABST
Patent Text Reader

Abstract

The invention provides an ocr sensitive data recognition method based on a deep learning attention model, and belongs to the field of image recognition. Text features and sensitive data modes are automatically learned through the deep learning model, and weighting processing is carried out on a key area in combination with an attention mechanism; therefore, the recognition accuracy of the sensitive data under the complex background and the variable fonts is improved, the method can adapt to sensitive data type and format changes under different scenes, and the method has high adaptivity and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition, and in particular to an OCR sensitive data recognition method based on a deep learning attention model. Background Art

[0002] With the continuous improvement of informatization, a large amount of sensitive data such as ID card numbers, bank card numbers, passwords, etc. are stored in electronic documents. However, traditional sensitive data recognition methods are mostly based on rule matching or simple text analysis, which have poor recognition effects on complex backgrounds and changing fonts, and cannot adapt to the ever-changing types of sensitive data.

[0003] OCR technology is a technology that converts text in an image into editable and searchable text. With the development of deep learning technology, the accuracy of OCR has been significantly improved. However, traditional OCR methods still have low recognition accuracy when dealing with complex backgrounds, font diversity, and character distortion. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides an OCR sensitive data recognition method based on a deep learning attention model to improve the accuracy and robustness of recognition and solve the problem that the existing OCR technology has low accuracy when recognizing complex backgrounds, variable fonts and constantly changing sensitive data types.

[0005] The technical solution of the present invention is:

[0006] A method for identifying OCR sensitive data based on deep learning attention model, including

[0007] Preprocessing improves the quality of images, removes or reduces noise and interference, and adjusts the basic properties of images;

[0008] Feature extraction, using deep convolutional neural networks to extract features from input images;

[0009] It uses multiple continuous convolutional layers and pooling layers to extract local features in the image through continuous convolution operations and reduce the dimension of the feature map through pooling operations while retaining important spatial information;

[0010] Attention mechanism: Based on feature extraction, the attention mechanism is introduced to perform weighted processing on sensitive data areas.

[0011] Furthermore,

[0012] Adjust image properties including brightness, contrast, and skew.

[0013] Furthermore,

[0014] The network model uses VGG16 as the feature extraction network.

[0015] Going further,

[0016] The extracted features are used for subsequent text candidate box selection and text line positioning.

[0017] Feature extraction uses several consecutive convolutional layers and pooling layers to extract local features in the image through continuous convolution operations and reduce the dimension of the feature map through pooling operations while retaining spatial information.

[0018] Furthermore,

[0019] Assume that the image input is X, and the attention mechanism used is described as follows:

[0020]

[0021] in:

[0022]

[0023] In the above formula, W q , W k , W v is the linear mapping parameter of the input vector, which is used to perform feature mapping on the original input vector; Represents the alignment function, which is used to measure W q X and W k The similarity between X is converted into a 0-1 weight form through Softmax(·), and X′ is the final output result of the attention mechanism;

[0024] The output X′ of the attention mechanism is used as the input of the convolutional layer, and the spatial features are further extracted through the convolutional layer; C = Conv(Conv(Conv(X′))

[0025] Where C is the feature output extracted after the convolution layer; then, each unit is processed by a batch normalization layer BN(·) and a ReLU(·) nonlinear layer, and finally the feature extraction unit is obtained. The expression is:

[0026]

[0027] Where H is the extracted feature input, It is the feature extraction unit.

[0028] Furthermore,

[0029] The MSRA-TD500 dataset was selected as training and testing resources.

[0030] Furthermore,

[0031] The effect of adding attention mechanism is visualized through heat map

[0032] The beneficial effects of the present invention are

[0033] High recognition accuracy: The deep learning model automatically learns text features and sensitive data patterns, and combines the attention mechanism to weight key areas, thereby improving the recognition accuracy of sensitive data in complex backgrounds and changing fonts.

[0034] Enhanced robustness: The method of the present invention can adapt to changes in sensitive data types and formats in different scenarios, and has strong adaptability and robustness.

[0035] Achieve automation: Through the automatic feature extraction and recognition of deep learning models, the reliance on manually set thresholds and parameters is reduced, and the degree of automation of the algorithm is improved.

[0036] Meeting practical application needs: The method of the present invention can be widely applied to various OCR application scenarios, especially in the field where user privacy needs to be protected and data leakage needs to be prevented, and has important practical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0039] The present invention provides an OCR sensitive data recognition method based on a deep learning attention model, aiming to improve the accuracy and robustness of OCR technology in sensitive data recognition, thereby meeting the needs for efficient and accurate recognition of sensitive data in application scenarios such as document scanning, data leakage detection, and privacy protection.

[0040] The following steps are involved:

[0041] 1. Preprocessing: In the text detection and recognition system, preprocessing the input image is a crucial step. The main purpose of preprocessing is to improve the quality of the image, eliminate or reduce potential noise and interference, and adjust some basic properties of the image, such as brightness, contrast, and tilt angle, so as to simplify the subsequent text detection and recognition process.

[0042] 2. Network structure design: The patent of this invention uses VGG16 as the feature extraction network. VGG16 is a deep convolutional neural network composed of multiple convolutional layers and pooling layers for extracting features from the input image. These features will be used for subsequent text candidate box selection and text line positioning. It uses multiple continuous convolutional layers and pooling layers to extract local features in the image through continuous convolution operations, and reduces the dimension of the feature map through pooling operations while retaining important spatial information. The convolutional layer of VGG16 can capture key information such as edges, textures, shapes, etc. in the image by learning feature representations at different levels. This information is crucial for subsequent text candidate box selection and text line positioning.

[0043] 3. Attention mechanism: Based on feature extraction, the attention mechanism is introduced to perform weighted processing on possible sensitive data areas. By introducing the self-attention mechanism, the network model can focus on valuable feature data, such as sensitive data, rather than complex image background information. Assuming that the image input is X, the attention mechanism used is described as follows:

[0044]

[0045] in:

[0046]

[0047] In the above formula, W q , W k , W v It is the linear mapping parameter of the input vector, which is used to perform feature mapping on the original input vector. Represents the alignment function, which is used to measure W q X and W k X, and convert the similarity into a 0-1 weighted form through Softmax(·), and X′ is the final output result of the attention mechanism.

[0048] The output X′ of the attention mechanism is used as the input of the convolutional layer to further extract spatial features. C = Conv(Conv(Conv(X))

[0049] Where C is the feature output extracted after the convolution layer. After that, each unit is processed by a batch normalization layer BN(·) and a ReLU(·) nonlinear layer to finally obtain the feature extraction unit The expression is:

[0050]

[0051] Where H is the extracted feature input, is the feature extraction unit. The location of the attention mechanism is as follows Figure 1 shown.

[0052] The model proposed in the present invention takes full account of the complexity and diversity of text detection in actual scenes during design and implementation. In order to verify the performance of the model and optimize its parameters, the MSRA-TD500 data set is selected as the main training and testing resource. The MSRA-TD500 data set is a natural image data set designed and constructed for multi-directional and multi-language text detection algorithms. It covers two major scenes, indoors and outdoors, and the images in each scene reflect the diversity and complexity of text in the real world. In indoor environments, images mainly include various signs, house numbers, signs, etc., which often have different sizes, directions and font styles, bringing considerable challenges to text detection algorithms. In outdoor environments, images are mainly focused on road signs, billboards, etc., which not only have variable directions and fonts, but are also often affected by factors such as lighting, occlusion, and background noise, further increasing the difficulty of detection.

[0053] The influence of the attention module is visualized by heat map, which is a comparison of the heat maps without and with the attention mechanism. The more obvious the red area is, the higher the influence of the area on the network model. When the attention mechanism is not added, the red area is evenly distributed in the whole picture. After the attention mechanism is added, most of the red areas are concentrated in the warning sign area with text, while ignoring the useless background information in the picture. It can be seen that the attention mechanism can significantly increase the feature weight of the text area. The present invention intuitively demonstrates the influence and optimization effect of the attention mechanism on the text detection task through the visualization of heat maps.

[0054] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for identifying sensitive data using OCR based on a deep learning attention model, characterized in that: include Preprocessing improves the quality of images, removes or reduces noise and interference, and adjusts the basic properties of images; Feature extraction, using deep convolutional neural networks to extract features from input images; It uses continuous convolutional layers and pooling layers to extract local features in the image through continuous convolution operations and reduce the dimension of the feature map through pooling operations while retaining spatial information; Attention mechanism: Based on feature extraction, the attention mechanism is introduced to perform weighted processing on sensitive data areas.

2. The method according to claim 1, characterized in that Adjust image properties including brightness, contrast, and skew.

3. The method according to claim 1, characterized in that The network model uses VGG16 as the feature extraction network.

4. The method according to claim 1 or 3, characterized in that: The extracted features are used for subsequent text candidate box selection and text line positioning.

5. The method according to claim 3, characterized in that: Feature extraction uses several consecutive convolutional layers and pooling layers to extract local features in the image through continuous convolution operations and reduce the dimension of the feature map through pooling operations while retaining spatial information.

6. The method according to claim 1, characterized in that Assume that the image input is X, and the attention mechanism used is described as follows: in: In the above formula, W q , W k , W v is the linear mapping parameter of the input vector, which is used to perform feature mapping on the original input vector; Represents the alignment function, which is used to measure W q X and W k The similarity between X is converted into a 0-1 weight form through Softmax(·), and X′ is the final output result of the attention mechanism; The output x′ of the attention mechanism is used as the input of the convolutional layer, and the spatial features are further extracted through the convolutional layer; C = Conv(Conv(Conv(X′)) where C is the feature output extracted after the convolutional layer; then, each unit is processed through a batch normalization layer BN(·) and a ReLU(·) nonlinear layer, and finally the feature extraction unit is obtained. The expression is: Where H is the extracted feature input, It is the feature extraction unit.

7. The method according to claim 1, characterized in that The MSRA-TD500 dataset was selected as training and testing resources.

8. The method according to claim 1, characterized in that The impact of adding the attention mechanism is visualized through a heat map.

Citation Information

Patent Citations

  • An OCR method based on depth learning

    CN109376658A

  • Popular picture automatic identification and content filtering method on mobile internet

    CN112395442A

  • Collaborative learning character recognition method under attention mechanism

    CN112966684A

  • Method and device for recognizing Burmese image text fused with multi-scale semantic feature map

    CN113901879A

  • Sensitive information classification method and device based on multi-modal attention fusion

    CN117235605A