Entity identification method, apparatus and device, and medium

By identifying the text slices and their location information in the international settlement collection letter, and using the UIE-X model to extract key content, the problem of low extraction accuracy in the existing technology is solved, and a more efficient and accurate audit process is achieved.

CN119888765APending Publication Date: 2025-04-25CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411963029.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The accuracy of the key contents extracted in the collection letter of international settlement in the prior art is low, resulting in the limitation of the review efficiency and accuracy of collection business.

Method used

By receiving the image of the international settlement collection letter, each text slice and its location information are identified, and input it into the pre-trained UIE-X model to obtain each key content contained in the international settlement collection letter and its corresponding entity category.

Benefits of technology

It improves the accuracy of identifying key contents in the collection letter of international settlement, reduces the cost and time of manual review, and improves the review efficiency and accuracy of collection business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888765A_ABST
    Figure CN119888765A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data processing, in particular to an entity recognition method and device, equipment and a medium. In the embodiment of the invention, the electronic equipment determines each character slice in the image for identifying the international settlement consignment surface letter and the position information of each character slice in the image, and fine character slice processing is carried out on the image, so that each character can be accurately segmented, confusion and misidentification among the characters are avoided, and the accuracy of recognition is improved. According to the method, each character slice and the position information of each character slice are processed on the basis of the trained UIE-X model, and the UIE-X model can more accurately understand the context relationship between characters, so that each key content and the entity category corresponding to the key content can be accurately identified in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to an entity recognition method, device, equipment and medium. Background Art

[0002] The International Settlement Collection Cover Letter is a written notice issued by the remitting bank to the collecting bank in accordance with the exporter's instructions to request the collection of loans. This document contains several key contents to ensure the smooth progress of the collection business.

[0003] For the review of international settlement collection letters, the key contents in the international settlement collection letters are usually identified and identified based on the extracted key contents. Currently, the commonly used key content extraction methods include: manual key content extraction and rule-based key content extraction. However, the extraction accuracy of related technologies is low. Summary of the invention

[0004] The embodiments of the present application provide an entity recognition method, apparatus, device and medium for solving the problem of low accuracy in extracting key content.

[0005] The present application provides an entity recognition method, the method comprising:

[0006] Receiving an image of an international settlement collection letter; identifying each character slice in the image and position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold;

[0007] Input each text slice and the location information of each text slice into a pre-trained Universal Information Extraction-X (UIE-X) model to obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

[0008] Furthermore, the identifying each text slice in the image and the position information of each text slice in the image includes:

[0009] Based on an optical character recognition (OCR) method, each text slice in the image and position information of each text slice in the image are recognized.

[0010] Furthermore, the method further comprises:

[0011] Determine an unrecognized entity category in each pre-stored target entity category; and identify text information composed of text slices where the keyword is located in the image according to the pre-stored keyword of the entity category to be recognized;

[0012] The text information and the location information of the text information are input into the UIE-X model, and the entity category to be identified and the corresponding key content in the international settlement collection cover letter output by the UIE-X model are obtained.

[0013] Further, the determining of the unrecognized entity categories to be identified in each pre-stored target entity category includes:

[0014] For each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, the target entity category is determined to be an unidentified entity category to be identified.

[0015] Furthermore, the identifying text information composed of text slices corresponding to the keyword in the image includes:

[0016] For each pre-saved direction, determine a target text slice whose distance between the direction and the position information of the keyword in the image is less than a threshold;

[0017] Each target text slice obtained is spliced ​​according to a preset reading order to obtain the composed text information.

[0018] Furthermore, the step of obtaining each key content contained in the international settlement collection cover letter output by the UIE-X model and the entity category corresponding to each key content includes:

[0019] The Schema of the UIE-X model obtains each key content and the corresponding entity category contained in the international settlement collection letter based on the pre-saved constraints corresponding to each entity category, and outputs them.

[0020] The present application also provides an entity recognition device, the device further comprising:

[0021] A receiving and identifying module is used to receive an image of an international settlement collection cover letter; identify each character slice in the image, and position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold;

[0022] The processing module is used to input each text slice and the position information of each text slice into the pre-trained UIE-X model, and obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

[0023] Furthermore, the receiving and identifying module is used to identify each text slice in the image and the position information of each text slice in the image based on an OCR recognition method.

