A method and apparatus for extracting information

By using party information indexes and preset trigger words in judicial documents to identify different parties, and combining this with a pre-set model to extract information, the problem of difficulty in identifying multiple parties is solved, and accurate extraction and differentiation are achieved in documents with different structures.

CN117688141BActive Publication Date: 2026-07-24BEIJING GRIDSUM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING GRIDSUM TECH CO LTD
Filing Date
2022-09-09
Publication Date
2026-07-24

Smart Images

  • Figure CN117688141B_ABST
    Figure CN117688141B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method and device of extracting information, it is related to information extraction technical field, the main purpose is to accurately identify the information of each party in different structure standard judicial document.This application mainly technical scheme is: according to party information index from target text obtains the sentence set containing party information;Different party in the target text is identified using preset trigger word from the sentence set;According to the position of each party corresponding preset trigger word in target text and context information, the to-be-identified sentence with corresponding party information is extracted;The corresponding party information is extracted from the to-be-identified sentence using preset model.This application is used in the information extraction of multiple parties in judicial document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information extraction technology, and in particular to a method and apparatus for extracting information. Background Technology

[0002] In the judicial field, the parties involved are the main body of the entire case, and their information is an essential key data. All judicial documents record the information of the parties involved. Therefore, in the process of digital transformation of the judicial industry, the information of the parties involved is the data that must be extracted. Based on the extracted information of the parties involved, it can be used to automatically populate the information of the parties involved, maintain the information of the parties involved, and build a social relationship map of the individuals.

[0003] Currently, the extraction of party information in judicial documents is based on word segmentation, entity recognition, regular expressions, and grammatical rules. For example, regular expression matching is used to find the paragraphs in the judicial documents that describe the party information. Then, assuming that this paragraph describes the information of one party, word segmentation is performed on this paragraph. Entity recognition technology is then used to identify information such as name and address. Regular expression matching is then used to identify attributes in the party information that cannot be identified by word segmentation and entity recognition technology.

[0004] However, the current extraction method first establishes a basic assumption that the section describing the parties' information only describes one party rather than multiple parties. This basic assumption relies on the fact that the structure of the judicial document is a standard document, such as a judgment document. However, for some more colloquial or non-standard documents, it is often difficult to accurately identify the information of multiple parties. For example, if two parties are described in the same section, the current method cannot identify the two parties and will also lead to confusion in the identification of the parties' attributes. Summary of the Invention

[0005] In view of the above problems, the present invention provides a method and apparatus for extracting information, the main purpose of which is to accurately identify the information of each party in judicial documents with different structural standards.

[0006] To solve the above-mentioned technical problems, the present invention proposes the following solution:

[0007] In a first aspect, the present invention provides a method for extracting information, the method comprising:

[0008] Retrieve a set of statements containing party information from the target text based on the party information index;

[0009] Different parties involved in the target text are identified from the set of statements using preset trigger words;

[0010] Extract the sentences to be identified that contain information about the corresponding party based on the position of the preset trigger words for each party in the target text and the context information.

[0011] The corresponding party information is extracted from the statement to be identified using a pre-set model.

[0012] Preferably, the step of identifying different parties involved in the target text from the set of statements using preset trigger words includes:

[0013] The preset trigger word is matched with the statements in the statement set to obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements;

[0014] Based on the position of the preset trigger word in the matched statement, obtain the context information of the preset trigger word in the matched statement;

[0015] Based on the context information of the statement, it is determined whether the parties referred to by the preset trigger words are the same. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed.

[0016] The number of parties involved is determined based on the different trigger word vectors.

[0017] Preferably, the target text is a legal document, and the step of identifying different parties in the target text from the set of statements using preset trigger words includes:

[0018] Based on the litigation status trigger words, different parties in the judicial documents are identified from the set of statements, including: plaintiff and defendant.

[0019] Preferably, the step of extracting the statement to be identified containing the corresponding party information based on the position of the preset trigger word corresponding to each party in the target text and the context information includes:

[0020] The target text is vectorized to obtain the text vector of the target text;

[0021] By concatenating the different trigger word vectors into the text vector, unique text inputs for different parties can be obtained;

[0022] Based on the position of the preset trigger word corresponding to the party in the exclusive text input corresponding to the party and the context information, extract the statement to be identified that contains the corresponding party information.

[0023] Preferably, before retrieving the set of statements containing party information from the target text based on the party information index, the method further includes:

[0024] The start and end positions of the party-specified attribute information in the preset text are marked to obtain the party's marked data;

[0025] Based on the labeled data of the parties involved, a party information index corresponding to the specified attribute information is constructed.

