Incoming letter information extraction method and device, electronic equipment and storage medium

Through named entity recognition, relationship extraction and correlation analysis, the incoming information is automatically spliced, which solves the problems of low extraction efficiency and poor readability in the existing technology, and achieves efficient, accurate and standardized information extraction.

CN119204012APending Publication Date: 2024-12-27CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411218485.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the incoming information extraction efficiency is low and the readability is poor, and the information extraction needs cannot be met.

Method used

Through named entity recognition, relationship extraction and correlation analysis, key text fragments are automatically determined and spliced ​​in the splicing order, and the target extract text is generated, and the relationship between multiple named entities is considered to improve the flexibility and normativeness of splicing order.

Benefits of technology

It improves the accuracy and efficiency of information extraction incoming letters, meets the information extraction needs, and improves the readability and standardization of the extracted text through orderly arrangement, realizing the automatic extraction of information incoming letters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119204012A_ABST
    Figure CN119204012A_ABST
Patent Text Reader

Abstract

The invention relates to an incoming letter information extraction method and device, electronic equipment and a storage medium, and belongs to the technical field of financial science and technology, information technology industry and natural language processing. The method comprises the following steps: performing named entity recognition on a target text carried by a target letter to obtain a target named entity; performing relation extraction on the plurality of target named entities to obtain a relation among the plurality of target named entities; splicing the target text fragment and the target named entity corresponding to the target text fragment to obtain a spliced text fragment; performing correlation analysis on the information extraction demand and the spliced text fragments to obtain correlation parameters, and determining key text fragments from the plurality of spliced text fragments based on the correlation parameters; according to the embodiment of the invention, the splicing sequence is determined based on the relationship among the plurality of target named entities, and the plurality of key text fragments are spliced according to the splicing sequence to obtain the target extracted text, so that the accuracy of the incoming letter information extraction is improved, and the information extraction requirement of the target incoming letter can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of financial technology, information technology industry, and natural language processing technology, and in particular to a method, device, electronic device, computer-readable storage medium, and computer program product for extracting information from incoming letters. Background Art

[0002] At present, after receiving a letter, it is often necessary to extract information from the letter to understand the content of the letter and enter the extracted letter information into the system. However, in the related art, most of them rely on manual information extraction from letters, resulting in low efficiency of information extraction from letters, and unable to meet the information extraction needs of letters, and the readability of the extracted letter information is poor. Summary of the invention

[0003] The present disclosure provides a method, device, electronic device, computer-readable storage medium and computer program product for extracting information from incoming letters, so as to at least solve the problems in the related art that the requirements for extracting information from incoming letters cannot be met, the readability of the extracted information from incoming letters is poor, and the efficiency of extracting information from incoming letters is low. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a method for extracting information from incoming letters is provided, comprising: performing named entity recognition on a target text carried by a target incoming letter to obtain target named entities corresponding to each of a plurality of target text segments of the target text; performing relationship extraction on a plurality of the target named entities to obtain a relationship between a plurality of the target named entities; splicing the target text segment and the target named entities corresponding to the target text segment to obtain a spliced ​​text segment; performing correlation analysis on the information extraction requirements of the target incoming letter and the spliced ​​text segment to obtain a correlation parameter, and based on the correlation parameter, determining a key text segment from the plurality of spliced ​​text segments; determining a splicing order of the plurality of key text segments based on the relationship between the plurality of the target named entities, and splicing the plurality of key text segments according to the splicing order to obtain a target extracted text of the target incoming letter.

[0005] According to a second aspect of an embodiment of the present disclosure, a device for extracting information from an incoming letter is provided, comprising: an identification module, configured to perform named entity recognition on a target text carried by a target incoming letter, and obtain target named entities corresponding to each of a plurality of target text segments of the target text; an extraction module, configured to perform relationship extraction on a plurality of the target named entities, and obtain relationships between a plurality of the target named entities; a first splicing module, configured to splice the target text segment and the target named entity corresponding to the target text segment, and obtain a spliced ​​text segment; a determination module, configured to perform correlation analysis on the information extraction requirements of the target incoming letter and the spliced ​​text segment, and obtain correlation parameters, and determine key text segments from the plurality of spliced ​​text segments based on the correlation parameters; a second splicing module, configured to determine a splicing order of the plurality of key text segments based on the relationships between the plurality of target named entities, and splice the plurality of key text segments according to the splicing order, and obtain a target extracted text of the target incoming letter.

[0006] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the method for extracting incoming letter information as described in the first aspect.

[0007] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for extracting incoming letter information as described in the first aspect.

[0008] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for extracting incoming letter information as described in the first aspect is implemented.

[0009] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects: the target text fragment and the target named entity corresponding to the target text fragment can be spliced ​​to obtain a spliced ​​text fragment, and the key text fragment can be automatically determined from multiple spliced ​​text fragments taking into account the relevance parameters, the key text fragment matches the information extraction requirements of the target letter, the accuracy of the letter information extraction is improved, the information extraction requirements of the target letter can be met, and multiple key text fragments only need to be spliced ​​in a splicing order to obtain a target extracted text, and there is no need to splice all the spliced ​​text fragments, thereby improving the efficiency of letter information extraction; in addition, the relationship between multiple target named entities can be considered to determine the splicing order of multiple key text fragments, and flexible determination of the splicing order can be achieved; compared with the random arrangement of the extracted letter information in the related art, the extracted multiple key text fragments can be arranged in order according to the splicing order in this solution to obtain the target extracted text, thereby improving the readability and standardization of the target extracted text, and automatic extraction of letter information can be achieved.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0012] Figure 1 It is a flowchart of the method for extracting incoming letter information according to the first embodiment of the present disclosure.

[0013] Figure 2 It is a flowchart of the method for extracting incoming letter information according to the second embodiment of the present disclosure.

[0014] Figure 3 It is a flowchart of the method for extracting incoming letter information according to the third embodiment of the present disclosure.

[0015] Figure 4 It is a block diagram of an incoming letter information extraction device according to the first embodiment of the present disclosure.

[0016] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0017] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0019] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present disclosure are in compliance with the relevant provisions of relevant laws and regulations. In the embodiments of the present disclosure, certain software, components, models, and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present disclosure, but it does not mean that the applicant has or will necessarily use the solution.

[0021] Figure 1 It is a flowchart of the method for extracting incoming letter information according to the first embodiment of the present disclosure.

[0022] like Figure 1 As shown, the method for extracting incoming letter information in the first embodiment of the present disclosure includes the following steps:

[0023] S101, performing named entity recognition on a target text carried in a target incoming letter to obtain target named entities corresponding to a plurality of target text segments of the target text.