[0024] Furthermore, the processing module is also used to determine the unrecognized entity categories to be identified in each pre-saved target entity category; identify the text information composed of the text slices where the keywords are located in the image according to the pre-saved keywords of the entity categories to be identified; input the text information and the location information of the text information into the UIE-X model, and obtain the entity categories to be identified and the corresponding key contents in the international settlement collection cover letter output by the UIE-X model.

[0025] Furthermore, the processing module is specifically configured to determine, for each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, that the target entity category is an unidentified entity category to be identified.

[0026] Furthermore, the processing module is specifically used to determine, for each pre-saved direction, a target text slice whose distance from the direction and the position information of the keyword in the image is less than a threshold; and splice each acquired target text slice according to a preset reading order to obtain composed text information.

[0027] Furthermore, the processing module, specifically used for the Schema of the UIE-X model, obtains each key content and corresponding entity category contained in the international settlement collection cover letter based on the pre-saved constraints corresponding to each entity category, and outputs them.

[0028] An embodiment of the present application further provides an electronic device, the electronic device comprising a processor, the processor being configured to implement the steps of any of the above-mentioned entity recognition methods when executing a computer program stored in a memory.

[0029] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned entity recognition methods are implemented.

[0030] An embodiment of the present application further provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute any of the steps of the above-mentioned entity recognition method.

[0031] Because in the embodiment of the present application, the electronic device determines and recognizes each text slice in the image of the international settlement collection letter, as well as the position information of each text slice in the image, and through fine text slicing processing of the image, it can ensure that each character is accurately segmented, avoiding confusion and misrecognition between characters, and based on the trained UIE-X model, each text slice and the position information of each text slice are processed. The UIE-X model can more accurately understand the contextual relationship between characters, so that each key content and the entity category corresponding to the key content can be accurately identified in the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of a process of an entity recognition method provided in an embodiment of the present application;

[0034] Figure 2 A detailed process diagram of entity recognition provided in an embodiment of the present application;

[0035] Figure 3 A schematic diagram of the structure of an entity identification device provided in an embodiment of the present application;

[0036] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0038] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0039] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0040] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0041] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0043] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope disclosed in the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0044] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.

[0045] Before introducing the entity recognition method provided in the embodiment of the present application, in order to facilitate understanding, the background technology of the embodiment of the present application is first introduced.

[0046] The international settlement collection letter is a written notice issued by the remitting bank to the collecting bank in accordance with the exporter's instructions to collect the loan. This document contains several key contents to ensure the smooth progress of the collection business.

[0047] For the review of international settlement collection letters, the key content in the international settlement collection letters is usually identified, and the recognition is performed based on the extracted key content. The commonly used key content extraction methods currently include: manual extraction of key content and rule-based extraction of key content. However, entity recognition based on manual review refers to the recognition and understanding of the important review content and elements of the collection letter by bank document review business personnel based on their learning experience in international settlement collection letter business and years of international settlement collection letter review experience. However, this method consumes a lot of manpower and time costs, is inefficient, and the training cycle for a document reviewer often exceeds three years. Entity recognition based on rule-based methods generally requires business document reviewers to summarize document review rules based on document review experience, summarize the common content forms of each entity label in the form of regular expressions, and after identifying the text information in the image, use regular rule matching to perform label entity recognition on the text information. However, the expression forms of various entity labels are difficult to exhaust with rules, so when the entity content expression forms are complex and changeable, the recognition accuracy of this method is not high. In other words, the accuracy of extraction in related technologies is low.

[0048] In view of this, the embodiments of the present application provide an entity recognition method, device, equipment and medium. The entity recognition method includes: an electronic device receives an image of an international settlement collection cover letter; identifies each text slice in the image, and the position information of each text slice in the image; wherein the distance between each two adjacent characters contained in any text slice does not exceed a preset distance threshold; each text slice and the position information of each text slice are input into a pre-trained UIE-X model, and each key content contained in the international settlement collection cover letter output by the UIE-X model and the entity category corresponding to each key content are obtained.

[0049] Embodiment 1:

[0050] Figure 1 A schematic diagram of a process of an entity recognition method provided in an embodiment of the present application, the process includes the following steps:

[0051] S101: receiving an image of an international settlement collection cover letter; identifying each text slice in the image and position information of each text slice in the image; wherein the distance between each two adjacent characters contained in any text slice does not exceed a preset distance threshold.

[0052] The entity recognition method provided in the embodiment of the present application is applied to an electronic device, which may be a smart device such as a PC or a server.

[0053] In order to identify the key content contained in the international settlement collection letter, the image of the international settlement collection letter can be first obtained and sent to the electronic device for identification. The electronic device identifies each text slice in the image, as well as the position information of each text slice in the image. In one possible implementation, the electronic device can locally store a pre-trained recognition model, and the electronic device inputs the image into the recognition model to obtain the output of the recognition model. The output of the recognition model is each text slice in the image, as well as the position information of each text slice in the image. It should be noted that the distance between each two adjacent characters contained in a certain text slice does not exceed the preset distance threshold.

[0054] Among them, the content of the text slice described in the embodiment of the present application may include relevant information such as the collecting bank, the collection bank, the invoice number, the collection bank association number, the remittance fee, the payer, the principal, the delivery date, the payment terms, etc. Moreover, the position information of the text slice can be used to characterize the position information of the corresponding text slice in the image. Among them, the text slice refers to a combination of multiple characters, and the position information of the text slice can be the position information of the upper left corner of the rectangular box where the text slice is located (the up, down, left, right, and right described here are the up, down, left, right, and right in the image) in the image, or it can be the position information of other preset points in the area where the text slice is located, or it can be the number of rows and columns of the first character in the text slice in the image according to the reading direction. For example: the coordinate information of the text slice can be expressed as (2, 3), where 2 is the number of rows in the image where the first character in the text slice is located, and 3 is the number of columns in the image where the first character in the text slice is located.

[0055] S102: Input each text slice and the location information of each text slice into a pre-trained UIE-X model, and obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

[0056] In order to identify each key content and the corresponding entity category, the electronic device locally stores a pre-trained UIE-X model. The electronic device can input each text slice and the location information of each text slice into the pre-trained UIE-X model. The UIE-X model can determine the key content corresponding to each entity category based on the element label of each entity category, where the element label of the entity category generally refers to a label that describes the characteristics, attributes and other information of a certain entity category. The electronic device can obtain the output of the UIE-X model, which is each key content contained in the international settlement collection letter and the entity category corresponding to each key content.

[0057] Table 1 is a schematic diagram of element labels and entity categories of some acquired entity categories provided in an embodiment of the present application:

[0058] Feature labels for entity categories Entity Class Collecting Bank Collecting Bank Remitting Bank Remitting Bank Invoice No Invoice Number Reference Number Remitting bank association number Amount Remittance Fees Drawee Payer Drawer Client Date Date of delivery Tensor Payment Terms

[0059] Table 1

[0060] Among them, Table 1 is a complete set of entity categories and element labels of entity categories defined by business personnel.

[0061] Among them, the international settlement collection letter usually includes the following key contents of the entity categories:

[0062] 1. Collecting bank information: the full name, address, and contact information (including telex, telephone and fax numbers, etc.) of the collecting bank. This information is used to ensure that the collecting bank can accurately communicate and contact the remitting bank.

[0063] 2. Information of the principal: the full name, address and contact information of the principal, so that the collecting bank can contact the exporter when necessary.

[0064] 3. Payer information: that is, the importer, its full name, address, contact information, etc.

[0065] 4. Collection amount and currency: clearly state the collection amount and the currency used to ensure that both parties have a clear understanding of the transaction amount.

[0066] 5. Fees and Interest: Explain the fees and interest that may be incurred during the collection process, and indicate whether these fees can be charged to the payee or whether they can be waived.

[0067] 6. Special instructions and requirements: If there are any special instructions or requirements, they should also be clearly listed in the collection letter.

[0068] 7. Other terms and conditions: Other necessary terms and conditions may also be included, such as payment deadline, whether installment payment or delivery is allowed, dispute resolution method, etc.

[0069] 8. Signature and Authorization: The collection letter should be signed by the exporter or its authorized representative and stamped with the company seal to prove its authenticity and validity.

