Legal document generation method and system based on online mediation information data

By calculating the screening index and right confirmation index of entity vocabulary in the generation of legal documents, an accurate triple is constructed, and combined with deep learning models, the problem of low accuracy of entity relationships in the existing technology is solved, and the legal documents are improved Generate accuracy.

CN119203946AActive Publication Date: 2024-12-27HUNAN GUANWEN TECH SERVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411718268.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-27
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

When generating legal documents summary, the prior art has low accuracy in the triple of entity relationship links due to insufficient consideration of vocabulary distribution, which affects the accuracy of the documents.

Method used

By obtaining the initial entity vocabulary and statements in the online mediation record of the case, calculate the entity screening index and the ternary entity right confirmation index of each entity, filter out the accurate party entity vocabulary and entity vocabulary group, and construct the More accurate triplets and generate legal instrument summary using deep learning models and graph attention models.

Benefits of technology

It improves the accuracy of the legal document summary, ensures that the content of the generated document is closer to the practical significance, and solves the problem of low accuracy in triplet construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203946A_ABST
    Figure CN119203946A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, in particular to a legal instrument generation method and system based on online mediation information data. According to the local occurrence frequency of each initial entity vocabulary in each statement and the overall occurrence frequency of each initial entity vocabulary in all statements, evaluating a current entity screening index of each initial entity vocabulary so as to screen out the required current entity vocabulary; based on the characteristic that the relation between different parties in the mediation process needs more vocabularies to describe; according to the number of all initial entity vocabularies between each entity vocabulary group and each other entity vocabulary group and the overall size of current entity screening indexes, a ternary entity right determination index between the entity vocabulary groups is evaluated, and on this basis, more accurate triple construction is carried out. And the accuracy of the generated abstract text of the legal instrument is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method and system for generating legal documents based on online mediation information data. Background Art

[0002] When generating legal documents based on online mediation information data, due to the different angles of description of the factual information in the case by the plaintiff, defendant and mediator in the mediation information, it is easy to cause errors in the relationship between the corresponding named entities when the factual information of the legal document summary text is generated; for example, the original text is: Plaintiff A and Defendant B have a contract dispute. Plaintiff A filed a lawsuit with this court on February 27, 2021; the possible erroneous summary is: Plaintiff B sued Defendant A; and the correct summary is: Plaintiff A sued Defendant B.

[0003] The prior art connects entity relationships by splitting up the triples of mediation information, i.e., entity-relationship-entity, and combines each triple to generate a summary text of a legal document. However, the actual extracted triples are only extracted by splitting up the mediation information without considering the vocabulary distribution, which results in low accuracy of the main entities screened out by the sentence, causing the generated triples to deviate from the actual meaning, thereby making the accuracy of the triples obtained by directly splitting up the mediation information insufficient. That is, the accuracy of the triples constructed only by splitting up the mediation information in the prior art is low, resulting in low accuracy of the generated summary text of the legal document. Summary of the invention

[0004] In order to solve the technical problem that the accuracy of the triples constructed by splitting mediation information in the prior art is low, resulting in low accuracy of the generated legal document summary text, the present application provides a legal document generation method and system based on online mediation information data, and the technical solution adopted is as follows: The first aspect of the present application provides a method for generating a legal document based on online mediation information data, comprising: Obtain all initial entity words and all sentences in the online mediation record communication text of the case; Determine the party entity screening index of each initial entity word in each sentence according to the local occurrence frequency of each initial entity word in each sentence and the overall occurrence frequency in all sentences; screen out all party entity words in each sentence according to the numerical distribution of the party entity screening index of each initial entity word in each sentence; In each sentence, at least two entity vocabulary groups are screened out according to the continuous distribution of the positions of the entity vocabulary of each party; the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence is determined according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index of the party; According to the ternary entity title confirmation index and the distribution of the actual entity screening index in each sentence, a triplet of each sentence is constructed; and a legal document summary text is generated according to the triplet of all sentences in the online mediation record communication text of the case.

[0005] Furthermore, the process of acquiring the initial entity vocabulary includes: Remove stop words and perform word segmentation processing on the online mediation record communication text to determine the pre-processed text; All initial entity words in the preprocessed text are filtered out through the named entity recognition tool.

[0006] Furthermore, the acquisition process of the statement includes: The preprocessed text is divided into at least two sentences using Chinese punctuation marks and periods as intervals.

[0007] Furthermore, the process of obtaining the current entity screening index includes: Each initial entity word is taken as the target entity word in turn; the maximum number of occurrences of all initial entity words in each sentence is taken as the maximum word frequency of each sentence; Determining the sentence reference frequency of the target entity vocabulary in each sentence according to the ratio between the number of occurrences of the target entity vocabulary in each sentence and the maximum value of the vocabulary frequency; The number of all sentences in which the target entity vocabulary appears is used as the target reference number; and the inter-sentence reference frequency of the target entity vocabulary is determined according to the ratio between the target reference number and the total number of all sentences; The current entity screening index of the target entity vocabulary in each sentence is determined according to the product of the reference frequency within the sentence and the reference frequency between the sentences.

[0008] Furthermore, the process of acquiring the party entity vocabulary includes: Arrange all the initial entity words in each sentence in descending order of the corresponding current entity screening index to obtain an initial entity word sequence for each sentence; use the sequence consisting of the first preset number of initial entity words in the initial entity word sequence in descending order of the current entity screening index as the reference entity word sequence for each sentence; Taking the first initial entity word in the reference entity word sequence as the first party word; In the reference entity vocabulary sequence, the difference between the actual entity screening index of each initial entity vocabulary and the actual entity screening index of the next initial entity vocabulary is used as the screening index span value of each initial entity vocabulary; among all initial entity vocabulary except the first two initial entity vocabulary in the reference entity vocabulary sequence, the initial entity vocabulary with the largest screening index span value is used as the second party vocabulary; The first party vocabulary, the second party vocabulary, and all initial entity vocabulary between the first party vocabulary and the second party vocabulary are used as all party entity vocabulary in each sentence.

[0009] Furthermore, the process of acquiring the entity vocabulary group includes: In each sentence, all mutually adjacent entity words of the parties are merged to obtain all merged word groups; the merged word group and each entity word of the party outside the merged word group are regarded as entity word groups.

[0010] Furthermore, the process of obtaining the ternary entity confirmation index includes: In each sentence, each entity vocabulary group is taken as the target vocabulary group in turn; each entity vocabulary group other than the target vocabulary group is taken as the comparison vocabulary group; In each sentence, all initial entity words between the target vocabulary group and each contrasting vocabulary group are taken as the corresponding contrasting entity words; the ratio between the number of all contrasting entity words and the total number of initial entity words in each sentence is taken as the entity connection evaluation value between the target vocabulary group and each contrasting vocabulary group; The ratio between the cumulative value of the actual entity screening index of all contrasting entity words and the cumulative value of the actual entity screening index of all initial entity words in each sentence is used as the screening index evaluation value between the target vocabulary group and each contrasting vocabulary group; According to the product between the entity connection evaluation value and the screening index evaluation value, a triple entity confirmation index between the target vocabulary group and each comparison vocabulary group is determined.

[0011] Furthermore, the process of obtaining the triplet includes: In each sentence, the two entity vocabulary groups corresponding to the largest triple entity confirmation index are taken as triple elements; In each sentence, the initial entity vocabulary with the largest entity entity screening index among all initial entity vocabulary of non-party entity vocabulary between two triple elements is used as the triple element of each sentence; Arrange the triplet elements of each statement in the order of the statements to determine the triplet of each statement.

[0012] Furthermore, the process of generating a legal document summary text based on the triples of all sentences in the online mediation record communication text of the case includes: Input each triple into the trained deep learning model and output the short sentence corresponding to each triple; Taking the triple of each sentence as a node, converting all the triples of the sentences into a graph structure to obtain an undirected graph corresponding to the online mediation record communication text; based on the constructed knowledge graph, using the pre-trained graph attention model to extract the knowledge feature vector in the undirected graph; The short sentences of each triple involved are sorted according to the node order described by the knowledge feature vector to determine the abstract text of the legal document.

[0013] In a second aspect, the present application provides a legal document generation system based on online mediation information data, the system comprising: A data acquisition module, used to acquire all initial entity words and all sentences in the online mediation record communication text of the case; The party entity vocabulary screening module is used to determine the party entity screening index of each initial entity vocabulary in each sentence according to the local occurrence frequency of each initial entity vocabulary in each sentence and the overall occurrence frequency in all sentences; according to the numerical distribution of the party entity screening index of each initial entity vocabulary in each sentence, screen out all the party entity vocabulary in each sentence; A ternary entity confirmation index determination module is used to screen out at least two entity vocabulary groups in each sentence according to the continuous distribution of the positions of the entity vocabulary of each party; and to determine the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index of the party; The legal document summary text generation module is used to construct a triplet of each sentence based on the triple entity confirmation index and the distribution of the actual entity screening index in each sentence; and to generate a legal document summary text based on the triplet of all sentences in the online mediation record communication text of the case.

[0014] In a third aspect, the present application provides a computer device, comprising a memory and a processor. The memory is used to store computer program code, and the processor is used to call and run the computer program code from the memory to execute the method of the first aspect of the present application or any embodiment of the first aspect.

[0015] In a fourth aspect, the present application provides a computer program product, comprising a computer program code, which, when executed, performs the method of the first aspect of the present application or any embodiment of the first aspect.

[0016] In a fifth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed, the method of the first aspect or any embodiment of the first aspect of the present application is performed.

[0017] This application has the following beneficial effects: Firstly, taking into account the high frequency of entity words representing the parties in the mediation record communication text, the party entity screening index of each initial entity word is evaluated according to the local frequency of occurrence of each initial entity word in each sentence and the overall frequency of occurrence in all sentences, so as to screen out the required party entity words; then, based on the characteristic that the connection between different party entities in the mediation process requires more words to describe, the ternary entity title confirmation index between entity vocabulary groups is evaluated according to the number of all initial entity words between each entity vocabulary group and each other entity vocabulary group and the overall size of the party entity screening index, and on this basis, a more accurate triple is constructed, which solves the problem of low accuracy of triples constructed only by splitting mediation information in the prior art, and makes the generated legal document summary text more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flow chart of a method for generating a legal document based on online mediation information data provided by one embodiment of the present invention; Figure 2 A structural diagram of a legal document generation system based on online mediation information data provided by one embodiment of the present invention; Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of the method and system for generating legal documents based on online mediation information data proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment, and the specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0021] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0022] The following is a detailed description of a specific solution of a method and system for generating legal documents based on online mediation information data provided by the present invention in conjunction with the accompanying drawings.

[0023] This application embodiment provides a method for generating legal documents based on online mediation information data. Figure 1 , which shows a flow chart of a method for generating a legal document based on online mediation information data provided by an embodiment of the present invention, the method comprising: Step S101: Obtain all initial entity words and all sentences in the online mediation record communication text of the case.

[0024] First, the online mediation record communication text of the case is obtained with the help of the online mediation system program; the online mediation record communication text is usually the communication text obtained by the mediator continuing to record the mediation information recorded during the mediation process.

[0025] Mediation record information, that is, online mediation record communication text, generally has a part that describes the subject's behavior or cause, so its structure is very consistent with the construction benchmark of triples; for example: Plaintiff A filed a lawsuit to confirm that the house rental contract signed by Defendant B is invalid; the corresponding triple is: Plaintiff A, invalid contract, Defendant B. That is, the information recorded in the online mediation record communication text presents an entity-relationship-entity structure in the sentence, so by extracting the triples, the text structure can be simplified while retaining the semantics.

[0026] When constructing a triple, it is necessary to consider that the triple usually corresponds to three entity words; therefore, it is necessary to first obtain all the initial entity words in the online mediation record communication text of the case. Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the initial entity words includes: The online mediation record communication text is processed by removing stop words and word segmentation to determine the preprocessed text; first, through text preprocessing means, that is, removing stop words and word segmentation, the obtained preprocessed text can avoid the influence of stop words that do not carry special semantics and appear frequently on the accuracy of text analysis, and divide the continuous character sequence into meaningful single words, so that the subsequent analysis is clearer. In a specific implementation of an embodiment of the present invention, the word segmentation process adopts the Jieba word segmentation algorithm. It should be noted that the removal of stop words and the Jieba word segmentation algorithm are natural language processing technical means well known to those skilled in the art, and will not be further elaborated here.

[0027] All initial entity words in the preprocessed text are further screened out through named entity recognition tools. Named Entity Recognition (NER) is a basic method in natural language processing with a wide range of applications. It can annotate entity attributes of each word in a vocabulary sequence, such as names, places, organizations, time, etc., so as to determine all the required initial entity words. It should be noted that NER is a technical means well known to those skilled in the art and will not be further elaborated here.

[0028] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the statement includes: The preprocessed text is divided into at least two sentences using Chinese punctuation marks and periods as separators; using the period as a separator enables each sentence to represent a complete paragraph, making the semantics of the triple representation of each sentence obtained subsequently more complete.

[0029] Step S102: Determine the party entity screening index of each initial entity vocabulary in each sentence based on the local occurrence frequency of each initial entity vocabulary in each sentence and the overall occurrence frequency in all sentences; filter out all party entity vocabulary in each sentence based on the numerical distribution of the party entity screening index of each initial entity vocabulary in each sentence.

[0030] Since mediation is often the mediation of conflicts between several parties, it is necessary to filter out the entity names represented by the parties, that is, party entity vocabulary, from the current information; and mediation information is mainly recorded by party entity vocabulary around the disputed matters, so the frequency of party entity vocabulary is relatively high and usually runs through the entire text; therefore, each initial entity vocabulary in each sentence can be evaluated based on this feature, and all party entity vocabulary can be filtered out through the party entity screening index obtained by the evaluation.

[0031] Preferably, the process of obtaining the entity screening index includes: Take each initial entity vocabulary as the target entity vocabulary in turn; take the maximum number of occurrences of all initial entity vocabulary in each sentence as the maximum lexical frequency of each sentence; determine the in-sentence reference frequency of the target entity vocabulary in each sentence according to the ratio between the number of occurrences of the target entity vocabulary in each sentence and the maximum lexical frequency. Normalize the number of occurrences of the target entity vocabulary by the maximum lexical frequency, so that the value range of the obtained in-sentence reference frequency is limited to 0 to 1, thereby unifying the dimension of the in-sentence reference frequency obtained in different sentences and different scenarios, so as to ensure the robustness of the calculated current entity screening index. The greater the number of occurrences of the corresponding target entity vocabulary, that is, the greater the in-sentence reference frequency, the higher the evaluation of the target entity vocabulary on the current entity screening index.

[0032] The number of all sentences in which the target entity vocabulary appears is taken as the target reference number; the inter-sentence reference frequency of the target entity vocabulary is determined based on the ratio between the target reference number and the total number of all sentences. The greater the inter-sentence reference frequency, the more widely the target entity vocabulary is distributed in all sentences of the entire text, which means that it is more consistent with the characteristics throughout the entire text, which means that the target entity vocabulary is evaluated higher on the current entity screening index.

[0033] Further, according to the characteristic that the greater the reference frequency within a sentence and the greater the reference frequency between sentences, the higher the evaluation on the corresponding current entity screening index, the current entity screening index of the target entity vocabulary in each sentence is determined according to the product of the reference frequency within a sentence and the reference frequency between sentences. In a specific implementation of an embodiment of the present invention, the process of obtaining the current entity screening index is expressed by the formula: ;in, For the Entity words in sentences The entity screening index of the current entity; For the Entity words in sentences The number of occurrences of For the The maximum number of occurrences of all initial entity words in the sentence, that is, The maximum value of the vocabulary frequency of the sentences; For entity words The number of all statements; is the total number of all statements; For the Entity words in sentences The frequency of reference within the sentence; Entity vocabulary The frequency of references between sentences.

[0034] Further, based on the characteristic that the party entity screening index of the party entity vocabulary is usually large, combined with the numerical distribution of the party entity screening index of each initial entity vocabulary in each sentence, the party entity vocabulary is screened out.

[0035] Preferably, in a specific implementation of the embodiment of the present invention, the process of acquiring the party entity vocabulary includes: Arrange all the initial entity words in each sentence in the order of the corresponding current entity screening index from large to small to obtain the initial entity vocabulary sequence of each sentence; the sequence composed of the first preset number of initial entity words in the initial entity vocabulary sequence in the order of the current entity screening index from large to small is used as the reference entity vocabulary sequence of each sentence. Each initial entity word in the reference entity vocabulary sequence is essentially a preset number of initial entity words with the largest current entity screening index. Therefore, by obtaining the reference entity vocabulary sequence, the scope of subsequent party vocabulary screening can be reduced and the accuracy of screening can be improved. In a specific implementation of an embodiment of the present invention, the preset number is set to 6. It should be noted that when the number of initial entity words in the initial entity vocabulary sequence is less than 6 but greater than or equal to 3, all the initial entity words are arranged to obtain the initial entity vocabulary sequence; when the initial entity words in the initial entity vocabulary sequence are less than 3, it is considered that the corresponding sentence information is insufficient, and no subsequent analysis is performed, that is, the corresponding initial entity vocabulary arrangement is not obtained.