[0024] It should be noted that the execution subject of the incoming letter information extraction method of the present disclosure is an electronic device, wherein the electronic device may include a mobile phone, a notebook, a vehicle-mounted device, a smart home appliance, etc. The incoming letter information extraction method of the present embodiment can be executed by the incoming letter information extraction device of the present embodiment, and the incoming letter information extraction device of the present embodiment can be configured in any electronic device to execute the incoming letter information extraction method of the present embodiment.

[0025] It should be noted that there are no excessive restrictions on the target letters, such as contracts, bills, confirmation letters, audit reports, quotations, etc., and they may include paper documents, image files, electronic files, etc. There are no excessive restrictions on the target texts, such as texts in at least one language such as Chinese and English.

[0026] It should be noted that the target text includes multiple target text segments, and different target text segments may correspond to different target named entities. There are no excessive restrictions on the target named entities, for example, they may include people, organizations (such as companies, schools, social groups, etc.), events, time, place, account, etc.

[0027] For example, multiple target text segments include "Zhang San", "123456", "Firm C", "Confirmation", "August 1, 2024", and "City D". The target named entity corresponding to "Zhang San" is "person", the target named entity corresponding to "123456" is "account", the target named entity corresponding to "Firm C" is "company", the target named entity corresponding to "confirmation" is "event", the target named entity corresponding to "August 1, 2024" is "time", and the target named entity corresponding to "City D" is "place".

[0028] It should be noted that the NER (Named Entity Recognition) of the target text can be implemented by using any NER method in the relevant technology, and no further limitation is made here.

[0029] In one embodiment, named entity recognition is performed on the target text carried in the target letter to obtain target named entities corresponding to each of the multiple target text segments of the target text, including obtaining a mapping relationship between a candidate knowledge domain and a candidate named entity set, performing semantic analysis on the target text, determining the target knowledge domain to which the target letter belongs, obtaining a candidate named entity set having a mapping relationship with the target knowledge domain as the target named entity set, and determining the target named entities corresponding to each of the multiple target text segments from the target named entity set. Thus, it can be considered that the target text determines the target knowledge domain to which the target letter belongs, and obtains a target named entity set having a mapping relationship with the target knowledge domain to perform named entity recognition on the target text. Compared with the related art that uses the entire named entity set to perform named entity recognition on the target text, resulting in low efficiency and low accuracy in named entity recognition, in this solution, only the target named entity set needs to be used to perform named entity recognition on the target text. The target named entity set has a small amount of data and matches the target knowledge domain to which the target letter belongs, which helps to improve the efficiency and accuracy of named entity recognition.

[0030] It is understandable that multiple candidate knowledge domains and multiple candidate named entity sets can be preset, and the multiple candidate knowledge domains include the target knowledge domain, and the multiple candidate named entity sets include the target named entity set. There are not too many restrictions on the knowledge domains, for example, they may include auditing, news, meteorology, medical care, etc. The candidate named entity sets mapped to different candidate knowledge domains may be different. The target text is semantically analyzed to determine the target knowledge domain to which the target letter belongs. Any semantic analysis method in the relevant technology can be used to achieve this, and no excessive restrictions are made here.

[0031] For example, there is a mapping relationship between audit and candidate named entity set A, and there is a mapping relationship between medical and candidate named entity set B.

[0032] Semantic analysis can be performed on the target text X carried by the target letter 1 to determine that the target knowledge field to which the target letter 1 belongs is auditing, and a candidate named entity set A having a mapping relationship with auditing is obtained as the target named entity set. The target named entities corresponding to each of the multiple target text segments of the target text X are determined from the candidate named entity set A.

[0033] Semantic analysis can be performed on the target text Y carried by the target letter 2 to determine that the target knowledge field to which the target letter 2 belongs is medical. A candidate named entity set B having a mapping relationship with medical is obtained as the target named entity set, and the target named entities corresponding to each of the multiple target text fragments of the target text Y are determined from the candidate named entity set B.

[0034] In one embodiment, before performing named entity recognition on the target text carried in the target letter, the target letter is further processed by OCR (Optical Character Recognition) to obtain the original text carried in the target letter, and the original text is preprocessed to obtain the target text. It should be noted that there are no excessive restrictions on preprocessing, for example, it may include text cleaning, word segmentation, part-of-speech tagging, etc.

[0035] S102, extracting relations among the multiple target named entities to obtain relations among the multiple target named entities.

[0036] It should be noted that there are not too many restrictions on the relationship between multiple named entities. For example, it can include the relationship between a person and an account, the relationship between a person and a company, the relationship between a person and an event, the relationship between people (such as the relationship between a sender and a recipient), the relationship between an event and time, the relationship between an event and a place, etc.

[0037] It should be noted that the relationship extraction of multiple target named entities to obtain the relationship between the multiple target named entities can be implemented by using any named entity relationship extraction method in the relevant technology, and no excessive restrictions are made here.

[0038] S103, concatenating the target text segment and the target named entity corresponding to the target text segment to obtain a concatenated text segment.

[0039] It should be noted that the target text segment and the target named entity corresponding to the target text segment are concatenated to obtain the concatenated text segment, which can be implemented by any text concatenation method in the related art, and no further limitation is made here.

[0040] In one embodiment, a target text segment and a target named entity corresponding to the target text segment are spliced ​​to obtain a spliced ​​text segment, including splicing the target text segment and the target named entity corresponding to the target text segment in the order of the target named entity corresponding to the target text segment and the target text segment to obtain a spliced ​​text segment.

[0041] For example, the target text segment is "Zhang San", and the target named entity corresponding to "Zhang San" is "character". "Character" and "Zhang San" can be concatenated in the order of "character", and the resulting concatenated text segment is "Character: Zhang San" and "Character is Zhang San".

[0042] For example, the target text segment is "123456", and the target named entity corresponding to "123456" is "account number". You can concatenate "account number" and "123456" in the order of "account number" and "123456", and the resulting concatenated text segments are "account number: 123456" and "account number is 123456".

[0043] In one embodiment, a target text segment and a target named entity corresponding to the target text segment are spliced ​​to obtain a spliced ​​text segment, including obtaining a template text segment, replacing a first text segment to be replaced in the template text segment with the target text segment, and replacing a second text segment to be replaced in the template text segment with the target named entity corresponding to the target text segment to obtain a spliced ​​text segment.

[0044] S104, performing correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments to obtain correlation parameters, and determining key text segments from the multiple spliced ​​text segments based on the correlation parameters.

[0045] It should be noted that there are not too many restrictions on the information extraction requirements of the target letters, for example, they may include named entities and information categories of the information to be extracted. The correlation parameter is used to characterize the correlation (also called correlation relationship) between the information extraction requirements and the spliced ​​text fragments. The correlation may include the degree of correlation, positive correlation, negative correlation, irrelevance, etc. There are not too many restrictions on the correlation parameters, for example, they may include the F value of linear regression, correlation coefficient, nonlinear correlation coefficient, multiple correlation coefficient, etc. To obtain the relevant content of the correlation parameter, any correlation analysis method in the relevant technology can be used to achieve it, and there are no too many restrictions here. The multiple spliced ​​text fragments include key text fragments, and the number of key text fragments is at least one.

[0046] In one embodiment, based on the correlation parameter, determining the key text segment from multiple spliced ​​text segments includes sorting the multiple spliced ​​text segments from large to small according to the correlation parameter, taking the first M spliced ​​text segments as the key text segment, where M is a positive integer, and / or taking the spliced ​​text segments corresponding to the similarity parameters greater than a set threshold as the key text segment. Thus, the spliced ​​text segments with larger correlation parameters can be taken as the key text segments.

[0047] S105, determining a concatenation order of multiple key text segments based on the relationship between the multiple target named entities.

[0048] In the embodiments of the present disclosure, based on the relationship between multiple target named entities, the splicing order of multiple key text segments is determined, including the following possible implementations:

[0049] Method 1, obtain the mapping relationship between the candidate relationship category and the candidate splicing order, traverse the N target named entities, and determine the i-th target named entity and the j-th target named entity currently traversed, where i and j are both positive integers not greater than N, identify the target relationship category to which the relationship between the i-th target named entity and the j-th target named entity belongs, obtain the candidate splicing order having a mapping relationship with the target relationship category, and use it as the splicing order of the key text fragment where the i-th target named entity is located and the key text fragment where the j-th target named entity is located, until the traversal of the N target named entities is completed, and the splicing order of multiple key text fragments is generated.

[0050] In this way, N target named entities can be traversed, the target relationship category to which the relationship between the two target named entities currently traversed belongs can be obtained, and a candidate splicing order having a mapping relationship with the target relationship category can be obtained as the splicing order of the key text fragments where the two target named entities currently traversed are located, until the traversal of N target named entities is completed, and the splicing order of multiple key text fragments is generated.

[0051] It is understandable that multiple candidate relationship categories and multiple candidate splicing orders can be preset, and the multiple candidate relationship categories include the target relationship category, and the relationship category is not too limited, for example, it can include the relationship between a person and an account, the relationship between a person and a company, the relationship between a person and an event, the relationship between people (such as the relationship between a sender and a recipient), the relationship between an event and time, the relationship between an event and a place, etc. The candidate splicing orders mapped to different candidate relationship categories may be different.

[0052] For example, there is a mapping relationship between the candidate relationship category "person and account" and the candidate splicing order 1, there is a mapping relationship between the candidate relationship category "person and event" and the candidate splicing order 2, and there is a mapping relationship between the candidate relationship category "event and time" and the candidate splicing order 3, wherein the candidate splicing order 1 is used to represent the splicing order of the key text segment where the "person" is located, and is located before the splicing order of the key text segment where the "account" is located, the candidate splicing order 2 is used to represent the splicing order of the key text segment where the "person" is located, and is located before the splicing order of the key text segment where the "event" is located, and the candidate splicing order 3 is used to represent the splicing order of the key text segment where the "event" is located, and is located before the splicing order of the key text segment where the "time" is located.

[0053] Multiple target text segments include "Zhang San", "123456", "confirmation", and "August 1, 2024". The target named entity corresponding to "Zhang San" is "person", the target named entity corresponding to "123456" is "account", the target named entity corresponding to "confirmation" is "event", and the target named entity corresponding to "August 1, 2024" is "time". Multiple key text segments include "person is Zhang San", "account is 123456", "event is confirmation", and "time is August 1, 2024".

[0054] "Person", "Account", "Event", and "Time" can be traversed. The target relationship category of the relationship between the currently traversed "Person" and "Account" is identified as "Person and Account", and a candidate concatenation sequence 1 with a mapping relationship with "Person and Account" is obtained as the concatenation sequence of "Person is Zhang San" and "Account is 123456", that is, the concatenation sequence of "Person is Zhang San" is before the concatenation sequence of "Account is 123456".

[0055] Identify that the target relationship category of the currently traversed relationship between "person" and "event" is "person and event", and obtain candidate splicing order 2 that has a mapping relationship with "person and event" as the splicing order of "person is Zhang San" and "event is inquiry", that is, the splicing order of "person is Zhang San" is before the splicing order of "event is inquiry".

[0056] Identify that the target relationship category of the currently traversed relationship between "event" and "time" is "event and time", and obtain the candidate splicing order 3 that has a mapping relationship with "event and time" as the splicing order of "event is confirmation" and "time is August 1, 2024", that is, the splicing order of "event is confirmation" is before the splicing order of "time is August 1, 2024".

[0057] The splicing order of "The person is Zhang San", "The account number is 123456", "The event is confirmation", and "The time is August 1, 2024" can be generated as "The person is Zhang San", "The account number is 123456", "The event is confirmation", and "The time is August 1, 2024", that is, the splicing order of "The person is Zhang San" is the first priority, and the splicing order of "The time is August 1, 2024" is the last priority.

[0058] Method 2: Identify that the target relationship category of the relationship between the ith target named entity and the jth target named entity is a supplementary description relationship, where i and j are both positive integers not greater than N, and N is the number of target named entities; determine that the ith target named entity is a target named entity that supplements the jth target named entity; and determine that the splicing order of the key text fragment where the ith target named entity is located is after the splicing order of the key text fragment where the jth target named entity is located.

[0059] Therefore, when the target relationship category to which the relationship between two target named entities belongs is a supplementary description relationship, the concatenation order of the target named entities used for supplementary description can be determined to be after the concatenation order of the target named entities to be supplemented.

[0060] It should be noted that if the relationship between two named entities belongs to the supplementary description relationship, one of the named entities is a named entity that supplements the other named entity. There are no excessive restrictions on the supplementary description relationship, for example, it may include "person and account", "person and company", "event and time", "event and place", etc.

[0061] For example, let’s continue with the example of multiple target text segments including “Zhang San”, “123456”, “confirmation”, and “August 1, 2024”.

[0062] It can be identified that the target relationship category of the relationship between "person" and "account" is a supplementary description relationship, and "account" is determined to be a named entity that supplements the description of "person", and the concatenation order of "account is 123456" is determined to be after the concatenation order of "person is Zhang San".