[0070] It should be noted that the recognition of key content by supervised learning models based on a large number of labeled samples requires the collection of a large number of images of international settlement collection letters, and then the business personnel manually annotate the key content on the international settlement collection letters. After the annotation is completed, most of them are used as training sets, and a small part is used as test sets for training traditional deep learning models (such as BILSTM and TEXTCNN). However, the style of international settlement collection letters is not fixed, text and tables can be mixed, and the layout is free. When identifying the key content of international settlement collection letters, the BILSTM and TEXTCNN models do not take into account the layout of the international settlement collection letters and the coordinate information of the text box, and the recognition effect is not ideal. Before training, it often takes a lot of manpower to complete the annotation of massive samples. The UIE-X model is based on the Enhanced Representation through kNowledge IntEgration-Layout (ERNIE-Layout) pre-trained model. The UIE-X model innovatively introduces layout knowledge enhancement to meet the needs of multimodal document information extraction. The UIE-X model performs well in zero-sample and small-sample scenarios, reducing the dependence on labeled data. In addition, the UIE-X model realizes unified modeling of multiple tasks such as entity extraction, relationship extraction, and event extraction, improves the generalization and migration capabilities of the model, and provides strong support for cross-domain and cross-task information extraction. The UIE-X model does not require a large number of labeled samples as a basis. In the absence of sufficient labeled data for international settlement collection letters, zero-shot labeling is achieved, without the need for manual labeling, saving a lot of manpower and material resources.

[0071] Because in the embodiment of the present application, the electronic device determines and recognizes each text slice in the image of the international settlement collection letter, as well as the position information of each text slice in the image, and through fine text slicing processing of the image, it can ensure that each character is accurately segmented, avoiding confusion and misrecognition between characters, and based on the trained UIE-X model, each text slice and the position information of each text slice are processed. The UIE-X model can more accurately understand the contextual relationship between characters, so that each key content and the entity category corresponding to the key content can be accurately identified in the image.

[0072] Embodiment 2:

[0073] In order to improve the accuracy of entity recognition, based on the above embodiment, in the embodiment of the present application, the identifying of each text slice in the image and the position information of each text slice in the image includes:

[0074] Based on the OCR recognition method, each text slice in the image and the position information of each text slice in the image are recognized.

[0075] In order to improve the accuracy of entity recognition, the electronic device can recognize each text slice in the image and the position information of each text slice in the image based on the OCR recognition method. Specifically, how to recognize the text slice in the image and the position information of the text slice in the image based on the OCR recognition method is a prior art and will not be described in detail here.

[0076] In a possible implementation, in order to accurately and effectively determine the text slice and the position information of the text slice in the image, the electronic device may first pre-process the image, including denoising, contrast enhancement, brightness adjustment, etc., to improve the image quality and provide clear input for subsequent text recognition. In addition, the electronic device may also perform binarization processing on the image, converting the image into a black and white image to more clearly separate the text and background.

[0077] Assume that the image of the international settlement collection cover letter contains the name of the payee "ABC Bank", the name of the payee "XYZCorp" and the collection amount "$10,000". The electronic device can recognize that "ABC Bank" is a text slice, "XYZCorp" is a text slice and "$10,000" is a text slice.

[0078] Embodiment 3:

[0079] In order to improve the accuracy of entity category recognition, based on the above embodiments, in the embodiment of the present application, the method further includes:

[0080] Determine an unrecognized entity category in each pre-stored target entity category; and identify text information composed of text slices where the keyword is located in the image according to the pre-stored keyword of the entity category to be recognized;

[0081] The text information and the location information of the text information are input into the UIE-X model, and the entity category to be identified and the corresponding key content in the international settlement collection cover letter output by the UIE-X model are obtained.

[0082] Since the UIE-X model is based on each text slice and the position information of each text slice in the image, the identified key content may contain unrecognized key content of certain entity categories. In order to improve the accuracy of entity category recognition, the electronic device can determine the unrecognized entity category to be identified, and determine the key content of the unrecognized entity category to be identified based on the keywords of the unrecognized entity category to be identified.

[0083] Specifically, the electronic device pre-stores each target entity category, wherein the target entity category is the entity category corresponding to each key content actually contained in the international settlement collection cover letter. The electronic device can determine the unidentified entity category to be identified in each target entity category based on the identified entity category of each key content and each pre-stored target entity category.

[0084] Table 2 is a schematic diagram of the correspondence between some entity categories and keywords provided in the embodiment of the present application:

[0085]

[0086]

[0087] Table 2