[0036] The first initial entity vocabulary in the reference entity vocabulary sequence is taken as the first party vocabulary; in the reference entity vocabulary sequence, the difference between the party entity screening index of each initial entity vocabulary and the party entity screening index of the next initial entity vocabulary is taken as the screening index span value of each initial entity vocabulary; among all initial entity vocabulary except the first two initial entity vocabulary in the reference entity vocabulary sequence, the initial entity vocabulary with the largest screening index span value is taken as the second party vocabulary. The first party vocabulary, the second party vocabulary, and all initial entity vocabulary between the first party vocabulary and the second party vocabulary are taken as all party entity vocabulary in each sentence. Since the reference entity vocabulary sequence arranges the initial entity vocabulary from large to small according to the party entity screening index, the initial entity vocabulary with the largest screening index span value can be used as a boundary to separate the party entity vocabulary with a larger party entity screening index before the second party vocabulary. In the process of acquiring the second party vocabulary, the reason why all initial entity vocabularies except the first two initial entity vocabularies are screened is that when the first initial entity vocabulary and the second initial entity vocabulary are the initial entity vocabularies with the largest screening index span value, the number of party entity vocabularies obtained will be less than 3, resulting in the inability to form a triple.

[0037] Step S103: In each sentence, at least two entity vocabulary groups are screened out according to the continuous distribution of the positions of the entity vocabulary of each party; the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence is determined according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index.

[0038] It is necessary to consider that in some sentences, there may be a situation where the entities of the parties are in a partnership relationship. Therefore, it is necessary to merge the entity words of the parties according to their positions, so as to filter out each independent entity word group. For example: Company C acts as a guarantor and pays a deposit of RMB 2.3 million to sign a guarantee contract with Company D and Company E. Among them, if Company D and Company E are adjacent and are partners, they can be merged into one entity group, that is, Company D and Company E correspond to one entity group.

[0039] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the entity vocabulary group includes: In each sentence, all the adjacent party entity words are merged to obtain all the merged word groups; the merged word group and each party entity word outside the merged word group are regarded as entity word groups. The essence is to regard the adjacent party entity words as a partner, combination or overall object to accurately reflect the partner relationship of the party entities; if the initial entity words adjacent to the corresponding party entity words are not party entity words, the corresponding party entity words are considered to be independent and do not reflect the partner relationship in the corresponding sentence, so they are also analyzed as entity word groups.

[0040] Since the mediation process needs to describe the connection between different party entities, more other words are needed to describe the causes between the parties. Therefore, the number of initial entity words between entity vocabulary groups can be combined to represent the entity connection relationship between the parties. In addition, between any two entity vocabulary groups, if the overall party entity screening index of each initial entity vocabulary is larger, it means that the connection represented by the corresponding two entity vocabulary groups is more consistent with the actual mediation record information, and the corresponding weight as a triple element is also greater.

[0041] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the ternary entity ownership index includes: In each sentence, each entity vocabulary group is taken as the target vocabulary group in turn; each entity vocabulary group other than the target vocabulary group is taken as the comparison vocabulary group. By analyzing the triple entity confirmation index between the target vocabulary group and the comparison vocabulary group, the triple entity confirmation index between any two entity vocabulary groups in all entity vocabulary groups is generally referred to, making the analysis process clearer.

[0042] In each sentence, all initial entity words between the target vocabulary group and each comparison vocabulary group are taken as the corresponding comparison entity words; the ratio between the number of all comparison entity words and the total number of initial entity words in each sentence is taken as the entity connection evaluation value between the target vocabulary group and each comparison vocabulary group. The larger the number of comparison entity words, that is, the larger the entity connection evaluation value, the more initial entity words there are between the target vocabulary group and the comparison vocabulary group, the more likely the content between the target vocabulary group and the comparison vocabulary group is to correspond to the description of the cause of the event, and the greater the possibility that the target vocabulary group and the comparison vocabulary group are triple elements; the total number of initial entity words in each sentence is used to normalize the number of comparison entity words.

[0043] The ratio between the cumulative value of the actual entity screening index of all contrasting entity vocabularies and the cumulative value of the actual entity screening index of all initial entity vocabularies in each sentence is used as the screening index evaluation value between the target vocabulary group and each contrasting vocabulary group; for the target vocabulary group and the contrasting vocabulary group, the larger the overall actual entity screening index of all the corresponding contrasting entity vocabularies, that is, the larger the screening index evaluation value, the more important the connection represented by the corresponding two entity vocabulary groups is, and the more consistent it is with the actual mediation record information, that is, the greater the possibility that the target vocabulary group and the contrasting vocabulary group are triple elements; the cumulative value of the actual entity screening index of all initial entity vocabularies in each sentence is used to normalize the cumulative value of the actual entity screening index of all contrasting entity vocabularies.

[0044] Since the larger the entity connection evaluation value, the larger the screening index evaluation value, the greater the possibility that the corresponding target vocabulary group and the comparison vocabulary group are triple elements; according to the product between the entity connection evaluation value and the screening index evaluation value, the triple entity confirmation index between the target vocabulary group and each comparison vocabulary group is determined; so that when the triple entity confirmation index is larger, the target vocabulary group and the comparison vocabulary group are more likely to be triple elements. In a specific implementation of an embodiment of the present invention, the process of obtaining the triple entity confirmation index is expressed by the formula: ;in, For the In the sentence The entity vocabulary group and the corresponding The triple entity confirmation index between the contrasting vocabulary groups; For the In the sentence The entity vocabulary group and the corresponding The number of all initial entity words between the contrasting word groups, that is, In the sentence The entity vocabulary group and the corresponding The number of all contrasting entity words between the contrasting word groups; For the The total number of initial entity words in the sentence; For the In the sentence The entity vocabulary group and the corresponding The cumulative value of the current entity screening index of all contrasting entity words between the contrasting word groups; For the The cumulative value of the entity screening index of all initial entity words in the sentence; For the In the sentence The entity vocabulary group and the corresponding Entity connection evaluation values ​​between comparison vocabulary groups; For the In the sentence The entity vocabulary group and the corresponding The screening index estimates were compared between the two vocabulary groups.

[0045] Step S104: Construct a triplet of each sentence based on the triplet entity confirmation index and the distribution of the entity screening index in each sentence; generate a legal document summary text based on the triplet of all sentences in the online mediation record communication text of the case.

[0046] Through steps S101 to S103, the triple entity confirmation index between every two entity vocabulary groups in each sentence is determined, and the larger the triple entity confirmation index is, the greater the possibility that the corresponding two entity vocabulary groups are triple elements; therefore, triples are further constructed for each sentence.

[0047] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the triplet includes: In each sentence, the two entity vocabulary groups corresponding to the largest triple entity confirmation index are taken as triple elements; a triple usually corresponds to three elements, and the two entity vocabulary groups corresponding to the largest triple entity confirmation index are usually two entities; therefore, it is necessary to link the two entities by screening out a third vocabulary group based on the two entity vocabulary groups that have already been used as triple elements; further, in each sentence, the initial entity vocabulary with the largest entity entity screening index among all the initial entity vocabulary of the non-party entity vocabulary between the two triple elements is taken as the triple element of each sentence; the triple elements of each sentence are arranged in the order of sentences to determine the triple of each sentence. The connection part usually plays a connecting role, so it is screened in the non-party entity vocabulary to obtain the third triple element; after the triple elements of each sentence are spliced ​​in the order of sentences, the triple of each sentence is determined.

[0048] After determining the triples of each sentence, based on the method of constructing summary text based on triples in the prior art, the summary text of the legal document is generated based on the knowledge graph. Preferably, in some possible implementations of the embodiments of the present invention, the process of generating the summary text of the legal document based on the triples of all sentences in the online mediation record communication text of the case includes: Each triple is input into the trained deep learning model, and the short sentence corresponding to each triple is output; the triple of each sentence is used as a node, and the triples of all sentences are converted into a graph structure to obtain an undirected graph corresponding to the online mediation record communication text; according to the constructed knowledge graph, the knowledge feature vector in the undirected graph is extracted using the pre-trained graph attention model; the short sentences of each triple involved are sorted according to the node order described by the knowledge feature vector, and the legal document summary text is determined. The knowledge feature vector reflects the logical connection between the entities in all triples, so the required legal document summary text can be generated on the basis of the short sentence combined with the knowledge feature vector. In a specific implementation of an embodiment of the present invention, the deep learning model adopts a generative network GPT, and the loss function adopts a cross entropy loss function. With the help of the graph attention model, an optimal path is found from the undirected graph composed of triples, so that the short sentences are arranged in order according to the order of the triples corresponding to the nodes involved in the path, thereby generating the required legal document summary text. It should be noted that the generative network GPT, the undirected graph and the graph attention model are technical means well known to those skilled in the art, and will not be further described here.

[0049] In summary, a legal document generation method and system based on online mediation information data takes into account the high frequency of entity vocabulary represented by the parties in the mediation record communication text, so the party entity screening index of each initial entity vocabulary is evaluated according to the local occurrence frequency of each initial entity vocabulary in each sentence and the overall occurrence frequency in all sentences, so as to screen out the required party entity vocabulary; then, based on the characteristic that the connection between different party entities in the mediation process requires more vocabulary to describe, the ternary entity title confirmation index between entity vocabulary groups is evaluated according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the party entity screening index, and on this basis, a more accurate triple is constructed, which solves the problem of low accuracy of triples constructed only by splitting mediation information in the prior art, and makes the generated legal document summary text more accurate.

[0050] This application also provides a legal document generation system based on online mediation information data, see Figure 2 , which shows a structural diagram of a legal document generation system based on online mediation information data provided by an embodiment of the present invention, the system comprising: a data acquisition module 201, a party entity vocabulary screening module 202, a ternary entity confirmation index determination module 203 and a legal document summary text generation module 204.

[0051] The data acquisition module 201 is used to acquire all initial entity words and all sentences in the online mediation record communication text of the case; The party entity vocabulary screening module 202 is used to determine the party entity screening index of each initial entity vocabulary in each sentence according to the local occurrence frequency of each initial entity vocabulary in each sentence and the overall occurrence frequency in all sentences; according to the numerical distribution of the party entity screening index of each initial entity vocabulary in each sentence, screen out all the party entity vocabulary in each sentence; The ternary entity confirmation index determination module 203 is used to select at least two entity vocabulary groups in each sentence according to the continuous distribution of the positions of the entity vocabulary of each party; determine the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index; The legal document summary text generation module 204 is used to construct a triplet of each sentence based on the triple entity confirmation index and the distribution of the actual entity screening index in each sentence; and to generate a legal document summary text based on the triplet of all sentences in the online mediation record communication text of the case.

[0052] It should be noted that the system provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the legal document generation system based on online mediation information data and the legal document generation method based on online mediation information data provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0053] The present application also provides a computer device. Figure 3 , which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present invention, the computer device includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and running on the processor 302, wherein when the processor 302 executes the computer program 303, the computer device can execute any of the legal document generation methods based on online mediation information data introduced above.

[0054] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer device, the computer device can execute any one of the above-mentioned methods for generating legal documents based on online mediation information data.

[0055] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code runs on a computer device, the computer device can execute any of the aforementioned methods for generating legal documents based on online mediation information data.

[0056] In the embodiments provided in the present application, it should be understood that the provided computer device, computer program product and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the methods provided above and will not be repeated here.

[0057] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0058] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for generating legal documents based on online mediation information data, characterized in that: The method comprises: Obtain all initial entity words and all sentences in the online mediation record communication text of the case; Determine the party entity screening index of each initial entity word in each sentence according to the local occurrence frequency of each initial entity word in each sentence and the overall occurrence frequency in all sentences; screen out all party entity words in each sentence according to the numerical distribution of the party entity screening index of each initial entity word in each sentence; In each sentence, at least two entity vocabulary groups are screened out according to the continuous distribution of the positions of the entity vocabulary of each party; the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence is determined according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index of the party; According to the ternary entity title confirmation index and the distribution of the actual entity screening index in each sentence, a triplet of each sentence is constructed; and a legal document summary text is generated according to the triplet of all sentences in the online mediation record communication text of the case.

2. A method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of acquiring the initial entity vocabulary includes: Remove stop words and perform word segmentation processing on the online mediation record communication text to determine the pre-processed text; All initial entity words in the preprocessed text are filtered out through the named entity recognition tool.

3. A method for generating legal documents based on online mediation information data according to claim 2, characterized in that: The acquisition process of the statement includes: The preprocessed text is divided into at least two sentences using Chinese punctuation marks and periods as intervals.

4. A method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of obtaining the current entity screening index includes: Each initial entity word is taken as the target entity word in turn; the maximum number of occurrences of all initial entity words in each sentence is taken as the maximum word frequency of each sentence; Determining the sentence reference frequency of the target entity vocabulary in each sentence according to the ratio between the number of occurrences of the target entity vocabulary in each sentence and the maximum value of the vocabulary frequency; The number of all sentences in which the target entity vocabulary appears is used as the target reference number; and the inter-sentence reference frequency of the target entity vocabulary is determined according to the ratio between the target reference number and the total number of all sentences; The current entity screening index of the target entity vocabulary in each sentence is determined according to the product of the reference frequency within the sentence and the reference frequency between the sentences.