[0063] It can be identified that the target relationship category of the relationship between "event" and "time" is a supplementary explanation relationship, "time" is determined to be a named entity that provides supplementary explanation for "event", and the splicing order of "time is August 1, 2024" is determined to be after the splicing order of "event is confirmation".

[0064] S106, splicing the multiple key text segments according to the splicing order to obtain the target extracted text of the target letter.

[0065] It is understandable that the target extracted text of the target letter is obtained by splicing the multiple key text segments in the splicing order, including splicing the multiple key text segments at least once in the splicing order to obtain the target extracted text. There is no excessive limit on the number of text segments spliced ​​each time, for example, only two text segments are spliced ​​in each splicing process.

[0066] For example, multiple key text fragments include "the person is Zhang San", "the account number is 123456", "the event is verification", and "the time is August 1, 2024". The splicing order of the above multiple key text fragments is "the person is Zhang San", "the account number is 123456", "the event is verification", and "the time is August 1, 2024". The above multiple key text fragments can be spliced ​​according to the above splicing order, and the target extracted text obtained is "the person is Zhang San, the account number is 123456, the event is verification, and the time is August 1, 2024".

[0067] For example, multiple key text fragments are spliced ​​in the splicing order to obtain the target extracted text of the target letter, including splicing the first-order key text fragment and the second-order key text fragment to obtain the target extracted text, starting from the third-order key text fragment, traversing multiple key text fragments in the splicing order, determining the currently traversed key text fragment, splicing the target extracted text with the currently traversed key text fragment to update the target extracted text, until the traversal of multiple key text fragments is completed, and the final target extracted text is obtained.

[0068] In summary, according to the method for extracting incoming letter information provided by the embodiment of the present disclosure, the target text segment and the target named entity corresponding to the target text segment can be spliced ​​to obtain a spliced ​​text segment, and the key text segment can be automatically determined from multiple spliced ​​text segments taking into account the relevance parameters. The key text segment matches the information extraction requirements of the target incoming letter, thereby improving the accuracy of incoming letter information extraction and meeting the information extraction requirements of the target incoming letter. In addition, it is only necessary to splice multiple key text segments in a splicing order to obtain a target extracted text, without having to splice all the spliced ​​text segments, thereby improving the efficiency of incoming letter information extraction. In addition, the relationship between multiple target named entities can be considered to determine the splicing order of multiple key text segments, and flexible determination of the splicing order can be achieved. Compared with the random arrangement of the extracted incoming letter information in the related art, the extracted multiple key text segments can be arranged in order according to the splicing order in this scheme to obtain the target extracted text, thereby improving the readability and standardization of the target extracted text and realizing automatic extraction of incoming letter information.

[0069] Figure 2 It is a flowchart of the method for extracting incoming letter information according to the second embodiment of the present disclosure.

[0070] like Figure 2 As shown, the method for extracting incoming letter information in the second embodiment of the present disclosure includes the following steps:

[0071] S201, performing named entity recognition on a target text carried in a target incoming letter to obtain target named entities corresponding to a plurality of target text segments of the target text.

[0072] S202, extracting relations among the multiple target named entities to obtain relations among the multiple target named entities.

[0073] S203, concatenating the target text segment and the target named entity corresponding to the target text segment to obtain a concatenated text segment.

[0074] S204, performing correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments to obtain correlation parameters, and determining key text segments from the multiple spliced ​​text segments based on the correlation parameters.

[0075] For the relevant contents of steps S201 - S204 , please refer to the above embodiment and will not be described again here.

[0076] S205: Based on the number N of target named entities, construct a relationship graph with N nodes.

[0077] S206: Establish a corresponding relationship between the target named entity and the nodes in the relationship graph.

[0078] S207, in response to the existence of a relationship between the i-th target named entity and the j-th target named entity, adding a connecting edge between a node corresponding to the i-th target named entity and a node corresponding to the j-th target named entity, wherein i and j are both positive integers not greater than N.

[0079] It should be noted that N is a positive integer, and there is no excessive restriction on N, for example, it can be 6. The nodes in the relationship graph correspond to the target named entities one by one, and the edges in the relationship graph are used to represent the relationship between the target named entities corresponding to the two nodes connected by the edge. The edges in the relationship graph may include undirected edges, directed edges, etc., and there may or may not be an edge between any two nodes in the relationship graph.

[0080] In one embodiment, the method further includes identifying the target relationship category to which the relationship between the i-th target named entity and the j-th target named entity belongs, and determining the i-th node as a child node of the j-th node based on the target relationship category. The i-th node is the node corresponding to the i-th target named entity, the j-th node is the node corresponding to the j-th target named entity, and the direction of the edge between the i-th node and the j-th node is from the j-th node to the i-th node.

[0081] For example, multiple target text segments include "Zhang San", "123456", "Firm C", "Confirmation", "August 1, 2024", and "City D". The target named entity corresponding to "Zhang San" is "person", the target named entity corresponding to "123456" is "account", the target named entity corresponding to "Firm C" is "company", the target named entity corresponding to "confirmation" is "event", the target named entity corresponding to "August 1, 2024" is "time", and the target named entity corresponding to "City D" is "place".

[0082] Multiple key text fragments include "the person is Zhang San", "the account number is 123456", "the company is Firm C", "the event is verification", "the time is August 1, 2024", and "the location is city D".

[0083] The number of target named entities N=6, and a relationship graph with 6 nodes can be constructed. The 6 nodes are nodes 1 to 6, respectively. A corresponding relationship is established between "person" and node 1, a corresponding relationship is established between "account" and node 2, a corresponding relationship is established between "company" and node 3, a corresponding relationship is established between "event" and node 4, a corresponding relationship is established between "time" and node 5, and a corresponding relationship is established between "place" and node 6.

[0084] In response to the relationship between "character" and "account", a connecting edge e1 is added between node 1 and node 2, and node 2 is determined to be a child node of node 1. The direction of edge e1 is from node 1 to node 2.

[0085] In response to the relationship between "person" and "company", a connecting edge e2 is added between node 1 and node 3, and node 3 is determined to be a child node of node 1. The direction of edge e2 is from node 1 to node 3.

[0086] In response to the relationship between "character" and "event", a connecting edge e3 is added between node 1 and node 4, and node 4 is determined to be a child node of node 1. The direction of edge e3 is from node 1 to node 4.

[0087] In response to the relationship between "event" and "time", a connecting edge e4 is added between node 4 and node 5, and node 5 is determined to be a child node of node 4. The direction of edge e4 is from node 4 to node 5.