[0088] As can be seen from Table 2, the keywords corresponding to the entity category "Collecting Bank" are "Collect From" and "TO", the keywords corresponding to the entity category "Collecting Bank Association Number" are "Reference Number", the keywords corresponding to the entity category "Principal" are "Drawer Name" and "Drawer", the keywords corresponding to the entity category "Payer" are "Drawee Name" and "Drawee", the keywords corresponding to the entity category "Collection Amount" are "Amount", the keywords corresponding to the entity category "Invoice Number" are "Invoice Number" and "INV No", and the keywords corresponding to the entity category "Payment Terms" are "Tenor", "Payment" and "Maturity".

[0089] In order to identify the key content of the entity category to be identified, the electronic device pre-stores the correspondence between the entity category and the keyword. The electronic device can obtain the keyword stored for the entity category to be identified, and identify the text slice containing the keyword in the image, and determine the text information composed of the content contained in the obtained text slice. In a possible implementation, the electronic device can input the keyword, each text slice, and the position information of each text slice in the image into a pre-trained model, obtain each text slice output by the pre-trained model, and the electronic device splices each text slice according to a preset splicing order to determine the composed text information, wherein each text slice can be a text slice whose distance from the keyword in the image is lower than a threshold.

[0090] The electronic device can input the acquired text information and the position information of the acquired text information in the image into the UIE-X model to obtain the entity category to be identified and the corresponding key content in the international settlement collection letter output by the UIE-X model. Among them, the position information of the acquired text information in the image can be the position information of the center point of the position information of each text slice corresponding to the keyword.

[0091] In the embodiment of the present application, the recognition accuracy of entity recognition is improved by flexibly combining model recognition and rule matching. Unlike general deep learning models, the method of relocating text information through keywords in the embodiment of the present application, combined with the location information and logical relationship of important review elements of the international settlement collection letter, solves the problem of non-fixed style and free layout of the international settlement collection letter.

[0092] Figure 2 A detailed process diagram of entity recognition provided in an embodiment of the present application, the process includes the following steps:

[0093] S201: Receive the image of the international settlement collection letter.

[0094] S202: Based on the OCR recognition method, identify each text slice in the image and the position information of each text slice in the image.

[0095] S203: Input each text slice and the position information of each text slice into the pre-trained UIE-X model.

[0096] S204: Obtain the first output result of the UIE-X model.

[0097] The first output result includes each key content included in the international settlement collection cover letter and the entity category corresponding to each key content.

[0098] S205: Determine whether there is an unrecognized entity category to be identified, if so, execute S206, if not, execute S207.

[0099] S206: Determine the unrecognized entity categories to be identified in each pre-saved target entity category, and execute S208.

[0100] S207: Output the first recognition result and end.

[0101] S208: According to the pre-stored keywords of the entity category to be identified, identify the text information composed of the text slices corresponding to the keywords in the image.

[0102] S209: Input the text information and the location information of the text information into the UIE-X model.

[0103] S210: Obtain a second output result of the UIE-X model.

[0104] The second output is the entity category to be identified and the corresponding key content in the international settlement collection cover letter.

[0105] S211: Output the first output result and the second output result.

[0106] Embodiment 4:

[0107] In order to obtain the entity category to be identified, based on the above embodiments, in the embodiment of the present application, the step of determining the entity category to be identified that is not identified in each pre-saved target entity category includes:

[0108] For each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, the target entity category is determined to be an unidentified entity category to be identified.

[0109] In order to obtain the entity category to be identified, the electronic device can obtain each pre-saved target entity category, wherein each target entity category is the entity category corresponding to each key content that needs to be obtained in the international settlement collection letter, and for each target entity category, determine whether the entity category corresponding to each identified key content contains the target entity category; if the entity category corresponding to any identified key content is the target entity category, it can be determined that the key content corresponding to the target entity category has been identified and does not need to be identified again; if the entity categories corresponding to all identified key contents do not contain the target entity category, it can be determined that the key content corresponding to the target entity category has not been identified and needs to be identified again, and the target entity category can be determined as the entity category to be identified.

[0110] In order to improve the accuracy of entity category recognition, based on the above embodiments, in the embodiment of the present application, the text information composed of the text slices corresponding to the keywords in the image is identified, including:

[0111] Obtaining a key text slice containing the keyword in each text slice;