[0026] Preferably, after constructing a party information index corresponding to specified attribute information based on the party's labeled data, the method further includes:

[0027] The preset text is vectorized to obtain the sentence vector for each sentence;

[0028] The sentence vector is calculated using a custom model to obtain a binary classification result of 0 and 1; where 0 indicates that the sentence does not contain information about the parties involved, and 1 indicates that the sentence contains information about the parties involved.

[0029] The custom model is trained based on the binary classification results and the labeled data in the preset text to optimize the party information index.

[0030] In a second aspect, the present invention provides an apparatus for extracting information, comprising:

[0031] The first acquisition unit is used to acquire a set of statements containing party information from the target text based on the party information index;

[0032] The identification unit is used to identify different parties involved in the target text from the set of statements using preset trigger words;

[0033] The first extraction unit is used to extract the sentences to be identified that contain information about the corresponding party based on the position of the preset trigger word corresponding to each party in the target text and the context information.

[0034] The second extraction unit is used to extract the corresponding party information from the statement to be identified using a preset model.

[0035] Preferably, the identification unit includes:

[0036] The first acquisition module is used to match the preset trigger word with the statements in the statement set to obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements;

[0037] The second acquisition module is used to obtain the context information of the preset trigger word in the matched statement based on the position of the preset trigger word in the matched statement;

[0038] The construction module is used to determine whether the parties referred to by the preset trigger words are the same based on the context information of the statement. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed.

[0039] The determination module is used to determine the number of parties involved based on the different trigger word vectors.

[0040] Preferably, the identification unit is further configured to identify different parties in the judicial documents from the set of statements based on litigation status trigger words, the litigation status trigger words including: plaintiff and defendant.

[0041] Preferably, the first extraction unit includes:

[0042] The first acquisition module is used to vectorize the target text to obtain the text vector of the target text;

[0043] The second acquisition module is used to concatenate different trigger word vectors into the text vector to obtain the exclusive text input of different parties.

[0044] The extraction module is used to extract the sentences to be identified that contain the information of the party concerned based on the position of the preset trigger word corresponding to the party concerned in the exclusive text input corresponding to the party concerned and the context information.

[0045] Preferably, the device further includes:

[0046] The second acquisition unit is used to mark the start and end positions of the party-specified attribute information in the preset text to obtain the party's marked data;

[0047] The construction unit is used to construct a party information index corresponding to specified attribute information based on the labeled data of the parties.

[0048] Preferably, the device further includes:

[0049] The third acquisition unit is used to vectorize the preset text to obtain the sentence vector of each sentence;

[0050] The calculation unit is used to calculate the sentence vector using a custom model to obtain a binary classification result of 0 and 1; where 0 indicates that the sentence does not contain information about the parties involved, and 1 indicates that the sentence contains information about the parties involved.

[0051] An optimization unit is used to train the custom model based on the binary classification results and the labeled data in the preset text, so as to optimize the party information index.

[0052] To achieve the above objectives, according to a third aspect of the present invention, a storage medium is provided, the storage medium including a stored program, wherein, when the program is executed, the device where the storage medium is located is controlled to perform the information extraction method described in the first aspect.

[0053] To achieve the above objectives, according to a fourth aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, performs all or part of the steps of the means for retrieving information as described in the first aspect.

[0054] The method and apparatus for extracting information provided by this invention, based on the above technical solution, address the problem that existing methods for extracting party information from judicial documents rely on word segmentation, entity recognition, regular expressions, and grammatical rules. These methods often fail to identify distinct parties and can lead to confusion in party attribute identification. To address this, this invention obtains a set of statements containing party information from the target text based on a party information index. Then, it uses preset trigger words to identify different parties within the target text from this set of statements. Next, it extracts statements containing corresponding party information based on the position of the preset trigger words for each party within the target text and the contextual information. Finally, it uses a preset model to extract the corresponding party information from these statements. This approach distinguishes different parties in judicial documents with different structural standards and extracts statements containing only party information based on these different parties, thereby obtaining all the party's information and avoiding the problem of confused party attribute identification when dealing with judicial documents of different structural standards.

[0055] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0056] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0057] Figure 1 A flowchart of a method for extracting information provided by an embodiment of the present invention is shown;

[0058] Figure 2 A flowchart of another method for extracting information provided by an embodiment of the present invention is shown;

[0059] Figure 3 This diagram illustrates a block diagram of an information extraction device according to an embodiment of the present invention.

[0060] Figure 4 This diagram illustrates a block diagram of another information extraction apparatus provided in an embodiment of the present invention.

