Image processing method and device, medium, equipment and computer program product

By performing layer extraction and text recognition on the target image, the problem of overlapping text in the image is solved, the accuracy of text recognition and review efficiency are improved, and the need for manual review is reduced.

CN118918603APending Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410947949.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In image processing, there may be background information such as overlapping text or seals in the images uploaded by the user, affecting the accurate identification of text in the image, resulting in a decrease in recognition error and subsequent review efficiency.

Method used

By extracting the target image layer, layer images under multiple layers are obtained, and text recognition is performed on each layer image to generate verification information of the target image to avoid the impact of text overlap on recognition and improve text The accuracy and validity of information.

Benefits of technology

It effectively avoids the impact of text overlap on recognition, reduces the missed detection rate of text information, improves the accuracy and efficiency of text recognition, reduces the workload of manual review, and improves the accuracy and efficiency of automatic review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918603A_ABST
    Figure CN118918603A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, a medium, equipment and a computer program product. The method comprises the following steps: receiving a target image; performing layer extraction on the target image to obtain layer images corresponding to the target image under a plurality of layers; performing text recognition on each layer image to obtain text information corresponding to the layer image; and generating target verification information corresponding to the target image according to the text information corresponding to the layer image. Therefore, the influence of overlapping of texts in different layers on text recognition can be effectively avoided, the omission ratio of the text information is reduced, the accuracy and effectiveness of text recognition are improved, the accuracy of the target verification information obtained through information extraction based on the text information can be improved, the number of automatic auditing in the subsequent auditing process is increased, and the user experience is improved. And the workload of manual auditing is saved, so that the target image auditing efficiency is improved, and timely response to the user is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular, to an image processing method, apparatus, medium, device, and computer program product. Background Art

[0002] In the related art, users can further authenticate themselves by uploading photos of their qualification certificates, etc. In actual application scenarios, the images uploaded by users may contain overlapping text or interference from background information such as seals, which may affect the accurate recognition of text in the images. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides an image processing method, the method comprising:

[0005] receiving a target image;

[0006] Performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers;

[0007] Performing text recognition on each of the layer images to obtain text information corresponding to the layer images;

[0008] According to the text information corresponding to the layer image, target verification information corresponding to the target image is generated.

[0009] In a second aspect, the present disclosure provides an image processing device, the device comprising:

[0010] A receiving module, used for receiving a target image;

[0011] An extraction module, used for performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers;

[0012] A recognition module, used for performing text recognition on each of the layer images to obtain text information corresponding to the layer images;

[0013] The generating module is used to generate the target verification information corresponding to the target image according to the text information corresponding to the layer image.

[0014] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0015] In a fourth aspect, the present disclosure provides an electronic device, including:

[0016] a storage device having a computer program stored thereon;

[0017] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0018] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0019] Through the above technical scheme, when recognizing the text in the target image, the target image can be firstly extracted by layer, so as to obtain the layer images corresponding to the target image under multiple layers, and then the text recognition is performed based on the layer images to obtain the text information. Thus, the influence of the overlapping of texts in different layers on the text recognition can be effectively avoided, the missed detection rate of text information can be reduced, and the accuracy and effectiveness of text recognition can be improved. Then, the accuracy of the target verification information obtained by information extraction based on the text information can be improved, the number of automatic audits in the subsequent audit process can be increased, and the workload of manual audit can be saved, so as to improve the efficiency of the target image audit and realize the timely response to the user.

[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0022] Figure 1 The present invention is a flowchart of an image processing method provided according to an embodiment of the present invention.

[0023] Figure 2 This is the sample image corresponding to the diploma.

[0024] Figure 3A Indicates that Figure 2 The layer image corresponding to the certificate template layer in the image shown, Figure 3B Indicates that Figure 2 The layer image corresponding to the document content layer in the image shown.

[0025] Figure 4A is a schematic diagram of a target image provided according to an embodiment of the present disclosure, Figure 4B Shown Figure 4A The layer image of the corresponding certificate template layer, Figure 4C Shown Figure 4A The layer image of the corresponding document content layer.

[0026] Figure 5 A schematic diagram of a layer extraction model provided according to an embodiment of the present disclosure.

[0027] Figure 6 A schematic diagram of the model structure of a feature extraction sub-model provided according to an embodiment of the present disclosure.

[0028] Figure 7 A schematic diagram of the model structure of an upsampling sub-model provided according to an embodiment of the present disclosure.

[0029] Figure 8 The present invention is a block diagram of an image processing device provided according to an embodiment of the present disclosure.

[0030] Fig. 9 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0037] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0038] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0039] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0040] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0041] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0042] As described in the background technology, accurate identification of the text information of the image has an important impact on the accuracy and efficiency of the subsequent audit. For example, in the context of credit enhancement business, users can actively upload corresponding qualification photos and realize credit limit growth after review. The applicant studied the audit link and found that in the review platform, the validity of the image is usually judged based on the text recognition results of the image and the preset rules, and then the automatic audit result (pass or reject) or manual review is determined. After that, the upper-level model (such as user portrait model, credit limit increase model and configured strategy, etc.) is combined in the decision-making platform to give users real-time feedback. If the text recognition result of the image has a large error, it will lead to a decrease in the proportion of subsequent automatic determination of the audit results, and greatly increase the number of manual reviews required, which will not only increase the workload of the auditors, but also greatly delay the results of the user's audit and certification. Based on this, the present disclosure provides the following embodiments to effectively improve the accuracy and effectiveness of text information extraction in images, so as to provide comprehensive and effective data support for subsequent automatic audit links.