[0112] For each pre-saved direction, determine a target text slice whose distance between the direction and the position information of the key text slice in the image is less than a threshold;

[0113] Each acquired target text slice and the key text slice are spliced ​​in a preset reading order to obtain composed text information.

[0114] In order to improve the accuracy of entity category recognition, the electronic device can first filter out the key text slices containing the keyword from all the text slices extracted from the image. The electronic device also obtains each pre-saved direction, wherein each direction includes: top (the up, down, left, and right described here are the up, down, left, and right in the image, the same as in the following, no further description), left, right, upper left corner, lower left corner, upper right corner, and lower right corner. The electronic device can calculate the position information of each text slice in the direction in the image and the distance between the position information of the key text slice in the image for the multiple directions. If the distance is less than a threshold, the text slice whose corresponding distance is less than the threshold is determined as the target text slice.

[0115] For each unrecognized entity category to be recognized, after obtaining the key text slice of the entity category to be recognized and each corresponding target text slice whose distance is less than the threshold, the electronic device splices the content of each target text slice of the entity category to be recognized with the content of the key text slice in a preset reading order to obtain the spliced ​​text information. The reading order may be, for example, first from left to right, then from top to bottom, etc.

[0116] That is to say, for each key content that is missed by the UIE-X model for the first time, the embodiment of the present application combines expert experience to supplement the keywords corresponding to the key content to locate the element value area. When the text slices corresponding to the keywords and similar regular expressions are found, the text information of the text slice and its upper left, upper, upper right, left, right, lower, lower, and lower right text slices are spliced ​​together in reading order as the input of the second UIE-X model.

[0117] Embodiment 6:

[0118] In order to accurately and effectively perform entity identification, based on the above embodiments, in the embodiment of the present application, the acquisition of each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content include:

[0119] The UIE-X model obtains each key content and corresponding entity category in the international settlement collection letter that meets the corresponding constraints based on the constraints corresponding to each entity category in the pre-saved Schema, and outputs them.

[0120] In an embodiment of the present application, the UIE-X model operates according to a predefined schema, which lists in detail various entity categories and their corresponding constraints, wherein the constraints can ensure that the key content of the entity category conforms to a specific data type, such as an integer, a string, a date, etc., and can also ensure that the key content of the entity category should follow a format, such as the format of a telephone number, the format of a postal code, etc. When processing international settlement collection letters, the UIE-X model will use these pre-saved entity category constraints to accurately identify and extract each key content contained in the international settlement collection letter. Subsequently, the UIE-X model will correctly classify these key contents into corresponding entity categories based on them. Finally, the UIE-X model will output each key content and the corresponding entity category.

[0121] Business personnel pre-build a schema including the collecting bank, remitting bank, invoice number, remitting bank association number, remittance fee, payer, principal, presentation date, and payment terms. Next, the UIE-X model uses the text slices converted by OCR recognition and the location information of the text slices as input, and extracts key content based on the constraints corresponding to each entity category in the Schema, and determines the corresponding entity category. The UIE-X model extracts the corresponding information from the input according to the recognition categories and constraints defined in the Schema, and returns a structured result that contains each key content and the corresponding entity category.

[0122] In the UIE-X model, Schema is a key component, which is used to define the entity categories and constraints that need to be extracted from data sources such as text or images. Schema in the UIE-X model is a document that contains the entity categories and constraints that need to be extracted. It describes in detail the name of each entity category and possible constraints (such as length limit, value range, etc.), thereby guiding the UIE-X model on how to accurately extract these key contents and entity categories from the input data.

[0123] It should be noted that the application of large models in AI document review is one of the important directions of current technological development. These large models usually have large-scale parameters and complex structures, and can handle complex data and tasks, such as image recognition and natural language processing. In the field of document review, the application of large AI models can significantly improve the efficiency and accuracy of review and reduce the cost and error rate of manual review.

[0124] In an embodiment of the present application, the electronic device defines a set of independent entity labels for the international settlement collection letter review system for important content elements in order to facilitate the review. For the collection letter image, when performing entity recognition. The OCR technology is used to obtain the text content of the international settlement collection letter and its corresponding coordinate information, and the two are used together as the input of the UIE-X model. Moreover, by utilizing the key information extraction capability of the UIE-X model, the entity information extraction and recognition of the key information of the collection letter are completed in two key steps without manual labeling. In addition, the keyword regular matching method is used to find the location of the keyword, and the text information combined with the content of the text slices surrounding the corresponding key text slices is used as the input for the second UIE-X model recognition.