5. The method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of acquiring the party entity vocabulary includes: Arrange all the initial entity words in each sentence in descending order of the corresponding current entity screening index to obtain an initial entity word sequence for each sentence; use the sequence consisting of the first preset number of initial entity words in the initial entity word sequence in descending order of the current entity screening index as the reference entity word sequence for each sentence; Taking the first initial entity word in the reference entity word sequence as the first party word; In the reference entity vocabulary sequence, the difference between the actual entity screening index of each initial entity vocabulary and the actual entity screening index of the next initial entity vocabulary is used as the screening index span value of each initial entity vocabulary; among all initial entity vocabulary except the first two initial entity vocabulary in the reference entity vocabulary sequence, the initial entity vocabulary with the largest screening index span value is used as the second party vocabulary; The first party vocabulary, the second party vocabulary, and all initial entity vocabulary between the first party vocabulary and the second party vocabulary are used as all party entity vocabulary in each sentence.

6. A method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of acquiring the entity vocabulary group includes: In each sentence, all mutually adjacent entity words of the parties are merged to obtain all merged word groups; the merged word group and each entity word of the party outside the merged word group are regarded as entity word groups.

7. The method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of obtaining the ternary entity confirmation index includes: In each sentence, each entity vocabulary group is taken as the target vocabulary group in turn; each entity vocabulary group other than the target vocabulary group is taken as the comparison vocabulary group; In each sentence, all initial entity words between the target vocabulary group and each contrasting vocabulary group are taken as the corresponding contrasting entity words; the ratio between the number of all contrasting entity words and the total number of initial entity words in each sentence is taken as the entity connection evaluation value between the target vocabulary group and each contrasting vocabulary group; The ratio between the cumulative value of the actual entity screening index of all contrasting entity words and the cumulative value of the actual entity screening index of all initial entity words in each sentence is used as the screening index evaluation value between the target vocabulary group and each contrasting vocabulary group; According to the product between the entity connection evaluation value and the screening index evaluation value, a triple entity confirmation index between the target vocabulary group and each comparison vocabulary group is determined.

8. The method for generating legal documents based on online mediation information data according to claim 1, characterized in that: The process of obtaining the triplet includes: In each sentence, the two entity vocabulary groups corresponding to the largest triple entity confirmation index are taken as triple elements; In each sentence, the initial entity vocabulary with the largest entity entity screening index among all initial entity vocabulary of non-party entity vocabulary between two triple elements is used as the triple element of each sentence; Arrange the triplet elements of each statement in the order of the statements to determine the triplet of each statement.

9. A method for generating legal documents based on online mediation information data according to claim 8, characterized in that: The process of generating a legal document summary text based on the triples of all sentences in the online mediation record communication text of the case includes: Input each triple into the trained deep learning model and output the short sentence corresponding to each triple; Taking the triple of each sentence as a node, converting all the triples of the sentences into a graph structure to obtain an undirected graph corresponding to the online mediation record communication text; based on the constructed knowledge graph, using the pre-trained graph attention model to extract the knowledge feature vector in the undirected graph; The short sentences of each triple involved are sorted according to the node order described by the knowledge feature vector to determine the abstract text of the legal document.

10. A legal document generation system based on online mediation information data, characterized in that: The system comprises: A data acquisition module, used to acquire all initial entity words and all sentences in the online mediation record communication text of the case; The party entity vocabulary screening module is used to determine the party entity screening index of each initial entity vocabulary in each sentence according to the local occurrence frequency of each initial entity vocabulary in each sentence and the overall occurrence frequency in all sentences; according to the numerical distribution of the party entity screening index of each initial entity vocabulary in each sentence, screen out all the party entity vocabulary in each sentence; A ternary entity confirmation index determination module is used to screen out at least two entity vocabulary groups in each sentence according to the continuous distribution of the positions of the entity vocabulary of each party; and to determine the ternary entity confirmation index between each entity vocabulary group and each other entity vocabulary group in each sentence according to the number of all initial entity vocabulary between each entity vocabulary group and each other entity vocabulary group and the overall size of the entity screening index of the party; The legal document summary text generation module is used to construct a triplet of each sentence based on the triple entity confirmation index and the distribution of the actual entity screening index in each sentence; and to generate a legal document summary text based on the triplet of all sentences in the online mediation record communication text of the case.

Citation Information

Patent Citations

  • Legal instrument generation system and method based on user experience prediction

    CN111274779A

  • Graph knowledge enhanced paraphrase generation method and system oriented to legal instruments

    CN118552358A

  • Creating and managing a policy continuum

    US20080162109A1

  • Automated system and method for crowd source-based mediation / litigation management

    US20190102848A1

  • Systems and methods for training machine learning models using active learning

    US20190180195A1