CN117273008A - Referee document generation method and device and electronic equipment - Google Patents

Referee document generation method and device and electronic equipment Download PDF

Info

Publication number
CN117273008A
CN117273008A CN202311104032.1A CN202311104032A CN117273008A CN 117273008 A CN117273008 A CN 117273008A CN 202311104032 A CN202311104032 A CN 202311104032A CN 117273008 A CN117273008 A CN 117273008A
Authority
CN
China
Prior art keywords
legal
reasoning
keyword
referee document
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311104032.1A
Other languages
Chinese (zh)
Other versions
CN117273008B (en
Inventor
高杏
李俊峰
鲍伟东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING HUAXIA DENTSU TECHNOLOGY CO LTD
Original Assignee
BEIJING HUAXIA DENTSU TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BEIJING HUAXIA DENTSU TECHNOLOGY CO LTD filed Critical BEIJING HUAXIA DENTSU TECHNOLOGY CO LTD
Priority to CN202311104032.1A priority Critical patent/CN117273008B/en
Priority claimed from CN202311104032.1A external-priority patent/CN117273008B/en
Publication of CN117273008A publication Critical patent/CN117273008A/en
Application granted granted Critical
Publication of CN117273008B publication Critical patent/CN117273008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a judge document generation method, a judge document generation device and electronic equipment, and relates to the technical field of computers, wherein the method comprises the following steps: extracting keywords from the acquired legal application text to be processed to obtain at least one keyword; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template, so as to realize reasoning of the reasoning content related to each target keyword, further realize automatic generation of the referee document and improve the efficiency of obtaining the referee document.

Description

Referee document generation method and device and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a referee document, and an electronic device.
Background
The judge document is a process and result of recording the legal case, is a carrier of the result of litigation activities, and is a unique certificate for determining and distributing the entity right obligation of the party, so the judge document is of great importance to the case party.
However, in the conventional case-trial process, a template of a fixed referee document is given, and a judge manually fills in the process and result of case-trial into the template to obtain a final referee document, so that the efficiency of obtaining the referee document is low.
Disclosure of Invention
The invention provides a referee document generation method, a referee document generation device and electronic equipment, which are used for solving the problem of low efficiency of acquiring referee documents.
The invention provides a referee document generation method, which comprises the following steps:
extracting keywords from the acquired legal application text to be processed to obtain at least one keyword;
determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements;
determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword;
and generating a referee document based on the reasoning content and the referee document template.
According to the judge document generation method provided by the invention, the legal element library is constructed based on the following steps:
acquiring a plurality of sample legal files corresponding to a plurality of types respectively;
carrying out standardized processing on each sample legal file by adopting a regular expression to obtain a plurality of semantic information;
respectively determining each semantic information as legal elements;
and constructing the legal element library based on each legal element.
According to the judge document generation method provided by the invention, the legal logic rule system is constructed based on the following steps:
constructing a legal logic knowledge system and an inference rule system; the legal logic knowledge system represents judgment logic between legal facts and legal judgment results and legal basis related to the legal facts; the inference rule system comprises a plurality of preset inference rules, wherein the inference rules comprise rule expression forms and rule types;
and constructing the legal logic rule system based on the reasoning rule system and the legal logic knowledge system.
According to the judge document generation method provided by the invention, a legal logic knowledge system is constructed, and the method comprises the following steps:
based on each legal element, determining the legal fact corresponding to each legal element;
based on expert system and each legal fact, constructing legal logic knowledge system.
According to the judge document generation method provided by the invention, the legal logic rule system is constructed based on the reasoning rule system and the legal logic knowledge system, and the method comprises the following steps:
embedding the reasoning rules in the reasoning rule system into the legal logic knowledge system, and constructing the legal logic rule system based on a pre-constructed referee document template.
According to the judge document generation method provided by the invention, the keyword extraction is carried out on the acquired legal application text to be processed to obtain at least one keyword, and the method comprises the following steps:
identifying the legal application text to be processed to obtain a plurality of paragraph types corresponding to the legal application text to be processed;
word segmentation is carried out on texts corresponding to the paragraph types respectively, so that a plurality of words are obtained;
based on the words, determining the word criticality corresponding to the words respectively;
comparing the keyword degree of each word with a first preset threshold value respectively;
and determining the words corresponding to the word criticality larger than the first preset threshold as the keywords.
According to the method for generating the referee document provided by the invention, the method for determining at least one target keyword based on each keyword and a pre-constructed legal element library comprises the following steps:
based on the keywords and the legal element library, matching the keywords with a plurality of legal elements in the legal element library respectively;
and determining the keywords successfully matched as target keywords.
According to the method for generating the referee document provided by the invention, the inference content corresponding to each target keyword is determined based on each target keyword and a pre-constructed legal logic rule system, and the method comprises the following steps:
and inputting each target keyword into the legal logic rule system to obtain reasoning content corresponding to each target keyword output by the legal logic rule system.
The invention also provides a referee document generating device, comprising:
the extraction module is used for extracting keywords from the acquired legal application text to be processed to obtain at least one keyword;
the first determining module is used for determining at least one target keyword based on the keywords and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements;
the second determining module is used for determining reasoning contents corresponding to the target keywords based on the target keywords and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword;
and the generation module is used for generating the referee document based on the reasoning content and the referee document template.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the judge document generation method according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a referee document generation method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a referee document generation method as described in any one of the above.
According to the judge document generation method, the judge document generation device and the electronic equipment, at least one keyword is obtained by extracting the keyword of the obtained legal application text to be processed; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template. The reasoning of the reasoning content related to each target keyword is realized through the pre-constructed legal element library and the pre-constructed legal logic rule system, so that the automatic generation of the judge document is realized, and the efficiency of obtaining the judge document is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a referee document generating method according to the present invention;
FIG. 2 is a schematic diagram of a referee document template provided by the present invention;
FIG. 3 is a schematic diagram of a legal logic rules system provided by the present invention;
FIG. 4 is a second flowchart of a referee document generating method according to the present invention;
FIG. 5 is a schematic diagram of the referee document generating apparatus according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For a clearer understanding of the various embodiments of the present application, related knowledge will be presented first.
The expert system is one of the genres of natural language processing, refers to a deterministic flow manually formulated by an expert, is the most important in artificial intelligence, is also the most active application field, and realizes the important breakthrough of the artificial intelligence from theoretical research to practical application and from general reasoning strategy discussion to application of special knowledge.
Expert systems are an important branch of early artificial intelligence, which can be seen as a class of computer-aided intelligent programming systems with specialized knowledge and experience, typically employing knowledge representation and knowledge reasoning techniques in artificial intelligence to simulate complex problems that are usually solved by domain experts.
The expert system uses the expert's knowledge and experience to make inferences, decisions and decisions. Much of the work and knowledge in the world is non-mathematical, with only a small portion of human activity being centered on mathematical formulas or numerical calculations. For legal disciplines, the whole system is considered through reasoning and has transparency. The expert system can explain the reasoning process and answer the questions raised by the user, so that the user can know the reasoning process, the trust feeling of the expert system is improved, and the knowledge updating has flexibility. Expert systems can continuously increase knowledge, modify original knowledge, and continuously update. For legal disciplines, based on the law expert learning, the continuously updated legal knowledge, the continuously updated expert system knowledge, and the provided user knowledge are updated accordingly.
The legal logic knowledge system is a combination of various logics, and can be constructed from the top to bottom of laws and regulations, and can also be constructed from the relevance of legal concepts. The knowledge construction in the professional field is different from the fusion and construction of encyclopedia knowledge, and very strict expert guidance and supervision are required. The legal concept knowledge is a traditional knowledge base, and the judicial practical knowledge is constructed through batch document processing and expert intervention, so that the application is used for guiding small-scale breakthrough.
Based on the description, an expert system based on rules is selected to realize intelligent generation of the referee document.
The referee document generation method of the present invention is described below with reference to fig. 1 to 4.
FIG. 1 is a schematic flow chart of a referee document generating method according to the present invention, as shown in FIG. 1, the method includes steps 101-104; wherein,
step 101, extracting keywords from the obtained legal application text to be processed to obtain at least one keyword.
It should be noted that, the referee document generating method provided by the present invention is applicable to a scenario of referee document generation, and the execution subject of the method may be referee document generating device, for example, an electronic device, or a control module in the referee document generating device for executing the referee document generating method.
Specifically, firstly, an obtained legal application text to be processed, for example, a prosecution shape related to borrowing, and then extracting keywords from the legal application text to be processed to obtain at least one keyword, wherein the keywords refer to words which can embody legal element entities in the legal application text to be processed, such as borrowing time, borrowing behavior and borrowing contract.
102, determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents respectively corresponding to a plurality of types, and comprises a plurality of legal elements.
Specifically, a pre-constructed legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, the legal element library comprises a plurality of legal elements, and the legal elements refer to legal element entities in the sample legal documents. Taking a case from as a coordinate, following law theory and legal logic, and building a legal element set containing case feature data under the case from item in a plurality of sample legal files through learning and training of a plurality of types and a plurality of sample legal files, namely a legal element library; the setting standard of legal elements is different from analysis of basic attributes of cases, and is an element-level analysis of minimum granularity affecting entity attributes.
According to each keyword and a pre-constructed legal element library, at least one target keyword can be determined; wherein the target keyword is a keyword matched with a legal element in the legal element library.
Step 103, determining reasoning contents corresponding to the target keywords based on the target keywords and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword.
Specifically, a legal logic rule system is built in advance, wherein the legal logic rule system is used for reasoning the reasoning content related to each target keyword. And according to the determined target keywords and a legal logic rule system which is built in advance, the legal logic rule system can be used for reasoning the reasoning contents related to the target keywords, so that the reasoning contents corresponding to the target keywords are obtained.
And 104, generating a referee document based on the reasoning content and the referee document template.
Specifically, the referee document template is constructed based on the requirements for the referee document structure content, as shown in fig. 2, and fig. 2 is a schematic diagram of the referee document template provided by the invention.
And backfilling the reasoning contents into the constructed referee document template according to the determined reasoning contents to generate the referee document.
According to the judge document generation method provided by the invention, at least one keyword is obtained by extracting the keyword of the obtained legal application text to be processed; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template. The reasoning of the reasoning content related to each target keyword is realized through the pre-constructed legal element library and the pre-constructed legal logic rule system, so that the automatic generation of the judge document is realized, and the efficiency of obtaining the judge document is improved.
Optionally, the legal element library is constructed based on the following steps:
(1) And acquiring a plurality of sample legal files corresponding to the various types respectively.
Specifically, a plurality of sample legal documents, such as prosecution documents and answer documents, corresponding to the borrowing cases, respectively, are obtained.
(2) And carrying out standardized processing on each sample legal file by adopting a regular expression to obtain a plurality of semantic information.
Specifically, a regular expression model is established to perform standardized processing on texts containing case features in each sample law file, namely, the texts are converted into semantic information.
(3) And respectively determining each semantic information as legal elements.
Specifically, each piece of standardized semantic information is determined as a legal element, respectively.
(4) And constructing the legal element library based on each legal element.
Specifically, each legal element is stored in a legal element library, so that the construction of the legal element library is realized.
Optionally, the legal logic rule system is constructed based on the following steps:
constructing a legal logic knowledge system and an inference rule system; the legal logic knowledge system represents judgment logic between legal facts and legal judgment results and legal basis related to the legal facts; the inference rule system comprises a plurality of preset inference rules, wherein the inference rules comprise rule expression forms and rule types; and constructing the legal logic rule system based on the reasoning rule system and the legal logic knowledge system.
Specifically, legal basis refers to a legal rule, the rule expression form is a rule symbol, and the rule type comprises at least one of the following: conditional judgment rules, operation rules, conversion rules and standardization rules; for example, the conditional judgment rule is n (XXX), and indicates that element XXX is not present and returns true and that element XXX is present and returns false; the conditional judgment rule is y (XXX), and indicates that element XXX is present and returns true, and that element XXX is absent and returns false. The conversion rule is a year-month conversion change (XXX), and indicates a year-month conversion of a specified style of year-month (xx year zero xx month zero xx day); the conversion rule is value (XXX) op [ number ] and indicates whether the relation between the semantic value of the element XXX and the preset number and size meets a comparison symbol op; the conversion rule is element (XXX, yyy, zzz) op [ number ] which indicates whether the number of the semantic values extracted by the judged element set (XXX, yyy, zzz) meets the comparison symbol op; the normalization rule is date normalization date (XXX), and date normalization is performed when the semantic value of element XXX satisfies a standard form of date format.
Constructing a legal logic knowledge system and an inference rule system, wherein the legal logic knowledge system represents judgment logic between legal facts and legal judgment results and legal basis related to the legal facts; the inference rule system comprises a plurality of preset inference rules, wherein the inference rules comprise rule expression forms and rule types; and then a legal logic rule system can be constructed according to the reasoning rule system and the legal logic knowledge system.
Optionally, constructing a legal logic knowledge system includes:
based on each legal element, determining the legal fact corresponding to each legal element; based on expert system and each legal fact, constructing legal logic knowledge system.
Specifically, according to each legal element, the legal element is adopted to represent the legal facts, the legal facts corresponding to each legal element can be respectively determined, namely, the facts are split into element-level information, dynamic association of the legal elements and the legal facts is achieved, and the fact modeling can be performed on the application of the legal elements. And then according to an expert system and each legal fact, namely combing legal relation and right basis under different case matters, legal logic structure, and constructing structured knowledge based on the legal relation and right basis, further establishing judgment logic between the legal facts and legal results and legal basis related to the legal facts in a legal logic knowledge system, thereby realizing the construction of the legal logic knowledge system.
Optionally, the constructing the legal logic rule system based on the inference rule system and the legal logic knowledge system includes:
embedding the reasoning rules in the reasoning rule system into the legal logic knowledge system, and constructing the legal logic rule system based on a pre-constructed referee document template.
Specifically, the inference rules in the inference rule system are embedded into the legal logic knowledge system, so that the transformation of the knowledge content into the inference rule system is realized. The legal knowledge of the rationality is expressed in a rule reasoning form, and the knowledge content, the reasoning rule and the document expression are fixedly structured according to document content expressions of different parts of the structural design of the pre-structured referee document template to form a legal logic rule system, as shown in fig. 3, and fig. 3 is a schematic diagram of the legal logic rule system provided by the invention.
Optionally, the specific implementation manner of step 101 includes:
1) And identifying the legal application text to be processed to obtain a plurality of paragraph types corresponding to the legal application text to be processed.
Specifically, the paragraph type recognition is performed on the legal application text to be processed, so that a plurality of paragraph types corresponding to the legal application text to be processed can be obtained.
Optionally, the case type identification can be performed on the legal application text to be processed, so as to obtain the case type corresponding to the legal application text to be processed.
2) And respectively segmenting the text corresponding to each paragraph type to obtain a plurality of words.
Specifically, a word segmentation tool is adopted to segment texts corresponding to paragraph types respectively, so that a plurality of words can be obtained.
3) And respectively determining the keyword degree of the words corresponding to the words based on the words.
It should be noted that, a semantic-based Chinese text keyword extraction (SKE) algorithm is adopted to clean text data, extract case feature data, extract legal text elements (keywords) extracted from the legal application text to be processed by a natural language processing technology through semantic feature recognition, entity extraction and entity relationship analysis, and store the legal text elements in a legal text element pool to be processed.
Specifically, according to each term, the term criticality Score (W) corresponding to each term can be determined by using the formula (1) i ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein, formula (1) is expressed as:
wherein Vd is i Representation word W i Vdw represents a semantic contribution value weight, TW represents a statistical feature value weight, loc ij Representation word W i Whether or not it has occurred at position j, low j Weights representing positions j in the statistical feature, wherein j has values of 1, 2 and 3,1 represents a title, 2 represents a segment head, 3 represents a segment tail, len i Representation word W i Is the word length of the word, and lenw represents the word length weight and pos in the statistical characteristics i Representation word W i Is used to represent the part of speech weight in the statistical feature, fidfw represents the word W i Is a term frequency-inverse text frequency index (termFrequency-Inverse Document Frequency, TF-IDF) value weight, fidf i Representation word W i TF-IDF value of (b); among them, TF-IDF is a common weighting technique for information retrieval and data mining, TF is Term Frequency (Term Frequency), and IDF is an inverse text Frequency index (Inverse Document Frequency). Score (W) i ) The higher the value is, the higher the criticality of the word is, namely the case characteristic data to be extracted is.
4) And comparing the keyword degree of each word with a first preset threshold value respectively.
Specifically, the first preset threshold is set according to the actual situation.
5) And determining the words corresponding to the word criticality larger than the first preset threshold as the keywords.
Specifically, determining a word corresponding to the word keyword larger than a first preset threshold as a keyword, and describing that the word keyword larger than the first preset threshold meets the requirement, wherein the word corresponding to the word keyword is the keyword.
Optionally, the specific implementation manner of step 102 includes:
based on the keywords and the legal element library, matching the keywords with a plurality of legal elements in the legal element library respectively; and determining the keywords successfully matched as target keywords.
Specifically, based on each keyword and the legal element library, each keyword is respectively matched with a plurality of legal elements in the legal element library, and the successfully matched keywords are determined as target keywords.
In practice, a momentum contrast algorithm is adopted to calculate a loss value by using a formula (2) with each keyword and a plurality of legal elements in a legal element library, wherein the formula (2) is expressed as:
wherein, the momentum contrast algorithm uses an Infonce loss function, q represents a keyword, and k i Representing legal elements, k, in a library of legal elements + Representing a positive sample of q (assuming there is and only one) in the legal elements library; τ represents the hyper-parameter used to adjust the loss function.
When k is i !=k + When q is dissimilar from ki, exp (q.times.k) i The value of/τ) is small; when k is i =k + When it indicates q and k + Similarly, exp (q.k) i The value of/. Tau.) is large, so thatThe value of (2) is close to 1, thereby achieving the purpose of minimizing the function and obtaining the actual comparison data.
Optionally, the determining, based on each target keyword and a pre-constructed legal logic rule system, the inference content corresponding to each target keyword includes:
and inputting each target keyword into the legal logic rule system to obtain reasoning content corresponding to each target keyword output by the legal logic rule system.
Specifically, a rule engine is adopted, the rule engine inputs each target keyword into a legal logic rule system, so that reasoning contents corresponding to each target keyword output by the legal logic rule system can be obtained, namely knowledge reasoning is carried out by using the constructed legal logic rule system according to the extracted target keyword, and specific knowledge contents are obtained.
FIG. 4 is a second flowchart of the referee document generating method according to the present invention, as shown in FIG. 4, the method includes steps 401-408; wherein,
step 401, constructing a legal element library. Specifically, a plurality of sample legal documents corresponding to a plurality of types are obtained, the regular expression is adopted to carry out standardization processing on each sample legal document, a plurality of semantic information is obtained, and each semantic information is respectively determined as legal elements; based on each legal element, constructing a legal element library.
Step 402, constructing a legal logic knowledge system. Specifically, based on each legal element, determining the legal facts corresponding to each legal element respectively; based on expert system and legal facts, constructing legal logic knowledge system.
And step 403, constructing an inference rule system. Specifically, the inference rule system comprises a plurality of preset inference rules, and the inference rules comprise rule expression forms and rule type inference rule systems.
Step 404, constructing a legal logic rule system. Specifically, the reasoning rules in the reasoning rule system are embedded into the legal logic knowledge system, and the legal logic rule system is built based on a pre-built referee document template.
And step 405, extracting keywords from the obtained legal application text to be processed to obtain at least one keyword. Specifically, identifying legal application texts to be processed to obtain a plurality of paragraph types corresponding to the legal application texts to be processed; word segmentation is carried out on texts corresponding to the paragraph types respectively, so that a plurality of words are obtained; based on each word, determining the word criticality corresponding to each word; comparing the keyword of each word with a first preset threshold value respectively; and determining the words corresponding to the word criticality larger than a first preset threshold as keywords.
At step 406, at least one target keyword is determined based on each keyword and a pre-constructed library of legal elements. Specifically, based on each keyword and the legal element library, matching each keyword with a plurality of legal elements in the legal element library respectively; and determining the keywords successfully matched as target keywords.
Step 407, determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system. Specifically, each target keyword is input into the legal logic rule system, and the reasoning content corresponding to each target keyword output by the legal logic rule system is obtained.
Step 408, generating referee document based on the reasoning content and referee document template. Specifically, the reasoning content is backfilled to a referee document template to generate a referee document.
The referee document generating device provided by the present invention will be described below, and the referee document generating device described below and the referee document generating method described above may be referred to correspondingly to each other.
Fig. 5 is a schematic structural view of a referee document generating device according to the present invention, and as shown in fig. 5, a referee document generating device 500 includes: an extraction module 501, a first determination module 502, a second determination module 503, and a generation module 504; wherein,
the extracting module 501 is configured to extract keywords from the obtained legal application text to be processed, so as to obtain at least one keyword;
a first determining module 502, configured to determine at least one target keyword based on each of the keywords and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements;
a second determining module 503, configured to determine, based on each of the target keywords and a pre-constructed legal logic rule system, reasoning content corresponding to each of the target keywords; the legal logic rule system is used for reasoning the reasoning content related to each target keyword;
a generating module 504, configured to generate a referee document based on the reasoning content and the referee document template.
According to the judge document generation device provided by the invention, at least one keyword is obtained by extracting the keyword of the acquired legal application text to be processed; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template. The reasoning of the reasoning content related to each target keyword is realized through the pre-constructed legal element library and the pre-constructed legal logic rule system, so that the automatic generation of the judge document is realized, and the efficiency of obtaining the judge document is improved.
Optionally, the referee document generating device 500 further includes:
the acquisition module is used for acquiring a plurality of sample legal files corresponding to the types respectively;
the processing module is used for carrying out standardized processing on each sample legal file by adopting a regular expression to obtain a plurality of semantic information;
the third determining module is used for determining each semantic information as a legal element respectively;
the first construction module is used for constructing the legal element library based on each legal element.
Optionally, the referee document generating device 500 further includes:
the second construction module is used for constructing a legal logic knowledge system and an inference rule system; the legal logic knowledge system represents judgment logic between legal facts and legal judgment results and legal basis related to the legal facts; the inference rule system comprises a plurality of preset inference rules, wherein the inference rules comprise rule expression forms and rule types;
and the third construction module is used for constructing the legal logic rule system based on the reasoning rule system and the legal logic knowledge system.
Optionally, the second building module is specifically configured to:
based on each legal element, determining the legal fact corresponding to each legal element;
based on expert system and each legal fact, constructing legal logic knowledge system.
Optionally, the third building module is specifically configured to:
embedding the reasoning rules in the reasoning rule system into the legal logic knowledge system, and constructing the legal logic rule system based on a pre-constructed referee document template.
Optionally, the extracting module 501 is specifically configured to:
identifying the legal application text to be processed to obtain a plurality of paragraph types corresponding to the legal application text to be processed;
word segmentation is carried out on texts corresponding to the paragraph types respectively, so that a plurality of words are obtained;
based on the words, determining the word criticality corresponding to the words respectively;
comparing the keyword degree of each word with a first preset threshold value respectively;
and determining the words corresponding to the word criticality larger than the first preset threshold as the keywords.
Optionally, the first determining module 502 is specifically configured to:
based on the keywords and the legal element library, matching the keywords with a plurality of legal elements in the legal element library respectively;
and determining the keywords successfully matched as target keywords.
Optionally, the second determining module 503 is specifically configured to:
and inputting each target keyword into the legal logic rule system to obtain reasoning content corresponding to each target keyword output by the legal logic rule system.
Fig. 6 is a schematic physical structure of an electronic device according to the present invention, as shown in fig. 6, the electronic device 600 may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. Processor 610 may invoke logic instructions in memory 630 to perform a referee document generation method comprising: extracting keywords from the acquired legal application text to be processed to obtain at least one keyword; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of executing the referee document generation method provided by the above methods, the method comprising: extracting keywords from the acquired legal application text to be processed to obtain at least one keyword; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the referee document generating method provided by the above methods, the method comprising: extracting keywords from the acquired legal application text to be processed to obtain at least one keyword; determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements; determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword; and generating a referee document based on the reasoning content and the referee document template.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A referee document generation method, comprising:
extracting keywords from the acquired legal application text to be processed to obtain at least one keyword;
determining at least one target keyword based on each keyword and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements;
determining the reasoning content corresponding to each target keyword based on each target keyword and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword;
and generating a referee document based on the reasoning content and the referee document template.
2. The referee document generation method according to claim 1, wherein the legal element library is constructed based on the steps of:
acquiring a plurality of sample legal files corresponding to a plurality of types respectively;
carrying out standardized processing on each sample legal file by adopting a regular expression to obtain a plurality of semantic information;
respectively determining each semantic information as legal elements;
and constructing the legal element library based on each legal element.
3. The referee document generation method according to claim 1, wherein the legal logic rule system is constructed based on the steps of:
constructing a legal logic knowledge system and an inference rule system; the legal logic knowledge system represents judgment logic between legal facts and legal judgment results and legal basis related to the legal facts; the inference rule system comprises a plurality of preset inference rules, wherein the inference rules comprise rule expression forms and rule types;
and constructing the legal logic rule system based on the reasoning rule system and the legal logic knowledge system.
4. The referee document generation method according to claim 3, wherein constructing a legal logic knowledge system includes:
based on each legal element, determining the legal fact corresponding to each legal element;
based on expert system and each legal fact, constructing legal logic knowledge system.
5. The referee document generation method according to claim 3, wherein said constructing the legal logic rule system based on the inference rule system and the legal logic knowledge system includes:
embedding the reasoning rules in the reasoning rule system into the legal logic knowledge system, and constructing the legal logic rule system based on a pre-constructed referee document template.
6. The referee document generation method according to any one of claims 1 to 5, wherein the keyword extraction of the obtained legal application text to be processed to obtain at least one keyword includes:
identifying the legal application text to be processed to obtain a plurality of paragraph types corresponding to the legal application text to be processed;
word segmentation is carried out on texts corresponding to the paragraph types respectively, so that a plurality of words are obtained;
based on the words, determining the word criticality corresponding to the words respectively;
comparing the keyword degree of each word with a first preset threshold value respectively;
and determining the words corresponding to the word criticality larger than the first preset threshold as the keywords.
7. The referee document generation method according to any one of claims 1 to 5, wherein said determining at least one target keyword based on each of said keywords and a pre-constructed legal element library comprises:
based on the keywords and the legal element library, matching the keywords with a plurality of legal elements in the legal element library respectively;
and determining the keywords successfully matched as target keywords.
8. The referee document generation method according to any one of claims 1 to 5, wherein the determining, based on each of the target keywords and a pre-constructed legal logic rule system, the inference content corresponding to each of the target keywords includes:
and inputting each target keyword into the legal logic rule system to obtain reasoning content corresponding to each target keyword output by the legal logic rule system.
9. A referee document generating apparatus, comprising:
the extraction module is used for extracting keywords from the acquired legal application text to be processed to obtain at least one keyword;
the first determining module is used for determining at least one target keyword based on the keywords and a pre-constructed legal element library; the legal element library is generated based on a plurality of sample legal documents corresponding to a plurality of types respectively, and comprises a plurality of legal elements;
the second determining module is used for determining reasoning contents corresponding to the target keywords based on the target keywords and a pre-constructed legal logic rule system; the legal logic rule system is used for reasoning the reasoning content related to each target keyword;
and the generation module is used for generating the referee document based on the reasoning content and the referee document template.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the referee document generation method of any one of claims 1 to 8 when the program is executed by the processor.
CN202311104032.1A 2023-08-30 Referee document generation method and device and electronic equipment Active CN117273008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311104032.1A CN117273008B (en) 2023-08-30 Referee document generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311104032.1A CN117273008B (en) 2023-08-30 Referee document generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN117273008A true CN117273008A (en) 2023-12-22
CN117273008B CN117273008B (en) 2024-06-04

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090863A (en) * 2014-07-24 2014-10-08 高德良 Intelligent legal instrument generating method and system
CN108304386A (en) * 2018-03-05 2018-07-20 上海思贤信息技术股份有限公司 A kind of logic-based rule infers the method and device of legal documents court verdict
CN110633458A (en) * 2018-06-25 2019-12-31 阿里巴巴集团控股有限公司 Method and device for generating referee document
CN110888943A (en) * 2019-11-08 2020-03-17 太极计算机股份有限公司 Method and system for auxiliary generation of court referee document based on micro-template
US20220366127A1 (en) * 2020-03-23 2022-11-17 Chetan Desh Legal Document Generation
CN115757819A (en) * 2022-11-08 2023-03-07 北京华夏电通科技股份有限公司 Method and device for acquiring information of quoting legal articles in referee document

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090863A (en) * 2014-07-24 2014-10-08 高德良 Intelligent legal instrument generating method and system
CN108304386A (en) * 2018-03-05 2018-07-20 上海思贤信息技术股份有限公司 A kind of logic-based rule infers the method and device of legal documents court verdict
CN110633458A (en) * 2018-06-25 2019-12-31 阿里巴巴集团控股有限公司 Method and device for generating referee document
CN110888943A (en) * 2019-11-08 2020-03-17 太极计算机股份有限公司 Method and system for auxiliary generation of court referee document based on micro-template
US20220366127A1 (en) * 2020-03-23 2022-11-17 Chetan Desh Legal Document Generation
CN115757819A (en) * 2022-11-08 2023-03-07 北京华夏电通科技股份有限公司 Method and device for acquiring information of quoting legal articles in referee document

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
缪成: "机器学习算法在法律文书制作繁简分流中的运用——以危险驾驶案件审查报告自动生成技术为视角", 人民检察, no. 2, 28 February 2021 (2021-02-28), pages 66 - 68 *