[0125] Embodiment 7:

[0126] Based on the same inventive concept, the embodiment of the present application provides an entity recognition device, Figure 3 For a schematic diagram of the structure of an entity recognition device provided in an embodiment of the present application, please refer to Figure 3 , the device comprises:

[0127] The receiving and identifying module 301 is used to receive an image of an international settlement collection cover letter; identify each character slice in the image, and the position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold;

[0128] The processing module 302 is used to input each text slice and the location information of each text slice into the pre-trained UIE-X model, and obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

[0129] In a possible implementation, the receiving and identifying module is used to identify each text slice in the image and position information of each text slice in the image based on an OCR recognition method.

[0130] In a possible implementation, the processing module 302 is also used to determine the unrecognized entity categories to be identified in each pre-saved target entity category; identify the text information composed of the text slices where the keywords are located in the image according to the pre-saved keywords of the entity categories to be identified; input the text information and the location information of the text information into the UIE-X model, and obtain the entity categories to be identified and the corresponding key contents in the international settlement collection letter output by the UIE-X model.

[0131] In a possible implementation, the processing module 302 is specifically configured to determine, for each pre-saved target entity category, that the target entity category is an unrecognized entity category to be identified if the entity category corresponding to each identified key content does not include the target entity category.

[0132] In a possible implementation, the processing module 302 is specifically used to determine, for each pre-saved direction, a target text slice whose distance from the direction and the position information of the keyword in the image is less than a threshold; and splice each acquired target text slice according to a preset reading order to obtain composed text information.

[0133] In a possible implementation, the processing module 302, specifically used for the Schema of the UIE-X model, obtains each key content and corresponding entity category included in the international settlement collection cover letter based on the pre-saved constraints corresponding to each entity category, and outputs them.

[0134] Embodiment 8:

[0135] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can implement the steps of the entity recognition method discussed above. Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, it includes: a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404;

[0136] The memory 403 stores a computer program. When the program is executed by the processor 401, the processor 401 performs the following steps:

[0137] Receiving an image of an international settlement collection letter; identifying each character slice in the image and position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold;

[0138] Each text slice and the location information of each text slice are input into the pre-trained UIE-X model, and each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content are obtained.

[0139] In a possible implementation manner, the identifying each text slice in the image and the position information of each text slice in the image includes:

[0140] Based on the OCR recognition method, each text slice in the image and the position information of each text slice in the image are recognized.

[0141] In a possible implementation, the method further includes:

[0142] Determine an unrecognized entity category in each pre-stored target entity category; and identify text information composed of text slices where the keyword is located in the image according to the pre-stored keyword of the entity category to be recognized;

[0143] The text information and the location information of the text information are input into the UIE-X model, and the entity category to be identified and the corresponding key content in the international settlement collection cover letter output by the UIE-X model are obtained.

[0144] In a possible implementation, determining the unrecognized entity category to be identified in each pre-stored target entity category includes:

[0145] For each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, the target entity category is determined to be an unidentified entity category to be identified.

[0146] In a possible implementation manner, the identifying text information composed of text slices corresponding to the keyword in the image includes:

[0147] For each pre-saved direction, determine a target text slice whose distance between the direction and the position information of the keyword in the image is less than a threshold;

[0148] Each target text slice obtained is spliced ​​according to a preset reading order to obtain the composed text information.

[0149] In a possible implementation manner, the obtaining of each key content contained in the international settlement collection cover letter output by the UIE-X model and the entity category corresponding to each key content includes:

[0150] The Schema of the UIE-X model obtains each key content and the corresponding entity category contained in the international settlement collection letter based on the pre-saved constraints corresponding to each entity category, and outputs them.

[0151] Since the principle of solving the problem by the above electronic device is similar to that of the entity recognition method, the implementation of the above electronic device can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0152] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 402 is used for communication between the above electronic device and other devices. The memory may include a random access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0153] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0154] Embodiment 9:

[0155] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by a processor is stored. When the program runs on the processor, the processor executes any entity recognition method discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the entity recognition method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.