[0088] In response to the relationship between "event" and "place", a connecting edge e5 is added between node 4 and node 6, and node 6 is determined to be a child node of node 4. The direction of edge e5 is from node 4 to node 6.

[0089] S208, determining a splicing order based on the levels of the nodes in the relationship graph.

[0090] In one embodiment, based on the level of the node in the relationship graph, determining the splicing order includes obtaining a mapping relationship between the candidate level and the candidate splicing order, obtaining the candidate splicing order having a mapping relationship with the level of the node as the splicing order of the key text segment where the target named entity corresponding to the node is located. It is understandable that the candidate splicing order mapped to different candidate levels may be different.

[0091] In one embodiment, based on the level of the nodes in the relationship graph, the splicing order is determined, including traversing N nodes in the relationship graph, and determining the sth node and the tth node currently traversed, wherein s and t are both positive integers not greater than N, determining the first named entity corresponding to the sth node, and the second named entity corresponding to the tth node, in response to the level of the sth node being higher than the level of the tth node, determining the splicing order of the key text segment where the first named entity is located, which is located before the splicing order of the key text segment where the second named entity is located, until the traversal of N nodes is completed, and the splicing order of multiple key text segments is generated. Thus, the N nodes in the relationship graph can be traversed, the target named entities corresponding to the two nodes currently traversed are determined, and the splicing order of the key text segment where the target named entity corresponding to the node with a higher level is determined, which is located before the splicing order of the key text segment where the target named entity corresponding to the node with a lower level is located, until the traversal of N target named entities is completed, and the splicing order of multiple key text segments is generated.

[0092] In some examples, the method further includes, in response to the level of the s-th node being the same as the level of the t-th node, obtaining a first priority of the first named entity and obtaining a second priority of the second named entity, and in response to the first priority being higher than the second priority, determining that the splicing order of the key text segment where the first named entity is located is before the splicing order of the key text segment where the second named entity is located. Thus, when the levels of the two nodes currently traversed are the same, determining that the splicing order of the key text segment where the target named entity with a higher priority is located is before the splicing order of the key text segment where the target named entity with a lower priority is located.

[0093] It is understandable that different target named entities may have different priorities.

[0094] For example, continuing with the above relationship diagram, nodes 1 to 6 in the relationship diagram can be traversed, the level of node 1 is the first level, the level of nodes 2 to 4 is the second level, the level of nodes 5 and 6 is the third level, and the first to third levels gradually decrease.

[0095] Determine the currently traversed nodes 1 and 2, determine that the first named entity corresponding to node 1 is "person", determine that the second named entity corresponding to node 2 is "account", and in response to the level of node 1 being higher than the level of node 2, determine that the splicing order of "person is Zhang San" is before the splicing order of "account is 123456".

[0096] Determine the currently traversed nodes 1 and 3, determine that the first named entity corresponding to node 1 is "person", determine that the second named entity corresponding to node 3 is "company", and in response to the fact that the level of node 1 is higher than the level of node 3, determine that the splicing order of "person is Zhang San" is before the splicing order of "company is firm C".

[0097] Determine the currently traversed nodes 1 and 4, determine that the first named entity corresponding to node 1 is "person", determine that the second named entity corresponding to node 4 is "event", and in response to the fact that the level of node 1 is higher than the level of node 4, determine that the splicing order of "person is Zhang San" is before the splicing order of "event is inquiry".

[0098] Determine the currently traversed nodes 2 and 3, determine that the first named entity corresponding to node 2 is "account", determine that the second named entity corresponding to node 2 is "company", in response to the fact that the level of node 2 is the same as the level of node 3, obtain the first priority of "account", and obtain the second priority of "company", in response to the first priority of "account" being higher than the second priority of "company", determine that the splicing order of "account is 123456" is before the splicing order of "company is firm C".

[0099] Determine the currently traversed nodes 2 and 4, determine that the first named entity corresponding to node 2 is "account", determine that the second named entity corresponding to node 4 is "event", in response to the fact that the level of node 2 is the same as that of node 4, obtain the first priority of "account", and obtain the second priority of "event", in response to the first priority of "account" being higher than the second priority of "event", determine that the splicing order of "account is 123456" is before the splicing order of "event is confirmation".

[0100] Determine the currently traversed nodes 3 and 4, determine that the first named entity corresponding to node 3 is "company", determine that the second named entity corresponding to node 4 is "event", in response to the fact that the level of node 3 is the same as that of node 4, obtain the first priority of "company", and obtain the second priority of "event", in response to the first priority of "company" being higher than the second priority of "event", determine that the splicing order of "company is firm C" is before the splicing order of "event is confirmation".

[0101] Determine the currently traversed nodes 4 and 5, determine that the first named entity corresponding to node 4 is "event", determine that the second named entity corresponding to node 5 is "time", and in response to the fact that the level of node 4 is higher than the level of node 5, determine that the splicing order of "the event is confirmation" is before the splicing order of "the time is August 1, 2024".

[0102] Determine the currently traversed nodes 4 and 6, determine that the first named entity corresponding to node 4 is "event", determine that the second named entity corresponding to node 6 is "place", and in response to the fact that the level of node 4 is higher than that of node 6, determine that the splicing order of "event is inquiry" is before the splicing order of "place is city D".

[0103] Determine the currently traversed nodes 5 and 6, determine that the first named entity corresponding to node 5 is "time", and determine that the second named entity corresponding to node 6 is "place", in response to the fact that the level of node 5 is the same as the level of node 6, obtain the first priority of "time", and obtain the second priority of "place", in response to the first priority of "time" being higher than the second priority of "place", determine that the splicing order of "time is August 1, 2024" is before the splicing order of "place is city D".

[0104] The splicing order of "The person is Zhang San", "The account number is 123456", "The company is Firm C", "The event is confirmation", "The time is August 1, 2024", and "The location is City D" can be generated as "The person is Zhang San", "The account number is 123456", "The company is Firm C", "The event is confirmation", "The time is August 1, 2024", and "The location is City D", that is, the splicing order of "The person is Zhang San" is the first priority, and the splicing order of "The location is City D" is the last priority.

[0105] S209, splicing the multiple key text segments in a splicing order to obtain a target extracted text of the target letter.

[0106] For the relevant contents of step S209, please refer to the above embodiment, which will not be repeated here.

[0107] In summary, according to the method for extracting incoming letter information provided by the embodiment of the present disclosure, based on the number N of target named entities, a relationship graph with N nodes is constructed, and a corresponding relationship between the target named entities and the nodes in the relationship graph is established. In response to the existence of a relationship between the i-th target named entity and the j-th target named entity, a connecting edge is added between the node corresponding to the i-th target named entity and the node corresponding to the j-th target named entity, wherein i and j are both positive integers not greater than N, and the splicing order is determined based on the hierarchy of the nodes in the relationship graph. Thus, a relationship graph can be constructed taking into account the relationship between multiple target named entities, and the splicing order can be determined taking into account the hierarchy of the nodes in the relationship graph.

[0108] Figure 3 It is a flowchart of the method for extracting incoming letter information according to the third embodiment of the present disclosure.

[0109] like Figure 3 As shown, the method for extracting incoming letter information in the third embodiment of the present disclosure includes the following steps:

[0110] S301, input the target text into the target large model, wherein the target large model includes a named entity recognition sub-model, a relationship extraction sub-model and an information integration sub-model.

[0111] S302, performing named entity recognition on the target text through a named entity recognition sub-model to obtain target named entities corresponding to each of the multiple target text segments.

[0112] S303, extracting relations from the multiple target named entities through the relation extraction sub-model to obtain relations between the multiple target named entities.

[0113] S304, splicing the target text segment and the target named entity corresponding to the target text segment through the information integration sub-model to obtain a spliced ​​text segment.

[0114] S305, performing correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments through the information integration sub-model to obtain correlation parameters, and determining key text segments from multiple spliced ​​text segments based on the correlation parameters.

[0115] S306, determining the splicing order of the multiple key text segments based on the relationship between the multiple target named entities through the information integration sub-model, and splicing the multiple key text segments according to the splicing order to obtain the target extracted text.

[0116] For the relevant contents of steps S301 - S306 , reference may be made to the relevant contents of steps S101 - S106 in the above embodiment, which will not be repeated here.

[0117] It should be noted that there are not too many restrictions on the target large model, for example, it may include LLM (Large Language Model), where LLM includes BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), ChatGLM (Chat Generative Latent-variable Model), etc.

[0118] In one embodiment, the method further includes obtaining sample text carried by the sample letter and sample extracted text of the sample letter, inputting the sample text into a pre-trained large model, outputting the predicted extracted text of the sample letter by the pre-trained large model, and fine-tuning the pre-trained large model based on the predicted extracted text and the sample extracted text to obtain a target large model. Thus, during the training process, the pre-trained large model can learn the relationship between the sample text and the sample extracted text, so that the trained target large model can obtain the target extracted text of the target letter based on the target text carried by the target letter, and only the pre-trained large model needs to be fine-tuned, thereby improving the model training efficiency.

[0119] It should be noted that there are not too many restrictions on the pre-trained large model, for example, it may include a pre-trained large language model. Based on the predicted extracted text and the sample extracted text, the pre-trained large model is fine-tuned, which can be achieved by any model fine-tuning method in the relevant technology, and there are no too many restrictions here. Among them, the model fine-tuning method may include LoRA (Low-Rank Adaptation) and instruction fine-tuning (Instruction Fine-Tuning) method. It should be noted that LoRA is a method for efficient fine-tuning of model parameters (Parameter-Efficient Fine-Tuning).

[0120] In one embodiment, the pre-trained large model is fine-tuned based on the predicted extracted text and the sample extracted text, including obtaining a loss function of the pre-trained large model based on the predicted extracted text and the sample extracted text, and fine-tuning the pre-trained large model based on the loss function. It should be noted that there are no excessive restrictions on the loss function, for example, it may include CE (Cross Entropy), MSE (Mean-Square Error), KL (Kullback-Leibler) divergence, contrast loss function, etc.

[0121] In summary, according to the method for extracting incoming letter information provided by the embodiment of the present disclosure, the target text is input into a target big model, wherein the target big model includes a named entity recognition sub-model, a relationship extraction sub-model and an information integration sub-model. The target text is processed by the target big model to obtain the target extracted text of the target incoming letter. The target big model can be used to realize automatic extraction of incoming letter information, thereby improving the efficiency of extracting incoming letter information.

[0122] Figure 4 4 is a block diagram of an incoming letter information extraction device according to the first embodiment of the present disclosure.

[0123] like Figure 4As shown, the incoming letter information extraction device 400 of the embodiment of the present disclosure includes: an identification module 401, an extraction module 402, a first splicing module 403, a determination module 404, and a second splicing module 405.

[0124] The recognition module 401 is configured to perform named entity recognition on the target text carried in the target letter, and obtain target named entities corresponding to each of the multiple target text segments of the target text;

[0125] An extraction module 402 is configured to extract relations between the plurality of target named entities to obtain relations between the plurality of target named entities;

[0126] A first splicing module 403 is configured to splice the target text segment and the target named entity corresponding to the target text segment to obtain a spliced ​​text segment;

[0127] The determination module 404 is configured to perform a correlation analysis on the information extraction requirement of the target letter and the spliced ​​text segments to obtain a correlation parameter, and determine a key text segment from the plurality of spliced ​​text segments based on the correlation parameter;

[0128] The second splicing module 405 is configured to determine the splicing order of the multiple key text segments based on the relationship between the multiple target named entities, and splice the multiple key text segments according to the splicing order to obtain the target extracted text of the target letter.

[0129] In one embodiment of the present disclosure, the determination module 404 is further configured to: sort the multiple spliced ​​text fragments from large to small according to the correlation parameter, and use the top M spliced ​​text fragments as the key text fragments, where M is a positive integer; and / or use the spliced ​​text fragments corresponding to the similarity parameters greater than a set threshold as the key text fragment.

[0130] In one embodiment of the present disclosure, the second splicing module 405 is further configured to: construct a relationship graph with N nodes based on the number N of the target named entities; establish a corresponding relationship between the target named entities and the nodes in the relationship graph; in response to the existence of a relationship between the ith target named entity and the jth target named entity, add a connecting edge between the node corresponding to the ith target named entity and the node corresponding to the jth target named entity, wherein i and j are both positive integers not greater than N; and determine the splicing order based on the hierarchy of the nodes in the relationship graph.

[0131] In one embodiment of the present disclosure, the second splicing module 405 is further configured to: traverse the N nodes in the relationship graph, and determine the sth node and the tth node currently traversed, wherein s and t are both positive integers not greater than N; determine the first named entity corresponding to the sth node, and the second named entity corresponding to the tth node; in response to the level of the sth node being higher than the level of the tth node, determine the splicing order of the key text fragment where the first named entity is located, which is located before the splicing order of the key text fragment where the second named entity is located, until the traversal of the N nodes is completed, and generate the splicing order of multiple key text fragments.

[0132] In one embodiment of the present disclosure, the second splicing module 405 is further configured to: in response to the level of the s-th node being the same as the level of the t-th node, obtain the first priority of the first named entity and obtain the second priority of the second named entity; in response to the first priority being higher than the second priority, determine that the splicing order of the key text segment where the first named entity is located is before the splicing order of the key text segment where the second named entity is located.

[0133] In one embodiment of the present disclosure, the second splicing module 405 is further configured to: obtain a mapping relationship between a candidate relationship category and a candidate splicing order; traverse the N target named entities, and determine the i-th target named entity and the j-th target named entity currently traversed, wherein i and j are both positive integers not greater than N; identify the target relationship category to which the relationship between the i-th target named entity and the j-th target named entity belongs; obtain a candidate splicing order having a mapping relationship with the target relationship category as the splicing order of the splicing text segment where the i-th target named entity is located and the key text segment where the j-th target named entity is located, until the traversal of the N target named entities is completed, and a splicing order of multiple key text segments is generated.

[0134] In one embodiment of the present disclosure, the second splicing module 405 is further configured to: identify that the target relationship category to which the relationship between the i-th target named entity and the j-th target named entity belongs is a supplementary description relationship, wherein i and j are both positive integers not greater than N, and N is the number of the target named entities; determine that the i-th target named entity is a target named entity that supplements the description of the j-th target named entity; determine that the splicing order of the key text segment where the i-th target named entity is located is after the splicing order of the key text segment where the j-th target named entity is located.

[0135] In one embodiment of the present disclosure, the recognition module 401 is further configured to: obtain a mapping relationship between a candidate knowledge domain and a candidate named entity set; perform semantic analysis on the target text to determine the target knowledge domain to which the target letter belongs; obtain a candidate named entity set having a mapping relationship with the target knowledge domain as a target named entity set; and determine the target named entities corresponding to each of multiple target text segments from the target named entity set.

[0136] In one embodiment of the present disclosure, the device 400 also includes: a processing module, which is configured to: input the target text into a target large model, wherein the target large model includes a named entity recognition sub-model, a relationship extraction sub-model and an information integration sub-model; perform named entity recognition on the target text through the named entity recognition sub-model to obtain target named entities corresponding to each of the multiple target text segments; perform relationship extraction on the multiple target named entities through the relationship extraction sub-model to obtain the relationship between the multiple target named entities; splice the target text segment and the target named entity corresponding to the target text segment through the information integration sub-model to obtain the spliced ​​text segment; perform correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segment through the information integration sub-model to obtain correlation parameters, and determine key text segments from the multiple spliced ​​text segments based on the correlation parameters; determine the splicing order of the multiple key text segments based on the relationship between the multiple target named entities through the information integration sub-model, and splice the multiple key text segments according to the splicing order to obtain the target extracted text.

[0137] In one embodiment of the present disclosure, the device 400 also includes: a training module, configured to: obtain sample text carried by a sample letter, and sample extracted text of the sample letter; input the sample text into a pre-trained big model, and the pre-trained big model outputs predicted extracted text of the sample letter; based on the predicted extracted text and the sample extracted text, fine-tune the pre-trained big model to obtain the target big model.

[0138] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0139] In summary, the device for extracting incoming letter information provided by the embodiment of the present disclosure can splice the target text segment and the target named entity corresponding to the target text segment to obtain a spliced ​​text segment, and automatically determine the key text segment from multiple spliced ​​text segments taking into account the relevance parameters. The key text segment matches the information extraction requirements of the target incoming letter, thereby improving the accuracy of incoming letter information extraction and meeting the information extraction requirements of the target incoming letter. In addition, it is only necessary to splice multiple key text segments in a splicing order to obtain a target extracted text, without having to splice all the spliced ​​text segments, thereby improving the efficiency of incoming letter information extraction. In addition, the relationship between multiple target named entities can be considered to determine the splicing order of multiple key text segments, and flexible determination of the splicing order can be achieved. Compared with the random arrangement of the extracted incoming letter information in the related art, the extracted multiple key text segments can be arranged in order according to the splicing order in this scheme to obtain the target extracted text, thereby improving the readability and standardization of the target extracted text and realizing automatic extraction of incoming letter information.

[0140] Figure 5 It is a block diagram of an electronic device according to an exemplary embodiment.

[0141] like Figure 5 As shown, the electronic device 500 includes:

[0142] The memory 510 and the processor 520, a bus 530 connecting different components (including the memory 510 and the processor 520), the memory 510 stores a computer program, and when the processor 520 executes the program, the method for extracting incoming letter information described in the embodiment of the present disclosure is implemented.

[0143] Bus 530 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0144] The electronic device 500 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 500, including volatile and non-volatile media, removable and non-removable media.

[0145] The memory 510 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 540 and / or cache memory 550. The electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 560 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 530 via one or more data medium interfaces. The memory 510 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0146] A program / utility 580 having a set (at least one) of program modules 570 may be stored, for example, in the memory 510, such program modules 570 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 570 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0147] The electronic device 500 may also communicate with one or more external devices 590 (e.g., keyboard, pointing device, display 591, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 592. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 593. Figure 5 As shown, the network adapter 593 communicates with other modules of the electronic device 500 via the bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0148] The processor 520 executes various functional applications and data processing by running the programs stored in the memory 510 .

[0149] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the method for extracting incoming letter information in the embodiment of the present disclosure, and will not be repeated here.

[0150] In summary, the electronic device provided by the embodiment of the present disclosure can execute the method for extracting incoming letter information as described above, can splice the target text segment and the target named entity corresponding to the target text segment to obtain a spliced ​​text segment, and automatically determine the key text segment from multiple spliced ​​text segments taking into account the relevance parameters, the key text segment matches the information extraction requirements of the target incoming letter, improves the accuracy of incoming letter information extraction, can meet the information extraction requirements of the target incoming letter, and only needs to splice multiple key text segments in a splicing order to obtain a target extracted text, without having to splice all the spliced ​​text segments, thereby improving the efficiency of incoming letter information extraction, in addition, the relationship between multiple target named entities can be considered to determine the splicing order of multiple key text segments, and flexible determination of the splicing order can be achieved. Compared with the random arrangement of the extracted incoming letter information in the related art, in this scheme, the extracted multiple key text segments can be arranged in order according to the splicing order to obtain the target extracted text, thereby improving the readability and standardization of the target extracted text, and automatic extraction of incoming letter information can be achieved.

[0151] In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.

[0152] When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can perform the method for extracting incoming information as described above. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0153] In order to implement the above embodiments, the present disclosure further provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the method for extracting incoming letter information as described above is implemented.

[0154] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0155] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for extracting incoming letter information, characterized in that: include: Performing named entity recognition on the target text carried in the target letter to obtain target named entities corresponding to each of the multiple target text segments of the target text; Extracting relationships among the plurality of target named entities to obtain relationships among the plurality of target named entities; splicing the target text segment and the target named entity corresponding to the target text segment to obtain a spliced ​​text segment; Performing a correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments to obtain a correlation parameter, and determining a key text segment from the plurality of spliced ​​text segments based on the correlation parameter; Based on the relationship between the multiple target named entities, the splicing order of the multiple key text segments is determined, and the multiple key text segments are spliced ​​according to the splicing order to obtain the target extracted text of the target letter.

2. The method according to claim 1, characterized in that The determining of a key text segment from the plurality of concatenated text segments based on the correlation parameter comprises: Sorting the plurality of concatenated text segments from large to small according to the relevance parameter, and taking the top M concatenated text segments as the key text segments, where M is a positive integer; and / or, The concatenated text segments corresponding to the similarity parameters greater than the set threshold are used as the key text segments.

3. The method according to claim 1, characterized in that The step of determining the splicing order of the plurality of key text segments based on the relationship between the plurality of target named entities includes: Based on the number N of the target named entities, construct a relationship graph with N nodes; Establishing a corresponding relationship between the target named entity and the nodes in the relationship graph; In response to the existence of a relationship between the i-th target named entity and the j-th target named entity, adding a connecting edge between a node corresponding to the i-th target named entity and a node corresponding to the j-th target named entity, wherein i and j are both positive integers not greater than N; The splicing order is determined based on the levels of the nodes in the relationship graph.

4. The method according to claim 3, characterized in that The step of determining the splicing order based on the levels of the nodes in the relationship graph includes: Traversing N nodes in the relationship graph, and determining the sth node and the tth node currently traversed, where s and t are both positive integers not greater than N; Determine a first named entity corresponding to the s-th node and a second named entity corresponding to the t-th node; In response to the fact that the level of the s-th node is higher than the level of the t-th node, the splicing order of the key text fragment where the first named entity is located is determined to be before the splicing order of the key text fragment where the second named entity is located, until the traversal of the N nodes is completed, and the splicing order of multiple key text fragments is generated.

5. The method according to claim 4, characterized in that The method further comprises: In response to the level of the s-th node being the same as the level of the t-th node, obtaining a first priority of the first named entity, and obtaining a second priority of the second named entity; In response to the first priority being higher than the second priority, the concatenation order of the key text segments where the first named entity is located is determined to be before the concatenation order of the key text segments where the second named entity is located.

6. The method according to claim 1, characterized in that The step of determining the splicing order of the plurality of key text segments based on the relationship between the plurality of target named entities comprises: Obtaining a mapping relationship between candidate relationship categories and candidate splicing orders; Traversing the N target named entities, and determining the i-th target named entity and the j-th target named entity currently traversed, wherein i and j are both positive integers not greater than N; Identify the target relationship category to which the relationship between the i-th target named entity and the j-th target named entity belongs; A candidate splicing order having a mapping relationship with the target relationship category is obtained as the splicing order of the key text segment where the i-th target named entity is located and the key text segment where the j-th target named entity is located, until the traversal of the N target named entities is completed, and a splicing order of multiple key text segments is generated.

7. The method according to claim 1, characterized in that The step of determining the splicing order of the plurality of key text segments based on the relationship between the plurality of target named entities includes: Identify that the target relationship category of the relationship between the i-th target named entity and the j-th target named entity is a supplementary description relationship, wherein i and j are both positive integers not greater than N, and N is the number of the target named entities; Determining the i-th target named entity as a target named entity that supplements the j-th target named entity; The concatenation order of the key text segments where the i-th target named entity is located is determined to be after the concatenation order of the key text segments where the j-th target named entity is located.

8. The method according to claim 1, characterized in that The step of performing named entity recognition on the target text carried in the target letter to obtain target named entities corresponding to each of the multiple target text segments of the target text includes: Obtaining a mapping relationship between candidate knowledge domains and candidate named entity sets; Performing semantic analysis on the target text to determine the target knowledge field to which the target letter belongs; Acquire a candidate named entity set having a mapping relationship with the target knowledge domain as a target named entity set; A target named entity corresponding to each of the plurality of target text segments is determined from the target named entity set.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Inputting the target text into a target large model, wherein the target large model includes a named entity recognition sub-model, a relationship extraction sub-model and an information integration sub-model; Performing named entity recognition on the target text by using the named entity recognition sub-model to obtain target named entities corresponding to each of the plurality of target text segments; Performing relationship extraction on the plurality of target named entities through the relationship extraction sub-model to obtain the relationship between the plurality of target named entities; splicing the target text segment and the target named entity corresponding to the target text segment through the information integration sub-model to obtain the spliced ​​text segment; Performing a correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments through the information integration sub-model to obtain a correlation parameter, and determining a key text segment from the plurality of spliced ​​text segments based on the correlation parameter; The information integration sub-model determines the splicing order of the multiple key text segments based on the relationship between the multiple target named entities, and splices the multiple key text segments according to the splicing order to obtain the target extracted text.

10. The method according to claim 9, characterized in that The method further comprises: Obtaining sample text included in the sample letter and sample extracted text of the sample letter; Input the sample text into a pre-trained large model, and the pre-trained large model outputs the predicted extracted text of the sample letter; Based on the predicted extracted text and the sample extracted text, the pre-trained large model is fine-tuned to obtain the target large model.

11. A device for extracting incoming letter information, characterized in that: include: A recognition module is configured to perform named entity recognition on a target text carried in a target letter, and obtain target named entities corresponding to each of a plurality of target text segments of the target text; An extraction module is configured to perform relationship extraction on the plurality of target named entities to obtain the relationship between the plurality of target named entities; A first splicing module is configured to splice the target text segment and the target named entity corresponding to the target text segment to obtain a spliced ​​text segment; A determination module is configured to perform a correlation analysis on the information extraction requirements of the target letter and the spliced ​​text segments to obtain a correlation parameter, and determine a key text segment from the plurality of spliced ​​text segments based on the correlation parameter; The second splicing module is configured to determine the splicing order of the multiple key text fragments based on the relationship between the multiple target named entities, and splice the multiple key text fragments according to the splicing order to obtain the target extracted text of the target letter.

12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the incoming letter information extraction method as described in any one of claims 1-10.

13. A computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the incoming letter information extraction method as described in any one of claims 1-10.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for extracting incoming letter information as described in any one of claims 1 to 10 is implemented.