Similar Documents

Publication Publication Date Title
CN110737758B (en) Method and apparatus for generating a model
CN111949787A (en) Automatic question-answering method, device, equipment and storage medium based on knowledge graph
Rasool et al. GAWA–a feature selection method for hybrid sentiment classification
CN111767725B (en) Data processing method and device based on emotion polarity analysis model
CN106649742A (en) Database maintenance method and device
US20200184019A1 (en) Clarification of natural language requests using neural networks
CN110297893B (en) Natural language question-answering method, device, computer device and storage medium
CN112307351A (en) Model training and recommending method, device and equipment for user behavior
CN111027292B (en) Method and system for generating limited sampling text sequence
US20190228297A1 (en) Artificial Intelligence Modelling Engine
Estevez-Velarde et al. AutoML strategy based on grammatical evolution: A case study about knowledge discovery from text
CN112580352A (en) Keyword extraction method, device and equipment and computer storage medium
CN113705196A (en) Chinese open information extraction method and device based on graph neural network
CN112100398A (en) Patent blank prediction method and system
CN112307048A (en) Semantic matching model training method, matching device, equipment and storage medium
CN116049376B (en) Method, device and system for retrieving and replying information and creating knowledge
CN117273008B (en) Referee document generation method and device and electronic equipment
CN112132269B (en) Model processing method, device, equipment and storage medium
CN113722477B (en) Internet citizen emotion recognition method and system based on multitask learning and electronic equipment
CN117273008A (en) Referee document generation method and device and electronic equipment
CN115600595A (en) Entity relationship extraction method, system, equipment and readable storage medium
Rodriguez et al. An IR-based artificial bee colony approach for traceability link recovery
Thangarasu et al. Detection of Cyberbullying Tweets in Twitter Media Using Random Forest Classification
Rose Mary et al. Text based smart answering system in agriculture using RNN.
CN117033584B (en) Method and device for determining case text and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant