Disclosure of Invention
The application provides a method, a device, electronic equipment and a storage medium for verifying a credential file, which at least solve the technical problem of low efficiency of verifying the credential file in the prior art.
According to an aspect of an embodiment of the present application, there is provided a method for verifying a credential file, including: acquiring an image to be processed, wherein the image to be processed is an image of a target credential file; processing the image to be processed through a voucher identification model to obtain a target voucher type corresponding to the target voucher file and target key element information corresponding to the target voucher file, wherein the voucher identification model is a neural network model trained according to the voucher type and the voucher file corresponding to the key element information; determining target verification conditions corresponding to the target credential file from N verification conditions according to the target credential type, wherein each verification condition characterizes a verification mode of the credential file of one credential type, and N is a positive integer; detecting whether the target key element information meets a target verification condition; under the condition that the target key element information meets the target verification condition, determining the target credential file as a normal credential file; and under the condition that the target key element information does not meet the target verification condition, determining the target credential file as an abnormal credential file.
Optionally, the method for verifying the credential file further comprises: identifying a voucher pattern corresponding to the target voucher file according to the image to be processed through a first model branch of the voucher identification model, wherein the voucher pattern at least comprises the shape and the size of the target voucher file; determining a target credential class corresponding to the target credential file according to the credential style; image segmentation is carried out on the image to be processed according to the target credential type corresponding to the target credential file through a second model branch of the credential identification model, so that X sub-images corresponding to the image to be processed are obtained, wherein target key element information is recorded in the X sub-images, and X is a positive integer; target key element information is extracted based on the X sub-images.
Optionally, the method for verifying the credential file further comprises: determining target element extraction rules corresponding to target document according to N element extraction rules of the target document type, wherein each element extraction rule is used for representing the position of key element information corresponding to the document file of one document type in the document file; determining the specific position of the target key element information from the X sub-images according to the target element extraction rule; and extracting text information positioned at specific positions in the X sub-images to obtain target key element information.
Optionally, the target key element information includes at least one of: a target credential verification code, target transaction information, target credential information, and associated credential numbers.
Optionally, the method for verifying the credential file further comprises: under the condition that the target key element information comprises a target credential verification code, detecting whether the target credential verification code meets a first sub-verification condition under a target verification condition, wherein the first sub-verification condition is used for verifying the authenticity of the target credential verification code; under the condition that target key element information comprises target transaction information, detecting whether the target transaction information meets a second sub-verification condition under a target verification condition, wherein the second sub-verification condition is used for verifying the authenticity of the target transaction information; detecting whether the target certification material meets a third sub-verification condition under the target verification condition under the condition that the target key element information comprises the target certification material, wherein the third sub-verification condition is used for verifying the authenticity of the target certification material; under the condition that the target key element information comprises the association voucher number, detecting whether an association voucher file corresponding to the association voucher number meets a fourth sub-verification condition under a target verification condition, wherein the fourth sub-verification condition is used for verifying the authenticity of the association voucher file; under the condition that the target key element information simultaneously meets the first sub-verification condition, the second sub-verification condition, the third sub-verification condition and the fourth sub-verification condition, determining that the target key element information meets the target verification condition; and determining that the target key element information does not meet the target verification condition when the target key element information does not meet any one of the first sub-verification condition, the second sub-verification condition, the third sub-verification condition and the fourth sub-verification condition.
Optionally, the method for verifying the credential file further comprises: uploading the target credential verification code to a first system, wherein the first system is used for generating credential verification codes corresponding to credential files of various credential types; receiving first check information returned by the first system according to the target credential verification code, wherein the first check information is used for representing whether the first system generates the target credential verification code; under the condition that the first system does not generate the target credential verification code, determining that the target credential verification code does not meet a first sub-verification condition; and under the condition that the first system generates the target credential verification code, determining that the target credential verification code meets the first sub-verification condition.
Optionally, the method for verifying the credential file further comprises: uploading the target transaction information to a second system, wherein the second system is used for managing all historical transaction information and transaction information being processed; receiving second check information returned by the second system according to the target transaction information, wherein the second check information is used for representing whether the target transaction information is recorded in the second system; under the condition that the target transaction information is not recorded in the second system, determining that the target transaction information does not meet a second sub-verification condition; and under the condition that the target transaction information is recorded in the second system, determining that the target transaction information meets the second sub-verification condition.
Optionally, the method for verifying the credential file further comprises: uploading the target certification material to a third system, wherein the third system is used for managing the certification material corresponding to the certification files of various certification categories; receiving third check information returned by the third system according to the target certification information, wherein the third check information is used for representing whether the target certification information is recorded in the third system; in the case where the target certification material is not recorded in the third system, determining that the target certification material does not satisfy the third sub-verification condition; in the case where the target certification material is recorded in the third system, it is determined that the target certification material satisfies the third sub-verification condition.
Optionally, the method for verifying the credential file further comprises: inquiring the associated credential file through a credential file management system to obtain an inquiry result, wherein the credential file management system is used for storing all credential files which are successfully verified or failed to verify; under the condition that the inquiry result characterizes that the associated credential file is not inquired by the credential file management system or the associated credential file is inquired as the credential file with verification failure, determining that the associated credential file does not meet a fourth sub-verification condition; and under the condition that the inquiry result characterizes the certificate file management system to inquire that the associated certificate file is the certificate file which is successfully verified, determining that the associated certificate file meets a fourth sub-verification condition.
According to another aspect of the present application, there is also provided a device for verifying a document file, wherein the device for verifying a document file includes: the acquisition unit is used for acquiring an image to be processed, wherein the image to be processed is an image of a target credential file; the processing unit is used for processing the image to be processed through a voucher identification model to obtain a target voucher type corresponding to the target voucher file and target key element information corresponding to the target voucher file, wherein the voucher identification model is a neural network model obtained through training according to the known voucher type and the voucher file corresponding to the key element information; the first determining unit is used for determining target verification conditions corresponding to the target credential file from N verification conditions according to the target credential type, wherein each verification condition represents a verification mode of the credential file of one credential type, and N is a positive integer; the detection unit is used for detecting whether the target key element information meets the target verification condition; the second determining unit is used for determining that the target credential file is a normal credential file under the condition that the target key element information meets the target verification condition; and a third determining unit for determining that the target document file is an abnormal document file in the case where the target key element information does not satisfy the target verification condition.
According to another aspect of the present application, there is also provided a computer readable storage medium, in which a computer program is stored, and when the computer program is executed, a device in which the computer readable storage medium is located is controlled to execute the method for verifying the credential file of any one of the above.
According to another aspect of the present application, there is also provided an electronic device, wherein the electronic device includes one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for verifying a credential file of any of the above.
In the application, a mode of automatically identifying the voucher type and key element information of the target voucher file according to the image of the target voucher file is adopted, and an image to be processed is firstly obtained, wherein the image to be processed is the image of the target voucher file. And then, processing the image to be processed through a voucher identification model to obtain a target voucher type corresponding to the target voucher file and target key element information corresponding to the target voucher file, wherein the voucher identification model is a neural network model trained according to the voucher type and the voucher file corresponding to the key element information. Then, determining a target verification condition corresponding to the target credential file from N verification conditions according to the target credential type, and detecting whether target key element information meets the target verification condition, thereby determining that the target credential file is a normal credential file under the condition that the target key element information meets the target verification condition; and under the condition that the target key element information does not meet the target verification condition, determining the target credential file as an abnormal credential file. Each verification condition characterizes a verification mode of a certificate file of a certificate type, and N is a positive integer.
According to the method, the image to be processed corresponding to the target voucher file is identified, the target voucher type and the target key element information corresponding to the target voucher file are automatically predicted by the neural network model, and further the target verification condition corresponding to the target voucher file is automatically determined to verify the target key element information, staff is not needed to participate in the whole process, verification efficiency is low, a large amount of labor cost can be saved, and therefore the technical problem that the voucher file verification efficiency is low in the prior art is solved.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The application is further illustrated below in conjunction with the examples.
Example 1
In accordance with an embodiment of the present application, there is provided an embodiment of a method of validating a credential file, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order other than that shown or described herein.
FIG. 1 is a flow chart of an alternative method of verifying a credential file, as shown in FIG. 1, according to an embodiment of the application, the method comprising the steps of:
Step S101, acquiring an image to be processed.
In step S101, the image to be processed is an image of the target document file.
In an alternative embodiment, a credential file management system may be the subject of the method of verifying a credential file in this embodiment. The credential file management system can be a software system or an embedded system combining software and hardware, and is used for storing all credential files which are successfully verified or failed to be verified.
Alternatively, the document file may be a document for recording financial activities of a financial institution such as a bank, and in the present application, the document file generally refers to an important financial service document such as a deposit slip, a passbook, a check, etc. The target document file is a document file that needs to be verified, for example, a document file that needs to be checked by a financial institution.
Step S102, the image to be processed is processed through the voucher identification model, and the target voucher type corresponding to the target voucher file and the target key element information corresponding to the target voucher file are obtained.
In step S102, the credential identification model is a neural network model trained according to the known credential types and the credential files corresponding to the key element information.
Optionally, in order to train to obtain the credential identification model, a sufficient number of credential files need to be prepared in advance as training samples, where a tag corresponding to each credential file is used to characterize the credential category and key element information corresponding to the credential file. And then, inputting each voucher file and the label corresponding to each voucher file into a deep learning network, and obtaining a voucher identification model after repeated iterative training.
And finally, inputting the target voucher file to be verified into the voucher identification model by utilizing the voucher identification model obtained through training, and obtaining the target voucher type corresponding to the target voucher file and the target key element information corresponding to the target voucher file output by the voucher identification model.
It should be noted that, the certificate type is used to distinguish whether the certificate file is a business handling certificate file, a bank accounting certificate file, or an audit checking certificate file, and the bank accounting certificate can be further divided into an important certificate and a common certificate, where the important certificate mainly refers to a bill used in a financial activity, for example, a bankbook, etc. all belong to the important certificate. The general certificates mainly refer to the certificates serving as process records in financial activities, for example, the certificates such as general machine typing certificates, business handling result certificates and the like belong to the general certificates.
In addition, key element information of the document file relates to the document category of the document file, for example, key element information of the passbook includes, but is not limited to: element information such as deposit amount, deposit date, interest rate, deposit type, anti-counterfeiting mark and the like. Key element information of the business transaction result voucher includes, but is not limited to: element information such as business content, business time, business personnel and the like.
Step S103, determining target verification conditions corresponding to the target credential file from the N verification conditions according to the target credential class.
In step S103, each verification condition characterizes a verification manner of the credential file of one credential class, and N is a positive integer.
Optionally, the voucher file of each voucher category corresponds to a target verification condition, e.g. a passbook corresponds to target verification condition a, a check corresponds to target verification condition B, a ticket corresponds to target verification condition C, a cash note corresponds to target verification condition D, etc.
In addition, the target verification condition may further include a plurality of sub-verification conditions, each of which is used for verifying a part of key element information of the document file.
Step S104, detecting whether the target key element information meets the target verification condition.
Step S105, determining that the target document file is a normal document file in the case where the target key element information satisfies the target verification condition.
Alternatively, if the target key element information satisfies the target verification condition, it is indicated that all the target key element information is successfully verified, and thus, the credential file management system may determine that the target credential file is a normal credential file.
Step S106, when the target key element information does not meet the target verification condition, determining the target credential file as an abnormal credential file.
Optionally, if the target key element information fails to meet the target verification condition, the target key element information is indicated to fail to verify, and in order to ensure the fund security of the bank and the user, the voucher file management system determines that the target voucher file is an abnormal voucher file and generates corresponding prompt information.
Based on the content of the steps S101 to S106, in the present application, the image to be processed is first obtained by automatically identifying the document type and key element information of the target document according to the image of the target document, wherein the image to be processed is the image of the target document. And then, processing the image to be processed through a voucher identification model to obtain a target voucher type corresponding to the target voucher file and target key element information corresponding to the target voucher file, wherein the voucher identification model is a neural network model trained according to the voucher type and the voucher file corresponding to the key element information. Then, determining a target verification condition corresponding to the target credential file from N verification conditions according to the target credential type, and detecting whether target key element information meets the target verification condition, thereby determining that the target credential file is a normal credential file under the condition that the target key element information meets the target verification condition; and under the condition that the target key element information does not meet the target verification condition, determining the target credential file as an abnormal credential file. Each verification condition characterizes a verification mode of a certificate file of a certificate type, and N is a positive integer.
According to the method, the image to be processed corresponding to the target voucher file is identified, the target voucher type and the target key element information corresponding to the target voucher file are automatically predicted by the neural network model, and further the target verification condition corresponding to the target voucher file is automatically determined to verify the target key element information, staff is not needed to participate in the whole process, verification efficiency is low, a large amount of labor cost can be saved, and therefore the technical problem that the voucher file verification efficiency is low in the prior art is solved.
In an alternative embodiment, the credential file management system may identify, by a first model branch of the credential identification model, a credential style corresponding to the target credential file according to the image to be processed, where the credential style includes at least a shape and a size of the target credential file. Then, the voucher file management system determines a target voucher type corresponding to the target voucher file according to the voucher pattern.
In addition, the voucher file management system can also carry out image segmentation on the image to be processed according to the target voucher type corresponding to the target voucher file through a second model branch of the voucher identification model to obtain X sub-images corresponding to the image to be processed, wherein the target key element information is recorded in the X sub-images, and X is a positive integer. Then, the voucher file management system extracts target key element information based on the X sub-images.
Alternatively, the document of each document category will typically have a relatively fixed document style, e.g., a passbook having a rectangular shape and 15cm x 10cm in size; the check is rectangular in shape and 10cm by 5cm in size. Further, in addition to differentiating the credential types according to the credential style, since the credential number rule corresponding to the credential file of each credential type is also generally different, the credential types may also be differentiated according to the credential number.
In addition, after determining the target credential type corresponding to the target credential file, the credential file management system may determine an image cutting template corresponding to the target credential type from the image cutting recognition template library through the first model branch, and then, the first model branch performs image segmentation on the image to be processed according to the image cutting template to obtain X sub-images corresponding to the image to be processed.
It should be noted that, the image cutting templates corresponding to the document files of different document types are also different, for example, the image cutting template corresponding to the passbook is taken as a template 1, the image cutting template corresponding to the money transfer form is taken as a template 2, and in addition, the application supports the adjustment of the image cutting templates in the image cutting recognition template library at any time.
In an alternative embodiment, fig. 2 shows an alternative flow chart for extracting target key element information according to an embodiment of the present application, as shown in fig. 2, including the following steps:
step S201, determining a target element extraction rule corresponding to the target document from N element extraction rules according to the target document category.
In step S201, each element extraction rule is used to characterize a location of key element information corresponding to a document of a document category in the document.
Step S202, determining the specific position of the target key element information from the X sub-images according to the target element extraction rule.
Step S203, extracting text information located at specific positions in the X sub-images to obtain target key element information.
Optionally, element extraction rules corresponding to the credential files of different credential categories are different. For example, assuming that the target document file is a passbook file, the image corresponding to the passbook file is cut into a sub-image A-1, a sub-image A-2 and a sub-image A-3 according to the image cutting template corresponding to the passbook file.
Further, according to the element extraction rule corresponding to the passbook file, it can be known that the time key element information corresponding to the passbook file is located at the upper left of the sub-image a-1, the amount key element information corresponding to the passbook file is located at the upper right of the sub-image a-2, and the interest rate key element information corresponding to the passbook file is located at the right middle position of the sub-image a-3. On the basis, the voucher file management system can extract time key element information, amount key element information and interest rate key element information corresponding to the passbook file respectively at the upper right of the sub-image A-2, the upper right of the sub-image A-2 and the middle position of the sub-image A-3 through OCR (optical character recognition) and other image text recognition technologies.
In an alternative embodiment, the target key element information includes at least one of: a target credential verification code, target transaction information, target credential information, and associated credential numbers.
Alternatively, for the above target key element information, the credential file management system may verify each target key element information separately by invoking different sub-verification conditions.
In an alternative embodiment, fig. 3 shows a flowchart for detecting whether the target key element information satisfies the target verification condition according to an embodiment of the present application, as shown in fig. 3, including the steps of:
in step S301, in the case that the target key element information includes the target credential verification code, it is detected whether the target credential verification code satisfies the first sub-verification condition under the target verification condition.
In step S301, a first sub-verification condition is used to verify the authenticity of the target credential verification code.
In step S302, in the case where the target transaction information is included in the target key element information, it is detected whether the target transaction information satisfies the second sub-verification condition under the target verification condition.
In step S302, the second sub-verification condition is used to verify the authenticity of the target transaction information.
In step S303, in the case where the target key element information includes the target certification material, it is detected whether or not the target certification material satisfies the third sub-verification condition under the target verification condition.
In step S303, the third sub-verification condition is used to verify the authenticity of the target certification material.
Step S304, detecting whether the associated certificate file corresponding to the associated certificate number meets the fourth sub-verification condition under the target verification condition or not under the condition that the associated certificate number is included in the target key element information.
In step S304, the fourth sub-verification condition is used to verify the authenticity of the associated credential file.
Step S305, determining that the target key element information satisfies the target verification condition when the target key element information satisfies the first sub-verification condition, the second sub-verification condition, the third sub-verification condition, and the fourth sub-verification condition simultaneously;
in step S306, in the case where the target key element information does not satisfy any one of the first sub-verification condition, the second sub-verification condition, the third sub-verification condition, and the fourth sub-verification condition, it is determined that the target key element information does not satisfy the target verification condition.
Specifically, in the step S301, the credential file management system may upload the target credential verification code to the first system, where the first system is configured to generate credential verification codes corresponding to the credential files of various credential types. And then, the voucher file management system receives first check information returned by the first system according to the target voucher verification code, wherein the first check information is used for representing whether the first system generates the target voucher verification code or not. Finally, under the condition that the first system does not generate the target credential verification code, the credential file management system determines that the target credential verification code does not meet the first sub-verification condition; under the condition that the first system generates the target credential verification code, the credential file management system determines that the target credential verification code meets a first sub-verification condition.
Optionally, the target credential verification code may be a seal code or a seal verification code on the target credential file, and the first system may be an electronic seal management system. By uploading the seal code or seal verification code on the target voucher file to the electronic seal management system, the electronic seal management system can be used for verifying whether the seal code or seal verification code on the target voucher file is a forged seal code or seal verification code, namely verifying the authenticity of the target voucher verification code.
Specifically, in the above step S302, the credential file management system uploads the target transaction information to the second system, where the second system is used to manage all the historical transaction information and the transaction information being processed. And then, the voucher file management system receives second check information returned by the second system according to the target transaction information, wherein the second check information is used for representing whether the target transaction information is recorded in the second system. Finally, under the condition that the target transaction information is not recorded in the second system, the voucher file management system determines that the target transaction information does not meet the second sub-verification condition; and under the condition that the target transaction information is recorded in the second system, the voucher file management system determines that the target transaction information meets the second sub-verification condition.
Alternatively, the second system may be a transaction information management system. For example, assuming that the target document file is a money transfer form which has been checked out, in order to check the authenticity of the money transfer form, the document file management system will upload the transaction information on the money transfer form into the transaction information management system, if the transaction information management system can inquire the transaction information on the money transfer form and the transaction information verification is correct, the document file management system determines that the transaction information on the money transfer form is actually present, and if the transaction information management system cannot inquire the transaction information on the money transfer form or the transaction information verification is incorrect, the document file management system determines that the transaction information in the money transfer form is counterfeit transaction information.
In addition, in the above step S303, the credential file management system uploads the target credential to a third system for managing the credentials corresponding to the credential files of the various credential categories. And then, the voucher file management system receives third check information returned by the third system according to the target evidence, wherein the third check information is used for representing whether the target evidence is recorded in the third system. Finally, under the condition that the target certification material is not recorded in the third system, the certification document management system determines that the target certification material does not meet a third sub-verification condition; in the case where the target certification material is recorded in the third system, the certification document management system determines that the target certification material satisfies the third sub-verification condition.
For example, assuming that the target document is a loan contract document, wherein the loan contract document includes proof information of a mortgage of a loan (e.g., a property certificate of a mortgage real estate), in order to verify the validity of the loan contract document, the document management system may upload property certificate information of the mortgage real estate to the real estate information management system (corresponding to the third system), and if the property information of the mortgage real estate is recorded in the real estate information management system, it is indicated that the mortgage real estate is a real estate, and the proof information of the mortgage of the loan in the loan contract document is real and valid. If the property information of the mortgage property is not recorded in the property information management system, the fact that the mortgage property is not a real existing property is indicated, and the certification information of the loan mortgage in the loan contract file is forged.
In addition, in the step S304, the associated credential file is queried through the credential file management system to obtain a query result, where the credential file management system is configured to store all credential files that are successfully verified or failed to be verified. When the inquiry result indicates that the associated credential file is not inquired by the credential file management system or the associated credential file is inquired as the credential file with verification failure, the credential file management system determines that the associated credential file does not meet a fourth sub-verification condition; and under the condition that the inquiry result characterizes the certificate file management system to inquire that the associated certificate file is the certificate file which is successfully verified, the certificate file management system determines that the associated certificate file meets a fourth sub-verification condition.
For example, assume that the target voucher file is a cash note B-1, wherein the voucher file management system determines that the associated voucher file of the cash note B-1 is a deposit note C-1 through the associated voucher number in the cash note B-1, and when the cash note B-1 is verified, the voucher file management system queries whether the deposit note C-1 is a successfully verified voucher file, and if the voucher file management system does not query the deposit note C-1 or queries that the deposit note C-1 is a deposit note with verification failure, the voucher file management system determines that the cash note B-1 is abnormal. If the voucher file management system inquires that the deposit bill C-1 is a successfully verified voucher file, the voucher file management system can determine that the deposit bill C-1 meets a fourth sub-verification condition, namely, the deposit bill C-1 is a true and effective associated voucher file.
In an alternative embodiment, fig. 4 shows a schematic diagram of a credential file management system according to an embodiment of the present application, as shown in fig. 4, firstly, the credential file management system collects an image (i.e. an image to be processed) of a target credential file through a client carrying an image collecting device, then the credential file management system identifies a target credential type corresponding to the target credential file and a plurality of target key element information, and performs anti-counterfeit verification on each target key element information respectively in combination with a preset sub-verification condition corresponding to each target key element information, where the anti-counterfeit verification process may be implemented by a third party system, for example, a transaction information management system, an electronic seal management system, and the like. And finally, the certificate file management system sends the anti-counterfeiting verification result of each target key element information to the client for display.
According to the method, the image to be processed corresponding to the target voucher file is identified, the target voucher type and the target key element information corresponding to the target voucher file are automatically predicted by the neural network model, and further the target verification condition corresponding to the target voucher file is automatically determined to verify the target key element information, staff is not needed to participate in the whole process, verification efficiency is low, a large amount of labor cost can be saved, and therefore the technical problem that the voucher file verification efficiency is low in the prior art is solved.
Example 2
The present embodiment provides an optional credential file verification apparatus, each implementation unit in the credential file verification apparatus corresponding to each implementation step in embodiment 1.
FIG. 5 is a schematic diagram of an alternate credential file verification device provided in accordance with an embodiment of the present application, as shown in FIG. 5, comprising: an acquisition unit 501, a processing unit 502, a first determination unit 503, a detection unit 504, a second determination unit 505, and a third determination unit 506.
Specifically, an obtaining unit 501 is configured to obtain an image to be processed, where the image to be processed is an image of a target credential file; the processing unit 502 is configured to process an image to be processed through a credential identification model to obtain a target credential type corresponding to a target credential file and target key element information corresponding to the target credential file, where the credential identification model is a neural network model obtained by training the credential file according to a known credential type and the corresponding key element information; a first determining unit 503, configured to determine, according to a target credential type, a target verification condition corresponding to a target credential file from N verification conditions, where each verification condition characterizes a verification manner of the credential file of one credential type, and N is a positive integer; a detecting unit 504, configured to detect whether the target key element information meets a target verification condition; a second determining unit 505, configured to determine that the target credential file is a normal credential file if the target key element information satisfies the target verification condition; and a third determining unit 506, configured to determine that the target credential file is an abnormal credential file if the target key element information does not satisfy the target verification condition.
Optionally, the processing unit comprises: the image processing device comprises an identification subunit, a first determination subunit, an image segmentation subunit and an extraction subunit. The identification subunit is used for identifying a voucher pattern corresponding to the target voucher file according to the image to be processed through a first model branch of the voucher identification model, wherein the voucher pattern at least comprises the shape and the size of the target voucher file; a first determining subunit, configured to determine a target credential class corresponding to the target credential file according to the credential style; the image segmentation subunit is used for carrying out image segmentation on the image to be processed according to the target credential type corresponding to the target credential file through a second model branch of the credential identification model to obtain X sub-images corresponding to the image to be processed, wherein the target key element information is recorded in the X sub-images, and X is a positive integer; and an extraction subunit for extracting the target key element information based on the X sub-images.
Optionally, the extraction subunit comprises: the device comprises a first determining module, a second determining module and an extracting module. The first determining module is used for determining target element extraction rules corresponding to the target document from N element extraction rules according to the target document types, wherein each element extraction rule is used for representing the position of key element information corresponding to the document file of one document type in the document file; the second determining module is used for determining the specific position of the target key element information from the X sub-images according to the target element extraction rule; and the extraction module is used for extracting text information positioned at specific positions in the X sub-images to obtain target key element information.
Optionally, the target key element information includes at least one of: a target credential verification code, target transaction information, target credential information, and associated credential numbers.
Optionally, the detection unit includes: the first detection subunit, the second detection subunit, the third detection subunit, the fourth detection subunit, the second determination subunit, and the third determination subunit. The first detection subunit is configured to detect, when the target key element information includes the target credential verification code, whether the target credential verification code meets a first sub-verification condition under a target verification condition, where the first sub-verification condition is used to verify authenticity of the target credential verification code; a second detection subunit, configured to detect, if the target key element information includes the target transaction information, whether the target transaction information meets a second sub-verification condition under a target verification condition, where the second sub-verification condition is used to verify authenticity of the target transaction information; a third detection subunit configured to detect, if the target key element information includes the target certification material, whether the target certification material meets a third sub-verification condition under a target verification condition, where the third sub-verification condition is used to verify authenticity of the target certification material; a fourth detection subunit, configured to detect, if the target key element information includes the association credential number, whether an association credential file corresponding to the association credential number meets a fourth sub-verification condition under a target verification condition, where the fourth sub-verification condition is used to verify authenticity of the association credential file; a second determining subunit configured to determine that the target key element information satisfies the target verification condition when the target key element information satisfies the first sub-verification condition, the second sub-verification condition, the third sub-verification condition, and the fourth sub-verification condition at the same time; and a third determining subunit configured to determine that the target key element information does not satisfy the target verification condition, if the target key element information does not satisfy any one of the first sub-verification condition, the second sub-verification condition, the third sub-verification condition, and the fourth sub-verification condition.
Optionally, the first detection subunit includes: the device comprises a first uploading module, a first receiving module, a third determining module and a fourth determining module. The first uploading module is used for uploading the target credential verification code to the first system, wherein the first system is used for generating credential verification codes corresponding to credential files of various credential types; the first receiving module is used for receiving first check information returned by the first system according to the target credential verification code, wherein the first check information is used for representing whether the first system generates the target credential verification code or not; the third determining module is used for determining that the target credential verification code does not meet the first sub-verification condition under the condition that the first system does not generate the target credential verification code; and the fourth determining module is used for determining that the target credential verification code meets the first sub-verification condition under the condition that the first system generates the target credential verification code.
Optionally, the second detection subunit comprises: the device comprises a second uploading module, a second receiving module, a fifth determining module and a sixth determining module. The second uploading module is used for uploading the target transaction information to a second system, wherein the second system is used for managing all historical transaction information and transaction information being processed; the second receiving module is used for receiving second check information returned by the second system according to the target transaction information, wherein the second check information is used for representing whether the target transaction information is recorded in the second system; a fifth determining module, configured to determine, when the target transaction information is not recorded in the second system, that the target transaction information does not meet the second sub-verification condition; and a sixth determining module, configured to determine that the target transaction information meets the second sub-verification condition when the target transaction information is recorded in the second system.
Optionally, the third detection subunit comprises: the device comprises a third uploading module, a third receiving module, a seventh determining module and an eighth determining module. The third uploading module is used for uploading the target certification materials to a third system, wherein the third system is used for managing the certification materials corresponding to the certification files of various certification types; the third receiving module is used for receiving third check information returned by the third system according to the target certification information, wherein the third check information is used for representing whether the target certification information is recorded in the third system; a seventh determining module, configured to determine that the target certification material does not satisfy the third sub-verification condition, in a case where the target certification material is not recorded in the third system; and an eighth determining module for determining that the target certification material satisfies the third sub-verification condition in the case where the target certification material is recorded in the third system.
Optionally, the fourth detection subunit comprises: the system comprises a first query module, a ninth determination module and a tenth determination module. The first inquiry module is used for inquiring the associated credential files through the credential file management system to obtain inquiry results, wherein the credential file management system is used for storing all credential files which are successfully verified or failed to verify; a ninth determining module, configured to determine that the associated credential file does not satisfy the fourth sub-verification condition when the query result indicates that the associated credential file is not queried by the credential file management system or the associated credential file is queried as a credential file with verification failure; and the tenth determining module is used for determining that the associated credential file meets the fourth sub-verification condition under the condition that the query result characterizes the credential file management system to query the associated credential file as the successfully verified credential file.
Example 3
According to another aspect of the embodiment of the present application, there is also provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, and when the computer program is executed, the device on which the computer readable storage medium is located is controlled to execute the method for verifying the credential file in embodiment 1.
Example 4
According to another aspect of the embodiment of the present application, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of verifying a credential file in embodiment 1 described above via execution of the executable instructions.
Fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, the embodiment of the present application provides an electronic device, where the electronic device includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor implements the method for verifying a credential file in embodiment 1 described above when executing the program.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.