[0061] Figure 5 A block diagram of a device according to an exemplary embodiment is shown. Detailed Implementation

[0062] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0063] In the current digital transformation of the judicial industry, the need to populate and maintain party information, and to construct social relationship graphs, necessitates the extraction of party information. However, current extraction methods are only applicable to text paragraphs describing one party, not multiple parties. Furthermore, for documents that are colloquial or structurally irregular, it is often difficult to accurately identify multiple parties. Therefore, existing methods cannot accurately identify two parties and can lead to confusion in party attribute identification. To address this problem, the inventors devised a method that first collects a set of sentences containing party information through a party information index, and then uses preset trigger words to distinguish different parties, thus overcoming the aforementioned issues.

[0064] 101. Obtain the set of statements containing party information from the target text based on the party information index.

[0065] The target text can be a general article or a judicial document, and this step does not specify the exact type. The judicial documents include judgments, rulings, and mediation agreements. The target text contains various attribute information of the parties involved, such as gender, ethnicity, ID number, assumed address, type, and organization code. The party index describes the start and end positions of each attribute information of the parties in the target text. The set of sentences contains only sentences with party information, thus condensing a long article into a short summary containing only party information.

[0066] 102. Use preset trigger words to identify different parties involved in the target text from a set of statements.

[0067] Step 101 yields a set of statements containing only party information; the set of statements not only includes multiple parties, but also various attribute information of multiple parties, such as: litigation status (plaintiff, defendant), address, gender, etc.; in order to distinguish different parties, the preset trigger words can be selected differently as needed, and the preset trigger words can be litigation status (plaintiff, defendant), address, gender, etc., which are not specifically limited in this step.

[0068] For example:

[0069] The following is part of the judgment document: Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in a certain district of a certain city; Defendant: Li Meimei, female, Manchu nationality, born on XX / XX / XX, residing in a certain street of a certain district of a certain city.

[0070] The statement set contains a male plaintiff and a female defendant. A preset trigger word can be selected as gender. Matching gender in the statement set will yield a male and a female, thus indicating that the statement set contains two parties.

[0071] 103. Extract the sentences to be identified that contain the corresponding party information based on the position of the preset trigger words for each party in the target text and the context information.

[0072] The statement set obtained in step 101 contains multiple parties and their respective attribute information. Step 102 shows that each preset trigger word corresponds to one party, and the number of trigger words that can be matched from the statement set indicates the number of party information entries contained in the statement set. This step extracts all statements containing the party information corresponding to the trigger words in the target text based on the start and end positions and contextual information of the trigger words matched from the statement set, thus obtaining the statements to be identified with the corresponding party information. This allows for the extraction of a statement set containing only one party's information from a mixed statement set containing multiple party information entries. The resulting statements are more targeted and facilitate subsequent centralized extraction and processing of the party's attribute information, improving the efficiency of party information extraction.

[0073] For example:

[0074] For example:

[0075] Partial content of the judgment document: Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in a certain district of a certain city; Defendant: XXXXX Co., Ltd., residing in a certain street of a certain district of a certain city, organization code XXXXXX-X.

[0076] Based on the aforementioned portion of the judgment document, an address was selected as a preset trigger word. Two addresses, "a certain district in a certain city" and "a certain street in a certain district in a certain city," were matched from the aforementioned portion of the judgment document. It can be seen that there are two parties involved in the aforementioned portion of the judgment document. The party corresponding to the address "a certain district in a certain city" is designated as the first party, and the party corresponding to the address "a certain street in a certain district in a certain city" is designated as the second party.

[0077] Based on the location and context of the first party's address "a certain district in a certain city" in the judgment document, "Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in a certain district in a certain city" is the relevant attribute information of the first party. Therefore, "Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in a certain district in a certain city" is selected as the statement to be identified containing the first party's information. Similarly, based on the location and context of the second party's address "a certain street in a certain district in a certain city" in the judgment document, "Defendant: XXXXX Co., Ltd., residing in a certain street in a certain district in a certain city, organization code XXXXXX-X" is the relevant attribute information of the second party. Therefore, "Defendant: XXXXX Co., Ltd., residing in a certain street in a certain district in a certain city, organization code XXXXXX-X" is selected as the statement to be identified containing the second party's information.

[0078] 104. Use a pre-set model to extract the corresponding party information from the statement to be identified.

[0079] The pre-built model can be a sequence labeling model using an RNN architecture or a sequence labeling model using a transformer architecture; any pre-built model capable of solving the sequence labeling task is acceptable, and this step does not impose specific limitations. Using the pre-built model, it is possible to identify the specific attribute information of the party involved from the statements to be identified corresponding to that party.