[0043] Figure 1 As shown, it is a flowchart of an image processing method provided according to an embodiment of the present disclosure, as shown Figure 1 As shown, the method may include:

[0044] In step 11, a target image is received.

[0045] In one possible scenario, such as in a credit enhancement business scenario, a user can achieve a credit limit increase or authentication by uploading a photo of his or her qualifications. The image uploaded by the user can be used as the target image. As another example, the target image can also be an image obtained from an application authorized by the user after obtaining the user's authorization, such as obtaining an image saved by the user in other applications for verification.

[0046] In step 12, layer extraction is performed on the target image to obtain layer images corresponding to the target image under multiple layers.

[0047] The layers may include a certificate template layer and a certificate content layer, wherein the certificate template layer is used to represent the layer where the template text in the target image is located, representing the fixed content in the target image, and the certificate content layer is used to represent the layer where the actual content in the target image is located, representing the dynamically filled content in the target image corresponding to the template text. Figure 2 As shown, it is the image corresponding to the graduation certificate. Figure 3A Indicates that Figure 2 The layer image corresponding to the certificate template layer in the image shown, Figure 3B Indicates that Figure 2The layer image corresponding to the document content layer in the image shown. As an example, before executing step 12, the target image can be preprocessed. For example, the target image can be oriented based on computer vision or deep learning methods. For example, the text orientation in the target image can be detected, and the text orientation therein can be adjusted to the target orientation by rotating the target image, wherein the target orientation can be set based on the actual application scenario, which is not limited in this disclosure. For another example, the image preprocessing can also be quality enhancement processing of the target image, such as processing based on a quality enhancement algorithm commonly used in the art, such as adjustment of brightness and color, etc., which will not be described in detail here.

[0048] In step 13, text recognition is performed on each layer image to obtain text information corresponding to the layer image.

[0049] For each layer image, text recognition can be performed based on a common text recognition technology in the art, such as detecting and recognizing text in the layer image based on a deep learning model to obtain the location and recognition information of all texts. For example, text recognition can be performed through OCR (Optical Character Recognition).

[0050] As an example, Figure 4A The target image is shown in FIG. 1 . In the target image, due to the printing deviation of the certificate content, the position of the text of the certificate content and the text of the certificate template overlap. Figure 4A When identifying in the text, the "rights holder" and "Liu Wen" may be identified as a whole, and the identification result may be "quanliu", resulting in identification errors. This will not only lead to errors in the recognition of text information, but also make it difficult to extract the corresponding information of the right holder during subsequent information extraction, making it difficult to conduct automatic review and judgment, and manual review is required.

[0051] In the example disclosed in the present disclosure, the certificate template layer and the certificate content layer can be extracted separately. In this example, the layer image of the certificate template layer is displayed as follows: Figure 4B As shown, it contains "right holder", and the layer image of the certificate content layer is shown as follows Figure 4C As shown, if "Liu Wen" is included, the recognition error caused by printing position deviation can be effectively avoided when extraction is performed based on different layer images.

[0052] In step 14, target verification information corresponding to the target image is generated according to the text information corresponding to the layer image.

[0053] Among them, information extraction can be performed on the text information to obtain the target verification information. For example, information extraction can generate information pairs corresponding to the target image based on the text information, and each information pair can be represented by a KV structure, such as <Name: Zhang San>, <Age: 34>, etc. As an example, the text information corresponding to each layer image can be merged to obtain the text information corresponding to the target image, and then the text information can be extracted based on the string processing rule or the key information extraction model. For example, the string processing rule contains a matching rule corresponding to the key field, and the text information can be matched based on the string processing rule to obtain the structured information. For another example, the key information extraction model can be a KIE (Key Information Extraction) model, so that information extraction can be performed on the text information based on the model, and the information pairs obtained by extraction can be used as the target verification information, so that the subsequent verification process can be verified based on the target verification information, and then the audit result of the target image can be determined.

[0054] Therefore, through the above technical scheme, when recognizing the text in the target image, the target image can be firstly extracted by layer, so as to obtain the layer images corresponding to the target image under multiple layers, and then the text recognition is performed based on the layer images to obtain the text information. Thus, the influence of the overlapping of texts in different layers on the text recognition can be effectively avoided, the missed detection rate of text information can be reduced, and the accuracy and effectiveness of text recognition can be improved. Then, the accuracy of the target verification information obtained by information extraction based on the text information can be improved, the number of automatic audits in the subsequent audit process can be increased, and the workload of manual audit can be saved, so as to improve the efficiency of the target image audit and realize timely response to users.

[0055] In a possible embodiment, the step of performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers may include:

[0056] The layer features corresponding to each of the layers are determined according to the target image and the layer extraction model, wherein each of the layers corresponds to a layer extraction sub-model in the layer extraction model.

[0057] Among them, the layer extraction model can be trained and implemented through deep learning methods, and a corresponding layer extraction sub-model can be set for each layer to achieve accurate extraction of features under different layers.

[0058] As an example, the layer feature is used to represent the position information of the pixel points belonging to the layer in the target image. For example, taking the ID template layer as an example, in the initial layer feature output by the ID template layer, the value of the pixel at the position belonging to the ID template in the target image is set to 1, and the value of the pixel at the position not belonging to the ID template is set to 0.

[0059] Afterwards, a layer image corresponding to each layer is generated according to the target image and the layer features corresponding to each layer.

[0060] As an example, after obtaining the layer features corresponding to each image, the pixels with a value of 1 can be retained in the target image to obtain the layer image corresponding to the image, such as Figure 3A and Figure 3B shown.

[0061] Therefore, through the above technical solution, a corresponding layer extraction sub-model can be set for each layer to improve the accuracy of layer image extraction, thereby ensuring the accuracy of text information and improving the efficiency and accuracy of text recognition in images.

[0062] As an example, Figure 5 As shown, the layer extraction model includes a feature extraction sub-model 51, multiple layer extraction sub-models 52 and an upsampling sub-model 53;

[0063] Accordingly, determining the layer features corresponding to each layer according to the target image and the layer extraction model may include:

[0064] The target image is input into the feature extraction sub-model to obtain image features corresponding to the target image.

[0065] Among them, the feature extraction sub-model is used to extract the features of different dimensions of the target image, which is the basis for layer feature extraction. The structure of the feature extraction sub-model can be based on the structure of CNN (Convolutional Neural Networks), such as ResNet (Residual Network), VGG (Visual Geometry Group) model, etc. It can also be based on the structure of Transformer network, such as Swin-Transformer, ViT (Vision Transformer), etc.

[0066] For example, taking the VGG model structure as an example, Figure 6As shown, the input target image has a height of 640 pixels, a width of 1120 pixels, and 3 channels (red, green, and blue). It is input into a multi-layer deep neural network and outputs a feature map F1 with a size of 160 pixels in height, 280 pixels in width, and 256 channels (representing 256 dimensional information of the target image). Thus, the feature map F1 obtained by feature extraction represents the information of the target image in multiple dimensions, providing effective data support for subsequent layer extraction.

[0067] Afterwards, the image features are input into the layer extraction sub-model corresponding to each layer to obtain the layer features corresponding to each layer. Among them, each layer extraction sub-model is independent of each other, and each layer extraction sub-model can be composed of multiple convolution modules to extract the layer features of the corresponding layer. Afterwards, the layer image corresponding to the layer can be obtained based on the method described above.

[0068] In actual application scenarios, in the process of feature extraction based on the feature extraction submodel, the input target image is usually downsampled, which reduces the resolution of the extracted image features, and the resolution corresponding to the layer features is usually smaller than the resolution corresponding to the target image. Accordingly, the layer extraction of the target image to obtain the layer images corresponding to the target image under multiple layers may also include: upsampling the layer images corresponding to each layer based on the upsampling submodel to obtain a new layer image.

[0069] As an example, the layer image output by the layer extraction sub-model has a height of 160 pixels and a width of 280 pixels, which is lower than the height of the target image of 640 pixels and its width is also lower than the width of the target image of 1120 pixels. Therefore, the clarity of the layer image will be lower than the clarity of the target image. Based on this, in this embodiment, an upsampling sub-model can be included in the layer extraction model, and the implementation of the upsampling sub-model can be based on the transposed convolution of deep learning. For example, Figure 7 As shown, the input feature F2 of the upsampling sub-model has a size of 2x2, the output feature F3 has a size of 5x5, and the size of the convolution kernel F4 is 3x3. The value of each position in the output is the sum of the product of the convolution and the input. During the convolution calculation process, the calculation can be based on the extended convolution (shown in the dotted part) to ensure that the convolution can be multiplied with the corresponding input, and the default value of the extension is 0. Therefore, the upsampling sub-model can convert a layer image with a lower resolution into a layer image with a higher resolution, while ensuring the accuracy of the layer image extraction, the clarity of the obtained layer image is improved, so as to provide a clear image in the subsequent text recognition process, thereby improving the accuracy and efficiency of text recognition.

[0070] In a possible embodiment, the layer may include a certificate layer and a watermark layer. The certificate layer may be used to represent a layer containing certificate information in the target image, such as a certificate template layer and a certificate content layer. The extraction method has been described above and will not be repeated here. Afterwards, text recognition may be performed on the layer image of the watermark layer to obtain the corresponding text information, i.e., the watermark information.

[0071] Accordingly, the method further comprises:

[0072] Verification is performed according to the watermark information to obtain an authenticity verification result of the target image.

[0073] The watermark information usually includes representations of some compliance information in the target image. Therefore, in this embodiment, the authenticity of the target image can be verified based on the watermark information.

[0074] As an example, performing verification based on the watermark information to obtain the authenticity verification result of the target image may include:

[0075] If the watermark information does not meet the target condition, determining that the authenticity verification result of the target image is true;

[0076] The target condition includes at least one of the following:

[0077] The first condition is that the watermark information is the website information. As an example, an abnormal user may verify through a simulated ID. In actual scenarios, in order to distinguish simulated IDs from real IDs and avoid confusion between simulated IDs, the website information corresponding to the simulated ID is usually added to the simulated ID as a watermark, such as Figure 2 As shown, therefore, in this embodiment, the watermark information can be identified. If the watermark information is the website information, the target image is considered to be a simulated certificate, and the authenticity verification result of the target image can be determined to be false. If the condition is not met, the authenticity verification result of the target image can be determined to be true.

[0078] The second condition is that the number of the watermark information exceeds the number threshold, and the distance between adjacent watermark information in the multiple watermark information is within the first range, and the inclination angles corresponding to the multiple watermark information are within the second range.

[0079] As another example, when adding watermarks to a simulated document, multiple watermarks with regular arrangements may be added to the document, such as Figure 2 Accordingly, in this embodiment, the authenticity of the target image can be verified based on the arrangement position of the watermark information.

[0080] The quantity threshold can be set based on the actual application scenario and is not limited thereto. When multiple watermark information is extracted, the distance between different watermark information in each direction can be determined according to the horizontal direction and the vertical direction, respectively, wherein the distance can be the distance between the center points of the identification frames corresponding to adjacent watermark information, and the tilt angle corresponding to the watermark information can be the angle between the line corresponding to the watermark information and the horizontal direction. The distance interval and the angle interval can be pre-set, the distance interval can represent the difference between the preset maximum distance and the minimum distance, and the angle interval can represent the difference between the preset maximum angle and the minimum angle. The minimum value of the first range can be the minimum value of the determined distance, and the maximum value of the first range can be the sum of the minimum value of the distance and the distance interval. The minimum value of the second range can be the minimum value of the determined angle, and the maximum value of the second range can be the sum of the minimum value of the angle and the angle interval.

[0081] If the number of watermark information exceeds the number threshold, it means that the target image contains more watermark information. Taking the horizontal direction as an example, the watermarks S11-S14 are arranged in sequence, the distance between S11 and S12 in the horizontal direction is D1, the distance between S12 and S13 in the horizontal direction is D2, and the distance between S13 and S14 in the horizontal direction is D3. When D1, D2 and D3 are all in the first range, it means that the distances between adjacent watermark information in S11-S14 are close. The inclination angles of S11-S14 are all in the second range, indicating that the inclination angles of S11-S14 are similar. At this time, it can be considered that the watermark information is a watermark with a regular arrangement, which may be added when generating a simulated certificate, and it is further considered that the authenticity verification result of the target image containing the watermark information is false. On the contrary, the authenticity verification result of the target image containing the watermark information is considered to be true.

[0082] Among them, the first range in the vertical direction and the horizontal direction can be determined respectively to judge the distance from the horizontal direction and the vertical direction, or the distance can be identified and judged only in one direction. It can be set based on the actual application scenario, and the present disclosure does not limit this.

[0083] It should be noted that if the target condition includes the first condition and the second condition, when the watermark information hits one of the conditions, the authenticity verification result of the target image is considered to be false. Therefore, the watermark information in the target image can be identified through the above technical solution, and the authenticity of the target image can be judged based on the watermark information, thereby achieving the authenticity judgment of the target image and providing effective data support for the review of the target image.

[0084] Accordingly, generating target verification information corresponding to the target image according to the text information corresponding to the layer image may include:

[0085] When the authenticity verification result is true, the information obtained by extracting information based on the text information corresponding to the layer image of the certificate layer is used as the target verification information corresponding to the target image. The information extraction based on the text corresponding to the certificate layer and the authenticity verification based on the watermark information can be performed simultaneously, or the authenticity verification can be performed based on the watermark information first, and then determine whether to extract information after obtaining the corresponding authenticity verification result. It can be set based on the actual scene. The specific implementation method of information extraction has been described in detail above and will not be repeated here.

[0086] In this embodiment, only when the authenticity verification result is true will the target verification information corresponding to the target image be generated for subsequent verification, so that false images can be discovered in time, the risk of passing verification based on false images can be avoided, and the accuracy and efficiency of automatic review of target images can be improved. At the same time, it can also reduce the situation where users upload false document images for verification to a certain extent.

[0087] In a possible embodiment, the layer includes a certificate layer and a seal layer, and the text information corresponding to the layer image of the seal layer is the seal information. Similarly, the certificate layer can be used to represent the layer containing certificate information in the target image, such as a certificate template layer and a certificate content layer. Then, text recognition can be performed on the layer image of the seal layer to obtain the corresponding text information, that is, the seal information.

[0088] The method further comprises:

[0089] Verification is performed based on the seal information and the text information corresponding to the target image to obtain an authenticity verification result of the target image.