[0156] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any entity recognition method discussed above. Since the principle of solving the problem by the above computer program product is similar to any entity recognition method discussed above, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0157] Because in the embodiment of the present application, the electronic device determines and recognizes each text slice in the image of the international settlement collection letter, as well as the position information of each text slice in the image, and through fine text slicing processing of the image, it can ensure that each character is accurately segmented, avoiding confusion and misrecognition between characters, and based on the trained UIE-X model, each text slice and the position information of each text slice are processed. The UIE-X model can more accurately understand the contextual relationship between characters, so that each key content and the entity category corresponding to the key content can be accurately identified in the image.

[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0162] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An entity recognition method, characterized in that: The method comprises: Receiving an image of an international settlement collection letter; identifying each character slice in the image and position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold; Input each text slice and the location information of each text slice into the pre-trained unified information extraction extension UIE-X model to obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

2. The method according to claim 1, characterized in that The identifying each text slice in the image and the position information of each text slice in the image includes: Based on an optical character (OCR) recognition method, each text slice in the image and position information of each text slice in the image are recognized.

3. The method according to claim 1, characterized in that The method further comprises: Determine an unrecognized entity category in each pre-stored target entity category; and identify text information composed of text slices where the keyword is located in the image according to the pre-stored keyword of the entity category to be recognized; The text information and the location information of the text information are input into the UIE-X model, and the entity category to be identified and the corresponding key content in the international settlement collection cover letter output by the UIE-X model are obtained.

4. The method according to claim 3, characterized in that The step of determining the unrecognized entity category to be identified in each pre-stored target entity category includes: For each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, the target entity category is determined to be an unidentified entity category to be identified.

5. The method according to claim 3, characterized in that: The identifying text information composed of text slices corresponding to the keywords in the image includes: For each pre-saved direction, determine a target text slice whose distance between the direction and the position information of the keyword in the image is less than a threshold; Each target text slice obtained is spliced ​​according to a preset reading order to obtain the composed text information.

6. The method according to claim 1, characterized in that The obtaining of each key content contained in the international settlement collection cover letter output by the UIE-X model and the entity category corresponding to each key content include: The Schema of the UIE-X model obtains each key content and the corresponding entity category contained in the international settlement collection cover letter based on the pre-saved constraints corresponding to each entity category, and outputs them.

7. An entity recognition device, characterized in that: The device comprises: A receiving and identifying module is used to receive an image of an international settlement collection cover letter; identify each character slice in the image, and position information of each character slice in the image; wherein the distance between each two adjacent characters contained in any character slice does not exceed a preset distance threshold; A processing module is used to input each text slice and the location information of each text slice into a pre-trained unified information extraction extension UIE-X model, and obtain each key content contained in the international settlement collection letter output by the UIE-X model and the entity category corresponding to each key content.

8. The device according to claim 7, characterized in that The receiving and identifying module is used to identify each text slice in the image and the position information of each text slice in the image based on an optical character OCR recognition method.

9. The device according to claim 7, characterized in that The processing module is also used to determine the unrecognized entity categories to be identified in each pre-saved target entity category; identify the text information composed of the text slices where the keywords are located in the image according to the pre-saved keywords of the entity categories to be identified; input the text information and the position information of the text information into the UIE-X model, and obtain the entity categories to be identified and the corresponding key contents in the international settlement collection cover letter output by the UIE-X model.

10. The device according to claim 9, characterized in that The processing module is specifically configured to determine, for each pre-saved target entity category, if the entity category corresponding to each identified key content does not include the target entity category, that the target entity category is an unidentified entity category to be identified.

11. The device according to claim 9, characterized in that The processing module is specifically used to determine, for each pre-saved direction, a target text slice whose distance from the direction to the position information of the keyword in the image is less than a threshold; and splice each acquired target text slice according to a preset reading order to obtain composed text information.

12. The device according to claim 7, characterized in that The processing module is specifically used for the Schema of the UIE-X model to obtain each key content and corresponding entity category contained in the international settlement collection letter based on the pre-saved constraints corresponding to each entity category, and output them.

13. An electronic device, characterized in that: The electronic device comprises a processor, and the processor is used to implement the steps of the entity recognition method according to any one of claims 1 to 6 when executing a computer program stored in a memory.

14. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the entity recognition method according to any one of claims 1 to 6.

15. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the steps of the entity recognition method according to any one of claims 1 to 6.