[0080] Based on the above Figure 1As can be seen from the implementation of the embodiments, the present invention provides a method for extracting information. For the current method of extracting party information from judicial documents, it is necessary to assume that the paragraphs describing the party information describe only one party rather than multiple parties. This makes it difficult to accurately identify the information of multiple parties when faced with paragraphs describing multiple parties. Therefore, there are problems such as the inability to identify multiple parties and confusion in the identification of party attributes. This invention simplifies long articles into short summaries containing only party information by retrieving a set of statements containing party information from a target text based on a party information index. Then, using preset trigger words, it identifies different parties within the target text from the set of statements, thus identifying the number of parties in a short summary containing multiple parties. Next, based on the position of the preset trigger words corresponding to each party in the target text and contextual information, it extracts statements to be identified that contain only attribute information relevant to a specific target party from the short summary containing multiple parties, forming statements specifically targeting that target party. Finally, it uses a preset model to extract the corresponding party information from the statements to be identified, thus obtaining all relevant attribute information of the target party. Therefore, this invention can distinguish different parties in judicial documents with different structural standards, and extract statements containing only party information based on different parties, thereby obtaining all information about the parties, avoiding confusion in party attribute identification when dealing with judicial documents with different structural standards.

[0081] Furthermore, as a response to Figure 1 Further refinement and extension of the illustrated embodiments, this invention also provides another method for extracting information, such as... Figure 2 As shown, the specific steps are as follows:

[0082] 201. Mark the start and end positions of the party's specified attribute information in the preset text to obtain the party's annotation data.

[0083] The preset text is a batch of judicial-related texts, such as judgments, rulings, and mediation agreements. This batch of documents is annotated to obtain the party annotation data of this batch of documents. The party annotation data includes multiple parties and the start and end positions of each party's various attributes in the text.

[0084] For example:

[0085] Excerpt from the court judgment:

[0086] First-instance civil judgment in the sales contract dispute between Pang Zhi and XX Trading Co., Ltd.

[0087] XX People's Court of Foshan City, Guangdong Province

[0088] Civil judgment documents

[0089] (2016) Yue 0605 Min Chu 1301X

[0090] Plaintiff: Pang San, male, Han ethnicity, born on XX / XX / XX, residing in a certain district of a certain city; Defendant: XXX Company, residing in a certain street of a certain district of a certain city, organization code XXXXXX-X. Authorized representative: Chen Zhu, an employee of the defendant.

[0091] In the aforementioned portion of the judgment document, the starting and ending positions of the litigation status attribute "Plaintiff: Pang San" are marked as "plaintiff" and "three", and the starting and ending positions of the litigation status attribute "Defendant: XXX Company" are marked as "defendant" and "company". Similarly, the starting and ending positions of the relevant attributes of each party are marked to obtain the marked data of all parties in the aforementioned portion of the judgment document.

[0092] 202. Based on the labeled data of the parties involved, construct a party information index corresponding to the specified attribute information.

[0093] The party index describes the start and end positions of various attribute information of the parties in the target text.

[0094] Furthermore, since this invention extracts party information from target text based on a party information index, the more accurate the party information index, the higher the accuracy of the extracted party information. Therefore, before extracting party information from target text, the party information index needs to be optimized to obtain a more accurate party information index. Thus, after constructing a party information index corresponding to specified attribute information based on the party's labeled data, the invention further includes:

[0095] The preset text is vectorized to obtain a sentence vector for each sentence; a custom model is used to calculate the sentence vector to obtain a binary classification result of 0 and 1; where 0 indicates that the sentence does not contain party information, and 1 indicates that the sentence contains party information; the custom model is trained based on the binary classification result and the labeled data in the preset text to optimize the party information index.

[0096] The custom model learns to extract sentences containing party information from a preset text: First, the sentences are represented mathematically (i.e., all sentences in the preset text are vectorized using language models). The sentence vector of each sentence is then transformed by the model to obtain a binary classification result of 0 and 1, where 0 indicates that the sentence does not contain party information and 1 indicates that it does contain party information. The optimization objective is to index the party information. The custom model is trained using the cross-entropy loss function.

[0097] 203. Obtain the set of statements containing party information from the target text based on the party information index.

[0098] The same content as step 101 will not be repeated here.

[0099] The target text from step 201 is segmented into an array of complete sentences according to Chinese conventions, using periods, question marks, semicolons, exclamation marks, etc. For example, an article processed in this step yields an array containing 30 complete sentences. Since the start and end positions of multiple parties and their respective attribute information in the preset text have been marked in step 201, the sentences containing party information in the complete sentence array will contain annotations indicating the start and end positions of the party's attribute information. The party information index contains the start and end positions of each party's attribute information in the target text. Therefore, based on the start and end positions of each party's attribute information in the target text within the party information index, a set of sentences containing party information is obtained from the complete sentence array derived from the target text.

[0100] Let's take the example in step 201 as an example:

[0101] Excerpt from the court judgment:

[0102] First-instance civil judgment in the sales contract dispute between Pang Zhi and XX Trading Co., Ltd.

[0103] People's Court of XX District, Foshan City, Guangdong Province

[0104] Civil judgment documents

[0105] (2016) Yue 0605 Min Chu 1301X

[0106] Plaintiff: Pang San, male, Han ethnicity, born on XX / XX / XX, residing in XX district of XX city; Defendant: XXX Company, residing in XX street, XX district of XX city, organization code XXXXXX-X. Authorized representative: Chen Zhu, an employee of the defendant.

[0107] The content of the aforementioned judgment document is divided into six complete sentences: the first sentence "First Instance Civil Judgment on the Sales Contract Dispute between Pang Zhi and XX Trading Co., Ltd.", the second sentence "People's Court of XX District, Foshan City, Guangdong Province", the third sentence "Civil Judgment Document", the fourth sentence "Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in XX District, XX City", the fifth sentence "Defendant: XXX Company, residing in XX Street, XX District, XX City, organization code XXXXXX-X", and the sixth sentence "Agent: Chen Zhu, an employee of the defendant".

[0108] Taking the example in step 201 as an example, the party information index contains the start and end positions of various attribute information of the parties in the target text, including the start and end positions of the litigation status attribute "Plaintiff: Pang San" marked as "plaintiff" and "three", and the start and end positions of the litigation status attribute "Defendant: XXX Company" as "defendant" and "company", etc. Therefore, based on the party information index, the fourth and fifth sentences are matched from the array of the six whole sentences to be statements containing party information, and the fourth and fifth sentences are extracted and set to obtain a set of statements containing party information.

[0109] 204. Use preset trigger words to identify different parties involved in the target text from the set of statements.

[0110] The same content as step 102 will not be repeated here.

[0111] Although step 203 yields a set of statements containing party information, this set only reflects statements containing party information, and each statement may contain only one party or multiple parties. Therefore, the set does not indicate the specific number of parties involved. This next step aims to identify the number of parties in the set of statements. The specific steps are as follows:

[0112] The preset trigger words are matched with the statements in the statement set to obtain the statements that match the preset trigger words and the position of the preset trigger words in the matched statements. Based on the position of the preset trigger words in the matched statements, the context information of the preset trigger words in the matched statements is obtained. Based on the context information of the preset trigger words in the statements, it is determined whether the parties referred to by the preset trigger words are the same. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed. The number of parties is determined based on the different trigger word vectors. The recognition process can be carried out by constructing a sequence labeling model, with the optimization goal of recognizing the positions of these manually labeled trigger words. Applying the trained sequence labeling model to the recognition process of different parties in the target text from the statement set can improve the recognition efficiency.

[0113] Among these methods, identifying different parties in judicial documents from the set of statements based on litigation status trigger words is the optimal solution. This makes it easier to distinguish between different parties because there may be two plaintiffs in the target text who have the same home address, age, gender, etc. In this case, if the preset trigger words are not selected properly, the information of two different parties may be mistaken for the information of one party, leading to confusion in the identification of the party's attributes. The litigation status trigger words include: plaintiff and defendant. Different parties can be distinguished based on the names following the plaintiff and defendant.

[0114] For example:

[0115] The set of statements includes the third sentence of the target text: "Plaintiff: Pang San, male, Han nationality, born on XX / XX / XX, residing in XX District, XX City", the fourth sentence: "Plaintiff: Pang Si, male, Han nationality, born on XX / XX / XX, residing in XX District, XX City", and the fifth sentence: "Defendant: XXX Company, residing in XX Street, XX District, XX City, organization code XXXXXX-X".

[0116] The plaintiff and defendant in the litigation are selected as preset trigger words. Matching is performed in the statement set to obtain two plaintiffs and one defendant. The preceding information of the first plaintiff is empty, and the following information is "Pang San". The preceding information of the second plaintiff is "Qu", and the following information is "Pang Si". Based on the usage position and context information of the plaintiff Pang San and plaintiff Pang Si, respectively, the vectors of plaintiff Pang San and plaintiff Pang Si are constructed. The defendant is the third party, because the defendant and the plaintiff are necessarily not the same party. Similarly, based on the usage position and context information of defendant XXX Company, the vector of defendant XXX Company is constructed, thus obtaining three different preset trigger word vectors. Therefore, there are three parties.