[0090] Among them, taking the image of a diploma certificate as an example, the corresponding seal is usually the name of the school, and the corresponding school name can also be determined based on the text information in the certificate layer, so it can be determined whether the two are consistent to determine the authenticity verification result of the target image. If the attribute value of the attribute corresponding to the seal information in the text information corresponding to the target image is different from the seal information, then the authenticity verification result of the target image is determined to be false, otherwise, the authenticity verification result of the target image is determined to be true. For example, the school name in the seal information is XX1 University, and the school name determined by the text information corresponding to the target image is XX2 University, then the authenticity verification result of the target image can be determined to be false.

[0091] Accordingly, generating target verification information corresponding to the target image according to the text information corresponding to the layer image may include:

[0092] When the authenticity verification result is true, the information obtained by extracting information based on the text information corresponding to the layer image of the certificate layer is used as the target verification information corresponding to the target image. Among them, the information extraction based on the text corresponding to the certificate layer and the authenticity verification based on the seal information can be performed simultaneously, and the authenticity verification process can be performed based on the recognized seal information and the information extracted. The specific implementation method of information extraction has been described in detail above and will not be repeated here.

[0093] In this embodiment, only when the authenticity verification result is true will the target verification information corresponding to the target image be generated for subsequent verification, so that false images can be discovered in time, the risk of passing verification based on false images can be avoided, and the accuracy and efficiency of automatic review of target images can be improved. At the same time, it can also reduce the situation where users upload false document images for verification to a certain extent.

[0094] In a possible embodiment, the layer extraction model can be constructed in the following manner:

[0095] Obtain basic training images under the multiple layers.

[0096] The layers may include a certificate template layer, a certificate content layer, and may also include at least one of a watermark layer and a seal layer. For each layer, multiple images of the layer may be pre-generated as basic training images. For example, various types of common certificates may be analyzed to construct images under the certificate template layer and certificate content layer corresponding to the certificates. In addition, multiple watermark images under the watermark layer, multiple seal images under the seal layer, etc. may also be pre-set.

[0097] Afterwards, a basic training image is obtained under different layers as a target training image, and the obtained target training image is superimposed to obtain a training image.

[0098] For example, one image can be selected from the images under the above-mentioned multiple layers of the certificate template layer, certificate content layer, watermark layer and seal layer for superposition. For example, one image can be selected from the images under the certificate template layer M, certificate content layer N, watermark layer S and seal layer Y for superposition as training image A1, and the target training image corresponding to the training image can include M1, N1, S1 and Y1. One image can also be selected from the images under the certificate template layer M, certificate content layer N and seal layer Y for superposition as training image A2, and the target training image corresponding to the training image can include M1, N2 and Y3. Therefore, multiple training images can be generated through the above scheme.

[0099] The training image is used as an input of a model, and a target training image corresponding to the training image is used as a target output, a target loss of the layer extraction model is determined, and the layer extraction model is trained based on the target loss.

[0100] As an example, the training image A1 is obtained by superimposing the target training images M1, N1, S1 and Y1. Then, the training image can be input into the feature extraction sub-model in the layer extraction model to obtain the image features corresponding to the training image; then, the image features are respectively input into each layer feature extraction sub-model to obtain the layer images corresponding to the layer feature extraction sub-model, namely M1', N1', S1' and Y1'. Then, the layer images M1', N1', S1' and Y1' are respectively input into the upsampling sub-model to obtain new layer images, namely M1", N1", S1" and Y1". Therefore, the target loss can be determined based on the layer images M1', N1', S1', Y1' and the new layer images M1", N1", S1" and Y1" and the target training images M1, N1, S1 and Y1 to train the model.

[0101] As an example, the layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models and an upsampling sub-model;

[0102] Accordingly, taking the training image as the input of the model and taking the target training image corresponding to the training image as the target output to determine the target loss of the layer extraction model may include:

[0103] For each of the layers, based on the layer image output by the layer extraction submodel corresponding to the layer and the target training image of the training image under the layer, the layer loss corresponding to the layer extraction submodel is determined, and the layer loss is determined as the target loss corresponding to the layer extraction submodel. The target training image of the training image under the layer is the target training image under the layer used when the training image is obtained by image superposition.

[0104] For example, for the document template layer, the layer loss L corresponding to its layer extraction sub-model can be determined based on M1' and M1. M ; For the document content layer, the layer loss L corresponding to its layer extraction sub-model can be determined based on N1' and N1 N ; For the watermark layer, the layer loss L corresponding to its layer extraction sub-model can be determined based on S1' and S1 S ; For the stamp layer, the layer loss L corresponding to its layer extraction sub-model can be determined based on Y1' and Y1 Y. Among them, the resolution of the layer image output by the layer extraction sub-model is usually smaller than the resolution of the corresponding target training image. Therefore, when determining the above-mentioned losses of each layer, the target training image can be resized to adjust the resolution of the target training image to the same resolution as the layer image output by the layer extraction sub-model. After that, the loss can be calculated based on the target training image and the layer image after the resolution adjustment to determine the layer loss corresponding to each layer extraction sub-model. Among them, the calculated loss can be calculated by BCELoss (Binary CrossEntropy Loss), and the specific calculation method is not repeated here. Furthermore, the target loss corresponding to each layer extraction sub-model can be obtained.

[0105] For each of the layers, based on the layer image corresponding to the layer output by the upsampling sub-model and the target training image of the training image under the layer, the prediction loss corresponding to the layer is determined, and the target loss corresponding to the upsampling sub-model is determined by the sum of the prediction losses.

[0106] For example, for the document template layer, the predicted loss l corresponding to the layer can be determined based on M1' and M1 M ; For the document content layer, the predicted loss l corresponding to the layer can be determined based on N1” and N1 N ; For the watermark layer, the prediction loss l corresponding to the layer can be determined based on S1” and S1 S ; For the stamp layer, the prediction loss l corresponding to the layer can be determined based on Y1” and Y1 Y . Similarly, if the resolution of the layer image output by the upsampling sub-model is the same as that of the target training image, the loss calculation can be performed directly. If the resolution of the layer image output by the upsampling sub-model is different from that of the target training image, the resolution of the target training image can be adjusted in a similar way to the above, and the target training image can be adjusted to the same resolution as the layer image output by the upsampling sub-model. After that, the loss calculation can be performed based on the target training image and layer image after the resolution adjustment. The prediction loss can also be calculated based on BCELoss. Furthermore, l M , l N , l S and l Y The sum is taken as the target loss L corresponding to the upsampling sub-model.

[0107] The sum of the target loss corresponding to each of the layer extraction sub-models and the target loss corresponding to the upsampling sub-model is determined as the target loss corresponding to the feature extraction sub-model.

[0108] If L M , LN , L S , L Y The sum of λ and L is used as the target loss corresponding to the feature extraction sub-model.

[0109] Therefore, through the above technical scheme, each sub-model in the layer extraction model can be trained and optimized end-to-end, and by determining the target loss of each sub-model, the model parameters of the sub-model can be adjusted to improve the training efficiency of the layer extraction model. At the same time, it can also reduce the errors between the sub-modules and improve the accuracy of the extraction results of the layer extraction model.

[0110] Based on the same inventive concept, the present disclosure also provides an image processing device, such as Figure 8 As shown, the device 10 comprises:

[0111] The receiving module 100 is used to receive a target image;

[0112] An extraction module 200 is used to extract layers from the target image to obtain layer images corresponding to the target image under multiple layers;

[0113] The recognition module 300 is used to perform text recognition on each of the layer images to obtain text information corresponding to the layer images;

[0114] The generating module 400 is used to generate target verification information corresponding to the target image according to the text information corresponding to the layer image.

[0115] Optionally, the extraction module includes:

[0116] A first determination submodule is used to determine the layer features corresponding to each of the layers according to the target image and the layer extraction model, wherein each of the layers corresponds to a layer extraction submodel in the layer extraction model;

[0117] The first generating submodule is used to generate a layer image corresponding to each layer according to the target image and the layer features corresponding to each layer.

[0118] Optionally, the layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models and an upsampling sub-model;

[0119] The first determining submodule is further used for:

[0120] Inputting the target image into the feature extraction sub-model to obtain image features corresponding to the target image;

[0121] Inputting the image features into the layer extraction sub-model corresponding to each of the layers to obtain the layer features corresponding to each of the layers;

[0122] The extraction module also includes:

[0123] The first processing submodule is used to upsample the layer image corresponding to each layer based on the upsampling submodel to obtain a new layer image.

[0124] Optionally, the layer extraction model is constructed by training a module in the following manner, and the training module includes:

[0125] An acquisition submodule, used to acquire basic training images under the multiple layers;

[0126] The second processing submodule is used to obtain a basic training image as a target training image under different layers, and to perform image superposition on the obtained target training image to obtain a training image;

[0127] The training submodule is used to take the training image as the input of the model and the target training image corresponding to the training image as the target output, determine the target loss of the layer extraction model, and train the layer extraction model based on the target loss.

[0128] Optionally, the layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models and an upsampling sub-model;

[0129] The training submodule includes:

[0130] A second determination submodule is used to determine, for each of the layers, a layer loss corresponding to the layer extraction submodel based on a layer image output by the layer extraction submodel corresponding to the layer and a target training image of the training image under the layer, and determine the layer loss as a target loss corresponding to the layer extraction submodel;

[0131] A third determination submodule is used to determine, for each of the layers, a prediction loss corresponding to the layer based on a layer image corresponding to the layer output by the upsampling submodel and a target training image of the training image under the layer, and to determine a target loss corresponding to the upsampling submodel by summing the prediction losses;

[0132] The fourth determination submodule is used to determine the sum of the target loss corresponding to each of the layer extraction submodels and the target loss corresponding to the upsampling submodel as the target loss corresponding to the feature extraction submodel.

[0133] Optionally, the layer includes a certificate layer and a watermark layer, and the text information corresponding to the layer image of the watermark layer is the watermark information;

[0134] The device also includes:

[0135] A first verification module, used to perform verification according to the watermark information to obtain an authenticity verification result of the target image;

[0136] The generation module comprises:

[0137] The second generating submodule is used to extract information from the text information corresponding to the layer image of the certificate layer as the target verification information corresponding to the target image when the authenticity verification result is true.

[0138] Optionally, the first verification module is further used for:

[0139] If the watermark information does not meet the target condition, determining that the authenticity verification result of the target image is true;