[0117] 205. Extract the sentences to be identified that contain the corresponding party information based on the position of the preset trigger words for each party in the target text and the context information.

[0118] The same content as step 103 will not be repeated here.

[0119] This step first vectorizes the target text to obtain the text vector of the target text; then, the different trigger word vectors obtained in step 204 are concatenated into the text vector to obtain the exclusive text input of different parties; then, based on the position of the preset trigger word corresponding to the party in the exclusive text input of the party and the context information, the statement to be identified with the corresponding party information is extracted.

[0120] 206. Use a pre-set model to extract the corresponding party information from the statement to be identified.

[0121] The same content as step 104 will not be repeated here.

[0122] Based on the above Figure 2 As can be seen from the implementation method, this invention provides a method for extracting information. This invention obtains party annotation data by marking the start and end positions of specified attribute information of the parties in a preset text; then, based on the party annotation data, it constructs a party information index corresponding to the specified attribute information, and optimizes it through a model to improve the accuracy of the party information index. The more accurate the party information index, the more accurate the party information extracted based on it; then, it obtains a set of sentences containing party information from the target text according to the party information index; and uses preset trigger words to identify different parties in the target text from the set of sentences, specifically through litigation status trigger words. Distinguishing between different parties is the best solution, avoiding confusion in party identification when two parties share most of the same attributes. Then, based on the position of each party's corresponding preset trigger word in the target text and contextual information, extract statements containing the corresponding party information. This further focuses on attributes relevant to each party. A pre-defined model is then used to extract the corresponding party information from these statements. Therefore, this invention distinguishes different parties in judicial documents with different structural standards, extracts statements containing only party information based on different parties, and then obtains all the information of the parties, avoiding confusion in party attribute identification when dealing with judicial documents with different structural standards.

[0123] Furthermore, as a response to the above Figure 1 In addition to the implementation of the method shown, this embodiment of the invention also provides an apparatus for extracting information, used for the above-described... Figure 1 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 3 As shown, the device includes:

[0124] The first acquisition unit 31 is used to acquire a set of statements containing party information from the target text based on the party information index;

[0125] The identification unit 32 is used to identify different parties in the target text from the set of statements obtained by the first acquisition unit 31 using preset trigger words;

[0126] The first extraction unit 33 is used to extract the sentence to be identified with the corresponding party information based on the position of the preset trigger word corresponding to each party in the target text and the context information obtained from the identification unit 32;

[0127] The second extraction unit 34 is used to extract the corresponding party information from the statement to be identified obtained by the first extraction unit 33 using a preset model.

[0128] Furthermore, as a response to the above Figure 2 In addition to the method shown, this embodiment of the invention also provides another device for extracting information, used for the above-described method. Figure 2 The method shown is implemented accordingly. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 4 As shown, the device includes:

[0129] The second acquisition unit 35 is used to mark the start and end positions of the party-specified attribute information in the preset text to obtain the party's marked data.

[0130] Construction unit 36 ​​is used to construct a party information index corresponding to specified attribute information based on the labeled data of the party obtained from the second acquisition unit 35;

[0131] The third acquisition unit 37 is used to vectorize the preset text to obtain the sentence vector of each sentence;

[0132] The calculation unit 38 is used to calculate the binary classification result of 0 and 1 from the sentence vector obtained from the third acquisition unit 37 through a custom model; where 0 indicates that the sentence does not contain party information and 1 indicates that the sentence contains party information.

[0133] The optimization unit 39 is used to train the custom model based on the binary classification result obtained from the calculation unit 38 and the labeled data in the preset text obtained from the second acquisition unit 35, so as to optimize the party information index obtained from the construction unit 36;

[0134] The first acquisition unit 31 is used to acquire a set of sentences containing party information from the target text according to the party information index obtained from the optimization unit 39;

[0135] The identification unit 32 is used to identify different parties in the target text from the set of statements obtained by the first acquisition unit 31 using preset trigger words;

[0136] The first extraction unit 33 is used to extract the sentence to be identified with the corresponding party information based on the position of the preset trigger word corresponding to each party in the target text and the context information obtained from the identification unit 32;

[0137] The second extraction unit 34 is used to extract the corresponding party information from the statement to be identified obtained by the first extraction unit 33 using a preset model.

[0138] Furthermore, the identification unit 32 includes:

[0139] The first acquisition module 321 is used to match the preset trigger word with the statements in the statement set respectively, and obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements;

[0140] The second acquisition module 322 is used to obtain the context information of the preset trigger word in the matched statement based on the position of the preset trigger word in the matched statement obtained by the first acquisition module 321;

[0141] The construction module 323 is used to determine whether the parties referred to by the preset trigger words are the same based on the context information of the statement obtained from the second acquisition module 322. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed.

[0142] The determining module 324 is used to determine the number of parties based on the different trigger word vectors obtained from the constructing module 323.

[0143] Furthermore, the identification unit 32 is also used to identify different parties in the judicial documents from the set of statements based on litigation status trigger words, including: plaintiff and defendant.

[0144] Furthermore, the first extraction unit 33 includes:

[0145] The first acquisition module 331 is used to vectorize the target text to obtain the text vector of the target text;

[0146] The second acquisition module 332 is used to concatenate different trigger word vectors into the text vectors obtained from the first acquisition module 331 to obtain exclusive text inputs for different parties.

[0147] The extraction module 333 is used to extract the statement to be identified that has the corresponding party information based on the position of the preset trigger word corresponding to the party in the exclusive text input corresponding to the party obtained from the second acquisition module 332 and the context information.

[0148] Figure 5 This is a block diagram illustrating a device 30 according to an exemplary embodiment. The device 30 includes at least one processor 401, at least one memory 402 connected to the processor 401, and a bus 403; wherein the processor 401 and the memory 402 communicate with each other via the bus 403. The processor 401 is used to call program instructions in the memory 402 to execute the aforementioned data sharing method. The device described herein can be a server (e.g., a local server or a cloud server), a smartphone, tablet computer, PDA, portable computer, or a fixed terminal such as a desktop computer.

[0149] The information extraction device includes a processor and a memory. The first acquisition unit, identification unit, first extraction unit, second extraction unit, second acquisition unit, construction unit, third acquisition unit, calculation unit, and optimization unit are all stored in the memory as program units. The processor executes the program units stored in the memory to achieve the corresponding functions.

[0150] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, the information of each party can be accurately identified in legal documents with different structural standards, providing extracted information through logical relationships.

[0151] This invention provides a storage medium storing a program that, when executed by a processor, implements the method for extracting information.

[0152] This invention provides a processor for running a program, wherein the program executes the method for extracting information during runtime.

[0153] This invention provides a device including at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the aforementioned method for extracting information. The device described herein may be a server, PC, PAD, mobile phone, etc.

[0154] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps:

[0155] Retrieve a set of statements containing party information from the target text based on the party information index;

[0156] Different parties involved in the target text are identified from the set of statements using preset trigger words;

[0157] Extract the sentences to be identified that contain information about the corresponding party based on the position of the preset trigger words for each party in the target text and the context information.

[0158] The corresponding party information is extracted from the statement to be identified using a pre-set model;

[0159] The step of identifying different parties involved in the target text from the set of statements using preset trigger words includes:

[0160] The preset trigger word is matched with the statements in the statement set to obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements;

[0161] Based on the position of the preset trigger word in the matched statement, obtain the context information of the preset trigger word in the matched statement;

[0162] Based on the context information of the statement, it is determined whether the parties referred to by the preset trigger words are the same. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed.

[0163] The number of parties involved is determined based on the different trigger word vectors;

[0164] The target text is a legal document, and the step of identifying different parties involved in the target text from the set of statements using preset trigger words includes:

[0165] Based on the litigation status trigger words, different parties in the judicial documents are identified from the set of statements, including: plaintiff and defendant;

[0166] The step of extracting the statement to be identified based on the position of the preset trigger word corresponding to each party in the target text and the context information includes:

[0167] The target text is vectorized to obtain the text vector of the target text;

[0168] By concatenating the different trigger word vectors into the text vector, unique text inputs for different parties can be obtained;

[0169] Based on the position of the preset trigger word corresponding to the party in the exclusive text input corresponding to the party and the context information, extract the sentence to be identified that has the corresponding party information;

[0170] Before retrieving the set of statements containing party information from the target text based on the party information index, the method further includes:

[0171] The start and end positions of the party-specified attribute information in the preset text are marked to obtain the party's marked data;

[0172] Based on the labeled data of the parties involved, a party information index corresponding to the specified attribute information is constructed;

[0173] After constructing a party information index corresponding to specified attribute information based on the labeled data of the parties, the method further includes:

[0174] The preset text is vectorized to obtain the sentence vector for each sentence;