[0140] The target condition includes at least one of the following:

[0141] The watermark information is website information;

[0142] The quantity of the watermark information exceeds the quantity threshold, and the distance between adjacent watermark information in the plurality of watermark information is within a first range, and the inclination angles corresponding to the plurality of watermark information are within a second range.

[0143] Optionally, the layer includes a certificate layer and a seal layer, and the text information corresponding to the layer image of the seal layer is the seal information;

[0144] The device also includes:

[0145] A second verification module, used to verify the seal information and the text information corresponding to the target image to obtain the authenticity verification result of the target image;

[0146] The generating module comprises:

[0147] The third generating submodule is used to extract information from the text information corresponding to the layer image of the certificate layer as the target verification information corresponding to the target image when the authenticity verification result is true.

[0148] Reference below Fig. 9 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0149] like Fig. 9 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0150] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0151] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0152] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. 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 of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0153] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0154] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0155] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives a target image; performs layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers; performs text recognition on each of the layer images to obtain text information corresponding to the layer image; and generates target verification information corresponding to the target image based on the text information corresponding to the layer image.

[0156] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0157] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0158] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a receiving module may also be described as a "module for receiving a target image".

[0159] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0160] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0161] According to one or more embodiments of the present disclosure, Example 1 provides an image processing method, wherein the method includes:

[0162] receiving a target image;

[0163] Performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers;

[0164] Performing text recognition on each of the layer images to obtain text information corresponding to the layer images;

[0165] According to the text information corresponding to the layer image, target verification information corresponding to the target image is generated.

[0166] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the step of extracting layers from the target image to obtain layer images corresponding to the target image under multiple layers includes:

[0167] Determining a layer feature corresponding to each of the layers according to the target image and the layer extraction model, wherein each of the layers corresponds to a layer extraction sub-model in the layer extraction model;

[0168] A layer image corresponding to each layer is generated according to the target image and the layer features corresponding to each layer.

[0169] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models, and an upsampling sub-model;

[0170] Determining the layer features corresponding to each layer according to the target image and the layer extraction model includes:

[0171] Inputting the target image into the feature extraction sub-model to obtain image features corresponding to the target image;

[0172] Inputting the image features into the layer extraction sub-model corresponding to each of the layers to obtain the layer features corresponding to each of the layers;

[0173] The layer extraction of the target image to obtain layer images corresponding to the target image under multiple layers also includes:

[0174] The layer image corresponding to each layer is upsampled based on the upsampling sub-model to obtain a new layer image.

[0175] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein the layer extraction model is constructed in the following manner:

[0176] Obtaining basic training images under the multiple layers;

[0177] A basic training image is obtained under different layers as a target training image, and the obtained target training image is superimposed to obtain a training image;

[0178] The training image is used as an input of a model, and a target training image corresponding to the training image is used as a target output, a target loss of the layer extraction model is determined, and the layer extraction model is trained based on the target loss.

[0179] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein the layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models, and an upsampling sub-model;

[0180] The step of using the training image as an input of a model and using a target training image corresponding to the training image as a target output to determine a target loss of the layer extraction model includes:

[0181] For each of the layers, based on the layer image output by the layer extraction sub-model corresponding to the layer and the target training image of the training image under the layer, determine the layer loss corresponding to the layer extraction sub-model, and determine the layer loss as the target loss corresponding to the layer extraction sub-model;

[0182] For each of the layers, based on the layer image corresponding to the layer output by the upsampling sub-model and the target training image of the training image under the layer, determine the prediction loss corresponding to the layer, and determine the target loss corresponding to the upsampling sub-model by summing the prediction losses;

[0183] The sum of the target loss corresponding to each of the layer extraction sub-models and the target loss corresponding to the upsampling sub-model is determined as the target loss corresponding to the feature extraction sub-model.

[0184] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the layer includes a document layer and a watermark layer, and the text information corresponding to the layer image of the watermark layer is the watermark information;

[0185] The method further comprises:

[0186] Performing verification according to the watermark information to obtain an authenticity verification result of the target image;

[0187] The step of generating target verification information corresponding to the target image according to the text information corresponding to the layer image includes:

[0188] When the authenticity verification result is true, information obtained by extracting text information corresponding to the layer image of the certificate layer is used as target verification information corresponding to the target image.

[0189] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein the verifying according to the watermark information to obtain the authenticity verification result of the target image includes:

[0190] If the watermark information does not meet the target condition, determining that the authenticity verification result of the target image is true;

[0191] The target condition includes at least one of the following:

[0192] The watermark information is website information;

[0193] The quantity of the watermark information exceeds the quantity threshold, and the distance between adjacent watermark information in the plurality of watermark information is within a first range, and the inclination angles corresponding to the plurality of watermark information are within a second range.

[0194] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 1, wherein the layer includes a certificate layer and a seal layer, and the text information corresponding to the layer image of the seal layer is the seal information;

[0195] The method further comprises:

[0196] Verifying the seal information and the text information corresponding to the target image to obtain an authenticity verification result of the target image;

[0197] The step of generating target verification information corresponding to the target image according to the text information corresponding to the layer image includes:

[0198] When the authenticity verification result is true, information obtained by extracting text information corresponding to the layer image of the certificate layer is used as target verification information corresponding to the target image.

[0199] According to one or more embodiments of the present disclosure, Example 9 provides an image processing device, the device comprising:

[0200] A receiving module, used for receiving a target image;

[0201] An extraction module, used for performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers;

[0202] A recognition module, used for performing text recognition on each of the layer images to obtain text information corresponding to the layer images;

[0203] The generating module is used to generate the target verification information corresponding to the target image according to the text information corresponding to the layer image.

[0204] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processing device, the steps of the method described in any one of Examples 1-8 are implemented.

[0205] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, including:

[0206] a storage device having a computer program stored thereon;

[0207] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-8.

[0208] According to one or more embodiments of the present disclosure, Example 12 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-8 when executed by a processor.

[0209] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0210] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0211] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. An image processing method, characterized in that: The method comprises: receiving a target image; Performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers; Performing text recognition on each of the layer images to obtain text information corresponding to the layer images; According to the text information corresponding to the layer image, target verification information corresponding to the target image is generated.

2. The method according to claim 1, characterized in that The step of extracting layers from the target image to obtain layer images corresponding to the target image under multiple layers includes: Determining a layer feature corresponding to each of the layers according to the target image and the layer extraction model, wherein each of the layers corresponds to a layer extraction sub-model in the layer extraction model; A layer image corresponding to each layer is generated according to the target image and the layer features corresponding to each layer.

3. The method according to claim 2, characterized in that The layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models and an upsampling sub-model; Determining the layer features corresponding to each layer according to the target image and the layer extraction model includes: Inputting the target image into the feature extraction sub-model to obtain image features corresponding to the target image; Inputting the image features into the layer extraction sub-model corresponding to each of the layers to obtain the layer features corresponding to each of the layers; The layer extraction of the target image to obtain layer images corresponding to the target image under multiple layers also includes: The layer image corresponding to each of the layers is upsampled based on the upsampling sub-model to obtain a new layer image.

4. The method according to claim 2, characterized in that: The layer extraction model is constructed in the following way: Obtaining basic training images under the multiple layers; A basic training image is obtained under different layers as a target training image, and the obtained target training image is superimposed to obtain a training image; The training image is used as an input of a model, and a target training image corresponding to the training image is used as a target output, a target loss of the layer extraction model is determined, and the layer extraction model is trained based on the target loss.

5. The method according to claim 4, characterized in that The layer extraction model includes a feature extraction sub-model, a plurality of layer extraction sub-models and an upsampling sub-model; The step of using the training image as an input of a model and using a target training image corresponding to the training image as a target output to determine a target loss of the layer extraction model includes: For each of the layers, based on the layer image output by the layer extraction sub-model corresponding to the layer and the target training image of the training image under the layer, determine the layer loss corresponding to the layer extraction sub-model, and determine the layer loss as the target loss corresponding to the layer extraction sub-model; For each of the layers, based on the layer image corresponding to the layer output by the upsampling sub-model and the target training image of the training image under the layer, determine the prediction loss corresponding to the layer, and determine the target loss corresponding to the upsampling sub-model by summing the prediction losses; The sum of the target loss corresponding to each of the layer extraction sub-models and the target loss corresponding to the upsampling sub-model is determined as the target loss corresponding to the feature extraction sub-model.

6. The method according to claim 1, characterized in that The layers include a certificate layer and a watermark layer, and the text information corresponding to the layer image of the watermark layer is the watermark information; The method further comprises: Performing verification according to the watermark information to obtain an authenticity verification result of the target image; The step of generating target verification information corresponding to the target image according to the text information corresponding to the layer image includes: When the authenticity verification result is true, information obtained by extracting text information corresponding to the layer image of the certificate layer is used as target verification information corresponding to the target image.

7. The method according to claim 6, characterized in that The verifying according to the watermark information to obtain the authenticity verification result of the target image includes: If the watermark information does not meet the target condition, determining that the authenticity verification result of the target image is true; The target condition includes at least one of the following: The watermark information is website information; The quantity of the watermark information exceeds the quantity threshold, and the distance between adjacent watermark information in the plurality of watermark information is within a first range, and the inclination angles corresponding to the plurality of watermark information are within a second range.

8. The method according to claim 1, characterized in that The layers include a certificate layer and a seal layer, and the text information corresponding to the layer image of the seal layer is the seal information; The method further comprises: Verifying the seal information and the text information corresponding to the target image to obtain an authenticity verification result of the target image; The step of generating target verification information corresponding to the target image according to the text information corresponding to the layer image includes: When the authenticity verification result is true, information obtained by extracting text information corresponding to the layer image of the certificate layer is used as target verification information corresponding to the target image.

9. An image processing device, characterized in that: The device comprises: A receiving module, used for receiving a target image; An extraction module, used for performing layer extraction on the target image to obtain layer images corresponding to the target image under multiple layers; A recognition module, used for performing text recognition on each of the layer images to obtain text information corresponding to the layer images; The generating module is used to generate the target verification information corresponding to the target image according to the text information corresponding to the layer image.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.