[0175] The sentence vector is calculated using a custom model to obtain a binary classification result of 0 and 1; where 0 indicates that the sentence does not contain information about the parties involved, and 1 indicates that the sentence contains information about the parties involved.

[0176] The custom model is trained based on the binary classification results and the labeled data in the preset text to optimize the party information index.

[0177] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0178] In a typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input / output interfaces, network interfaces, etc.

[0179] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.

[0180] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0181] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0182] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0183] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for extracting information, characterized in that, The method includes: Retrieve a set of statements containing party information from the target text based on the party information index; Different parties involved in the target text are identified from the set of statements using preset trigger words; Extract the sentences to be identified that contain information about the corresponding party based on the position of the preset trigger words for each party in the target text and the context information. The corresponding party information is extracted from the statement to be identified using a pre-set model; The step of identifying different parties involved in the target text from the set of statements using preset trigger words includes: The preset trigger word is matched with the statements in the statement set to obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements; Based on the position of the preset trigger word in the matched statement, obtain the context information of the preset trigger word in the matched statement; Based on the context information of the statement, it is determined whether the parties referred to by the preset trigger words are the same. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed. The number of parties involved is determined based on the different trigger word vectors; The step of extracting the statement to be identified based on the position of the preset trigger word corresponding to each party in the target text and the context information includes: The target text is vectorized to obtain the text vector of the target text; By concatenating the different trigger word vectors into the text vector, unique text inputs for different parties can be obtained; Based on the position of the preset trigger word corresponding to the party in the exclusive text input corresponding to the party and the context information, extract the sentence to be identified that has the corresponding party information; Before retrieving the set of statements containing party information from the target text based on the party information index, the method further includes: The start and end positions of the party-specified attribute information in the preset text are marked to obtain the party's marked data; Based on the labeled data of the parties involved, a party information index corresponding to the specified attribute information is constructed.

2. The method according to claim 1, characterized in that, The target text is a legal document, and the step of identifying different parties involved in the target text from the set of statements using preset trigger words includes: Based on the litigation status trigger words, different parties in the judicial documents are identified from the set of statements, including: plaintiff and defendant.

3. The method according to claim 1, characterized in that, After constructing a party information index corresponding to specified attribute information based on the labeled data of the parties, the method further includes: The preset text is vectorized to obtain the sentence vector for each sentence; The sentence vector is calculated using a custom model to obtain a binary classification result of 0 and 1; where 0 indicates that the sentence does not contain information about the parties involved, and 1 indicates that the sentence contains information about the parties involved. The custom model is trained based on the binary classification results and the labeled data in the preset text to optimize the party information index.

4. An apparatus for extracting information, characterized in that, include: The first acquisition unit is used to acquire a set of statements containing party information from the target text based on the party information index; The identification unit is used to identify different parties involved in the target text from the set of statements using preset trigger words; The first extraction unit is used to extract the sentences to be identified that contain information about the corresponding party based on the position of the preset trigger word corresponding to each party in the target text and the context information. The second extraction unit is used to extract the corresponding party information from the statement to be identified using a preset model; The identification unit includes: The first acquisition module is used to match the preset trigger word with the statements in the statement set to obtain the statements that match the preset trigger word and the position of the preset trigger word in the matched statements; The second acquisition module is used to obtain the context information of the preset trigger word in the matched statement based on the position of the preset trigger word in the matched statement; The construction module is used to determine whether the parties referred to by the preset trigger words are the same based on the context information of the statement. If they are the same, the same preset trigger word vector is constructed; if they are different, different preset trigger word vectors are constructed. The determination module is used to determine the number of parties involved based on the different trigger word vectors; The step of extracting the statement to be identified based on the position of the preset trigger word corresponding to each party in the target text and the context information includes: The target text is vectorized to obtain the text vector of the target text; By concatenating the different trigger word vectors into the text vector, unique text inputs for different parties can be obtained; Based on the position of the preset trigger word corresponding to the party in the exclusive text input corresponding to the party and the context information, extract the sentence to be identified that has the corresponding party information; Before retrieving the set of statements containing party information from the target text based on the party information index, the method further includes: The start and end positions of the party-specified attribute information in the preset text are marked to obtain the party's marked data; Based on the labeled data of the parties involved, a party information index corresponding to the specified attribute information is constructed.

5. A storage medium comprising a stored program, wherein, When the program is running, it controls the device containing the storage medium to perform the information extraction method according to any one of claims 1 to 3.

6. An electronic device, characterized in that, include: At least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; The processor is used to invoke program instructions in the memory to execute the information extraction method according to any one of claims 1 to 3.