CN117149999B - Class case recommendation method and device based on legal element hierarchical network and text characteristics - Google Patents

Class case recommendation method and device based on legal element hierarchical network and text characteristics Download PDF

Info

Publication number
CN117149999B
CN117149999B CN202311437604.8A CN202311437604A CN117149999B CN 117149999 B CN117149999 B CN 117149999B CN 202311437604 A CN202311437604 A CN 202311437604A CN 117149999 B CN117149999 B CN 117149999B
Authority
CN
China
Prior art keywords
case
legal
text
hierarchical
similarity
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.)
Active
Application number
CN202311437604.8A
Other languages
Chinese (zh)
Other versions
CN117149999A (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.)
People's Court Information Technology Service Center
Shandong University
Original Assignee
People's Court Information Technology Service Center
Shandong University
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 People's Court Information Technology Service Center, Shandong University filed Critical People's Court Information Technology Service Center
Priority to CN202311437604.8A priority Critical patent/CN117149999B/en
Publication of CN117149999A publication Critical patent/CN117149999A/en
Application granted granted Critical
Publication of CN117149999B publication Critical patent/CN117149999B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/18Legal services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Technology Law (AREA)
  • Animal Behavior & Ethology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification relates to the technical field of legal artificial intelligence, and provides a class case recommending method and device based on a legal element hierarchical network and text characteristics, wherein the method comprises the following steps: generating a layered legal tree and a reference legal map of the cited law of the target case; associating the hierarchical legal strip tree with the reference legal strip atlas according to a reference relationship to construct a hierarchical legal strip reference network of the target case; dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain a text vector of the target case; according to the hierarchical legal quotation network and the text vector, calculating the similarity between the target case and each candidate case in the appointed case library; and determining the recommended case of the target case according to the similarity. The method and the device can improve the interpretability and the accuracy of class recommendation.

Description

Class case recommendation method and device based on legal element hierarchical network and text characteristics
Technical Field
The specification relates to the technical field of legal artificial intelligence, in particular to a class case recommending method and device based on a legal element hierarchical network and text characteristics.
Background
Class recommendation is an important task in the field of legal artificial intelligence, law practitioners need to search and recommend similar cases of specific cases by using automatic tools, and the key of the tools is to calculate the similarity between two legal case files, solve the problems of ' different judgment of the same case ' and inconsistent sentence ', and be beneficial to improving the judicial efficiency and the public confidence. The challenges currently presented by the class recommendation task are mainly: (1) legal text is lengthy, complex and unstructured; (2) The law domain has strong specialization, and the general domain has poor interpretability when the model is applied (3) it is difficult to obtain a large-scale marker dataset to train a supervised machine learning and deep learning model because the law specialist annotates the model in a complex and expensive way.
The traditional model is based on a bag of words model, wherein the correlation between texts is measured by comparison, comprising BM25 and VSM, and in order to measure the correlation of texts, the model compares two representations by calculating distances using cosine, dot product, bilinear or Euclidean distance functions. But representing the entire text using a single vector is not sufficient to capture all critical information, and conventional models face the problem of sparse and high-dimensional representations.
Compared with BM25, VSM and the like, the BERT-based pre-training language model can more comprehensively and accurately capture semantic information of legal texts, improves the effect of legal text similarity calculation, and receives great attention in the field of legal case retrieval. For example, taking the BERT-PLI model as an example, the BERT-PLI model is a BERT-based model with paragraph-level interactions that captures semantic relationships at the paragraph level using BERT, and then infers the correlation between two candidate cases by summarizing the paragraph-level interactions. The BERT model is fine-tuned by using a relatively small case law implication data set, so that the BERT model is suitable for legal scenes, and the calculation cost is reduced by adopting a cascade framework.
However, the BERT-PLI model segments the text into paragraphs, lacks of long-distance attention, and the segmentation mode of the model is to set fixed-length cutting, so that complete sentences are intercepted in incorrect places, the semantic integrity of the referee document is destroyed, and the interpretability and accuracy of the class recommendation result are finally affected.
Disclosure of Invention
An objective of the embodiments of the present disclosure is to provide a class case recommendation method and apparatus based on a legal element hierarchical network and text features, so as to improve the interpretability and accuracy of class case recommendation.
In order to achieve the above object, in one aspect, an embodiment of the present disclosure provides a class recommendation method based on a hierarchical network of legal elements and text features, including:
generating a layered legal tree and a reference legal map of the cited law of the target case;
associating the hierarchical legal strip tree with the reference legal strip atlas according to a reference relationship to construct a hierarchical legal strip reference network of the target case;
dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain a text vector of the target case;
according to the hierarchical legal quotation network and the text vector, calculating the similarity between the target case and each candidate case in the appointed case library;
and determining the recommended case of the target case according to the similarity.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the generating a hierarchical legal tree and a reference legal map of the law cited by the target case includes:
extracting structural information of the reference legal strips from the target case text in a full-scale mode according to the first regular expression; the structural information includes legal names, chapters, terms and term content;
Constructing a tree structure taking legal names as root nodes and chapter, clause and clause contents as hierarchical sub-nodes according to the structure information, and taking the tree structure as a hierarchical legal tree of the law quoted by the target case;
and constructing a reference legal strip graph by taking each reference clause in the structural information as an independent node.
In the class recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the associating the hierarchical legal strip tree with the reference legal strip graph according to the reference relationship includes:
and connecting the nodes in the hierarchical method strip tree with the nodes in the reference method strip map by lines according to the reference relation.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the classifying the case summary text in the target case into a plurality of text blocks with complete semantics according to semantics includes:
extracting a case summary text from the target case text according to the second regular expression;
decomposing the case summary text by taking sentences as units to form sentence sequences;
starting from the first sentence in the sentence sequence, sequentially splicing a plurality of adjacent sentences into text blocks with fixed length to obtain one or more text blocks; the fixed length is the input limit length of the Lawformer model;
And if the spliced text block is smaller than the fixed length and the total length of the next sentence adjacent to the text block is larger than the fixed length, increasing the length of the text block to the fixed length in a way of zero padding at the end of the sentence.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the calculating, according to the hierarchical legal strip referencing network and the text vector, the similarity between the target case and each candidate case in the specified case library includes:
calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case respectively; calculating the text similarity between the text vector and the text vector of each candidate case;
and respectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case, and correspondingly taking the average pooled similarity as the similarity of the target case and each candidate case.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the calculating the structural similarity between the hierarchical legal strip reference network and the hierarchical legal strip reference network of each candidate case includes:
And (3) invoking a Metapath2Vec algorithm to predict the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, the respectively performing average pooling on the structural similarity and the text similarity between the target case and each candidate case includes:
according to the formulaRespectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case;
wherein,for the object case and->Similarity of individual candidate cases->For the object case and->Structural similarity of the candidate cases, +.>For the object case and->Text similarity of each candidate case.
In the case recommendation method based on the legal element hierarchical network and the text feature in the embodiment of the present disclosure, calculating, according to the hierarchical legal strip citation network and the text vector, the similarity between the target case and each candidate case in the specified case library, includes:
sequentially splicing the representation vector of the hierarchical legal quotation network and the text vector into a first fusion vector; the text vector of each candidate case and the representation vector of the hierarchical legal quotation network are spliced in sequence to form a corresponding second fusion vector;
And calculating the similarity of the first fusion vector and each second fusion vector to serve as the similarity of the target case and each candidate case.
In the case recommendation method based on the legal element hierarchical network and the text feature according to the embodiment of the present disclosure, the determining the recommended case of the target case according to the similarity includes:
sorting the similarity between the target case and each candidate case in the appointed case base;
and taking the candidate case corresponding to the maximum similarity as a recommended case of the target case.
On the other hand, the embodiment of the specification also provides a class case recommending device based on the legal element hierarchical network and the text characteristics, which comprises the following components:
the network construction module is used for generating a hierarchical legal tree and a reference legal map of the law quoted by the target case, and associating the hierarchical legal tree with the reference legal map according to a quotation relationship so as to construct a hierarchical legal quotation network of the target case;
the vector representation module is used for dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain the text vector of the target case;
The similarity calculation module is used for calculating the similarity between the target case and each candidate case in the appointed case base according to the hierarchical legal quotation network and the text vector;
and the class recommendation module is used for determining the recommended class of the target case according to the similarity.
In another aspect, embodiments of the present disclosure further provide a computer device including a memory, a processor, and a computer program stored on the memory, which when executed by the processor, performs the instructions of the above method.
In another aspect, embodiments of the present disclosure also provide a computer storage medium having stored thereon a computer program which, when executed by a processor of a computer device, performs instructions of the above method.
In another aspect, the present description embodiment also provides a computer program product comprising a computer program which, when executed by a processor of a computer device, performs the instructions of the above method.
As can be seen from the technical solutions provided in the embodiments of the present disclosure, legal applicable relationships between cases may be mined by constructing a hierarchical legal quotation network, and similar cases have similar hierarchical legal quotation network structures, so as to improve the interpretability of case-like recommendation; moreover, before the text vector of the target case is generated by using the Lawformer model, the text of the case overview in the target case is divided into a plurality of text blocks with complete semantics according to the semantics, so that the incomplete semantics caused by the segmentation of sentences can be reduced or avoided, and the accuracy of the case recommendation is improved. In addition, the embodiment of the specification recommends a case based on the case outline in the case (instead of the case in full), and on the basis, the text segmentation ensures the semantic integrity and solves the problem of long text input to a certain extent.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 illustrates a schematic view of an application environment for class recommendation based on a hierarchical network of legal elements and text features in some embodiments of the present description;
FIG. 2 illustrates a flow chart of a class recommendation method based on a hierarchical network of legal elements and text features in some embodiments of the present description;
FIG. 3 illustrates a flow chart of a hierarchical legal strip tree and a reference legal strip graph for generating a law referenced by a target case in some embodiments of the present description;
FIG. 4 illustrates a schematic diagram of a hierarchical strip referencing network in an exemplary embodiment of the present description;
FIG. 5 illustrates a flow chart of semantically separating a case summary text in a target case into a plurality of semantically complete text blocks in some embodiments of the present description;
FIG. 6 illustrates a process diagram of text blocking in an exemplary embodiment of the present specification;
FIG. 7 illustrates a flowchart for calculating the similarity of a target case to each candidate case in a given case-base, respectively, in some embodiments of the present description;
fig. 8 is a flowchart showing the calculation of the similarity of a target case to each candidate case in a given case-base, respectively, in other embodiments of the present disclosure;
FIG. 9 illustrates a block diagram of a class recommendation device based on a hierarchical network of legal elements and text features in some embodiments of the present description;
fig. 10 illustrates a block diagram of a computer device in some embodiments of the present description.
[ reference numerals description ]
10. A client;
20. a server;
30. designating a case library;
91. a network construction module;
92. a vector representation module;
93. a similarity calculation module;
94. a class recommendation module;
1002. a computer device;
1004. a processor;
1006. a memory;
1008. a driving mechanism;
1010. an input/output interface;
1012. an input device;
1014. an output device;
1016. a presentation device;
1018. a graphical user interface;
1020. a network interface;
1022. a communication link;
1024. a communication bus.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
An application environment schematic of class recommendation based on legal element hierarchy network and text features in some embodiments of the present description is shown in FIG. 1; the application environment includes a client 10, a server 20 and a specified case library 30. The client 10 may initiate a class recommendation request for the target case to the server 20; the server 20 may generate a hierarchical legal tree and a reference legal map of the law referenced by the target case; associating the hierarchical legal strip tree with the reference legal strip atlas according to a reference relationship to construct a hierarchical legal strip reference network of the target case; dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain a text vector of the target case; calculating the similarity of the target case and each candidate case in the appointed case base 30 according to the hierarchical legal quotation network and the text vector; and determining a recommended case of the target case according to the similarity, and providing the recommended case to the client 10.
In some embodiments of the present disclosure, the client 10 may be a self-service terminal device, a mobile terminal (i.e., a smart phone), a display, a desktop computer, a tablet computer, a notebook computer, a digital assistant, or a smart wearable device. Wherein, intelligent wearable equipment can include intelligent bracelet, intelligent wrist-watch, intelligent glasses or intelligent helmet etc.. Of course, the client 10 is not limited to the electronic device with a certain entity, and may be software running in the electronic device.
In some embodiments of the present disclosure, the server 20 may be an electronic device with operation and network interaction functions; software running in the electronic device that provides business logic for data processing and network interactions may also be used.
In some embodiments of the present description, the specified case library 30 may be a database system storing a large number of litigation cases, particularly those belonging to the same type of case as the target case (e.g., litigation cases that are also criminal litigation classes).
In addition, it should be noted that, fig. 1 is only one application environment provided in the present specification, and in practical application, the number of the clients 10 may be plural, and the number of the servers 20 may be plural, which is not limited in the present specification.
The embodiment of the present disclosure provides a class recommendation method based on a legal element hierarchical network and text features, which may be applied to the above-mentioned server side, and is shown with reference to fig. 2, in some embodiments of the present disclosure, the class recommendation method based on the legal element hierarchical network and text features may include the following steps:
step 201, generating a hierarchical legal strip tree and a reference legal strip map of the law quoted by the target case.
Step 202, associating the hierarchical legal tree with the reference legal atlas according to the reference relation to construct a hierarchical legal reference network of the target case.
Step 203, dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to semantics, and inputting the text blocks into a Lawformer model to obtain a text vector of the target case.
And 204, calculating the similarity between the target case and each candidate case in the appointed case base according to the hierarchical legal quotation network and the text vector.
Step 205, determining a recommended case of the target case according to the similarity.
In the embodiment of the specification, the legal application relation between cases can be mined by constructing the hierarchical legal quotation network, and similar cases have similar hierarchical legal quotation network structures, so that the interpretation of class case recommendation is improved; moreover, before the text vector of the target case is generated by using the Lawformer model, the text of the case overview in the target case is divided into a plurality of text blocks with complete semantics according to the semantics, so that the incomplete semantics caused by the segmentation of sentences can be reduced or avoided, and the accuracy of the case recommendation is improved. In addition, the embodiment of the specification recommends a case based on the case outline in the case (instead of the case in full), and on the basis, the text segmentation ensures the semantic integrity and solves the problem of long text input to a certain extent.
The target case is a reference case appointed by the user, and the server can match the case most similar to the target case from the appointed database by taking the target case as a reference, so as to be used as a recommended case of the target case. In some embodiments of the present description, the target case may be any type of litigation case. In view of the diversity of cases, in some embodiments of the present disclosure, a corresponding database system may be configured for each case type, so as to reduce processing complexity and improve processing efficiency. For example, corresponding database systems may be configured for different case types, such as civil litigation cases, criminal litigation cases, and administrative litigation cases, respectively. Of course, in order to further improve the processing efficiency, the case types may be divided in more detail in consideration of the size of the data amount.
Referring to fig. 3, in some embodiments of the present description, generating a hierarchical legal tree and a reference legal atlas of the law referenced by the target case may include the steps of:
step 301, extracting structural information of a reference legal strip from a target case text in a full-scale mode according to a first regular expression; the structural information includes legal names, chapters, terms, and term content.
For example, in an exemplary embodiment of the present description, the set of input legal terms text isExtracting legal name, chapter, clause and clause specific content as hierarchical tree node set by regular expression ++>,/>
Wherein,representing legal name node->Representing chapter node->Representing clause nodes->Representing clause specific content nodes.
Step 302, constructing a tree structure with legal name as a root node and chapter, clause and clause content as hierarchical sub-nodes according to the structural information, wherein the tree structure is used as a hierarchical legal tree of the law cited by the target case.
For any one case, the tree node set is striped according to the layering methodA hierarchical legal tree can be constructed as shown in the left part of fig. 4; in the hierarchical legal tree shown in fig. 4, the legal name node is taken as the root node, the chapter node is taken as the child node of the first level, the clause node is taken as the child node of the second level, and the clause specific content node is taken as the child node of the third level, thereby forming the hierarchical legal tree of the law cited by the case. The connection lines between the nodes in the hierarchical tree are hierarchical edges to represent the hierarchical structure relationship in the hierarchical tree.
And 303, constructing a reference legal strip graph by taking each reference term in the structural information as an independent node.
For example, in an exemplary embodiment of the present description, a regular expression example is: "(according to |foundation)," xxxx criminal litigation method \w\S+ (of), "" according to "," of "]". The extraction results are exemplified as follows: "second, third and sixty-first items according to" xxxx criminal litigation law "second, thirty-first items, sixteenth and fourth hundred seventy-second items according to" interpretation of xxxxxx criminal litigation law "by the" xxx court of applicable < xxxx criminal litigation law "), and" rules of one of the first hundred sixty-second items, thirteenth item, twenty-fifth item, twenty-sixth item, twenty-seventh item, sixty-seventh item, seventy-second item, seventy-third item "xxxx criminal litigation law".
Wherein, the case text of the input judge document isExtracting legal name and clause as node set of legal quotation map by regular expression ++>. Wherein (1)>Representing legal name node->Representing clause nodes. On the basis of this, it is possible to +.>The reference clauses of (a) are used as independent nodes to construct a reference legal strip graph (e.g., the reference legal strip graph shown in the right-hand part of fig. 4).
In some embodiments of the present description, associating the hierarchical legal tree with the reference legal atlas according to a reference relationship may include: and connecting the nodes in the hierarchical method strip tree with the nodes in the reference method strip map by lines according to the reference relation. For example, in the exemplary embodiment shown in fig. 4, independent nodes such as reference french strip 1, reference french strip 2, etc. in the reference french strip map may be connected with corresponding nodes in the hierarchical french strip tree by directional dotted lines; such connection lines may be referred to as reference edges to characterize the reference relationships between the connected nodes. When the hierarchical legal strip tree is associated with the reference legal strip graph according to a reference relationship, a hierarchical legal strip reference network (Hierarchical Statute Citation Network, HSCNet) of the target case is formed. Obviously, for each case in a given case-base, a hierarchical legal quotation network for each case can also be obtained in a similar manner. Different cases have different hierarchical legal citation networks, while similar cases have similar hierarchical legal citation networks. Therefore, the hierarchical legal quotation network can be used as one of the evaluation bases of case recommendation.
Referring to fig. 5 and 6, in some embodiments of the present disclosure, the case summary text in the target case is semantically divided into a plurality of text blocks with complete semantics, which may include the following steps:
and step 501, extracting a case summary text from the target case text according to the second regular expression.
For example, in some embodiments of the present description, regular expressions may be constructed to extract the basic case (case summary text) in the referee document as text input. The standard of class recommendation is to recommend judge documents with similar 'basic cases', and the judge documents are long and complex in whole, so that the basic cases of the judge documents are preferred as text input in the embodiment of the specification, the problem of long text input in a text similarity task can be solved to a certain extent, and the processing efficiency is improved.
Wherein, by analyzing the content structure of the referee document, the present description embodiments construct regular expressions as "(|menses) (|law) aesthetic ascertainments w (|s) (|s\s) \s \w\s + (|s\s\s\s + (|s\s\s) \s \w\s +. W (|\s) (|.) s\s\s \s \s (|s\s (|s \s (|s \s |s |s |a | (a-a-w/s+ (|s/w/S) \s \w/s+s.
Specifically, the original document of the judge document is input asAfter regular expression extraction, the basic case text set is +.>Wherein, the method comprises the steps of, wherein,representing +.f. in case overview text>In the individualAnd (3) capacity.
And step 502, decomposing the case summary text by taking sentences as units to form sentence sequences.
A sentence refers to a sentence that begins after one period, question mark, exclamation mark, etc., and ends with another period, question mark, exclamation mark, etc. Because the sentences generally have complete semantics, the case summary text is decomposed by taking the sentences as units, and the sentence sequences formed after the decomposition can be ensured not to damage the semantic integrity in the case summary text. In some embodiments of the present description, sentences in the case summary text may be identified by regular expressions or the like, and text segmentation is performed accordingly.
Step 503, starting from the first sentence in the sentence sequence, sequentially splicing each adjacent several sentences into text blocks with fixed length, and obtaining one or more text blocks; the fixed length is an input constraint length of the Lawformer model.
And if the spliced text block is smaller than the fixed length and the total length of the next sentence adjacent to the text block is larger than the fixed length, increasing the length of the text block to the fixed length in a way of zero padding at the end of the sentence.
For example, if there is a sentence sequence in the sentence sequencesWherein->The sentence length of (a) is 11 words, 12 words, 13 words, 14 words respectively. If the fixed length is set to 30 words, from +.>Initially, due to->The number of words is less than 30 words, the next sentence adjacent thereto is +.>Word number of (a) alsoLess than 30 words, and +.>And->The sum of the word numbers is also smaller than 30 words, so +.>And->Sequentially splicing into a text block>Although text block {Adjacent next sentence +.>The number of words is smaller than 30 words, but due to +.>、/>And->The sum of the word numbers is greater than 30 words, so that finally the text block can be +.>As a block of text. In view of->And->The sum of the word numbers is 23 words, and 7 zero characters can be added after the 23 words to generate a text block with fixed length. For example, if->=XXXXXXXXXXX,/>By zero padding at the end of sentence, = YYYYYYYYYYYY, a text block +.>= XXXXXXXXXXXYYYYYYYYYYYY0000000。
At the time of obtaining text blockOn the basis of (a) then +.>Middle->Dividing text blocks of sentences after the text blocks; based on the processing logic, the sentence sequence can be finally obtainedIs a block of text: />、/>
The Lawformer model is a legal field pre-training language model published in 2021 and based on Longformer, and comprises tens of millions of criminal and civil case texts, and can be used for understanding legal long documents. The method is suitable for various tasks in the legal artificial intelligence field, including decision prediction, similar case retrieval, legal reading understanding and legal problem solving. A vectorized representation of the input text can be obtained by processing of the Lawformer model.
In the embodiment of the present disclosure, a blocking function module is added to the input end of the Lawformer model, so that sentences input to the Lawformer model are all sentences with a fixed length and complete semantics. Thus, in the embodiments of the present specification, the case summary text is input to the Lawformer model after being blockedPart of (2)Can be expressed as:
wherein each ofRepresenting a text block->Representing clauses in a text block, +.>Representing zero padding vectors in text blocks, < >>The total number of sentences representing the case summary text.
By combiningInput into Lawformer model to obtain +.>Text embedded representation +.>(i.e., text vector): />. Also, for each case in the specified case library, a text vector for each case may be obtained in this manner. The case summary text of different cases has different text vectors, while the case summary text of similar cases has similar text vectors. Therefore, the text vector of the case summary text can be used as one of the evaluation bases of case recommendation.
Referring to fig. 7, in some embodiments of the present disclosure, calculating the similarity between the target case and each candidate case in the specified case library according to the hierarchical legal quotation network and the text vector may include the following steps:
Step 701, calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case; and calculating the text similarity between the text vector and the text vector of each candidate case.
In some embodiments of the present description, a metaath 2Vec algorithm may be invoked to predict the structural similarity of the hierarchical legal strip referencing network to the hierarchical legal strip referencing network of each of the candidate cases, respectively. The Metapath2vec algorithm is an unsupervised method and is mainly used for tasks such as node classification, link prediction, sub-graph matching and the like in graph data. In the edge prediction task, the metaath 2vec algorithm uses a random walk generation sequence and predicts the presence or absence of an edge by learning node embeddings. In the embodiment of the present disclosure, the hierarchical normal reference network of the target case and the hierarchical normal reference network of each candidate case may be mapped to a high-dimensional vector space (i.e. converted into a vector) by using the metaath 2vec algorithm, and the similarity calculation is performed in the high-dimensional vector space.
Step 702, respectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case, and using the average pooled similarity as the similarity of the target case and each candidate case.
In some embodiments of the present disclosure, the respectively averaging and pooling the structural similarity and the text similarity of the target case and each of the candidate cases may include: according to the formulaRespectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case;
wherein,for the object case and->Similarity of individual candidate cases->For the object case and->Structural similarity of the candidate cases, +.>For the object case and->Text similarity of each candidate case.
Referring to fig. 8, in other embodiments of the present disclosure, calculating the similarity between the target case and each candidate case in the specified case library according to the hierarchical legal quotation network and the text vector may include the following steps:
step 801, splicing a representation vector of the hierarchical normal quotation network and the text vector in sequence to form a first fusion vector; and splicing the text vectors of each candidate case and the representation vectors of the hierarchical legal quotation network into corresponding second fusion vectors in sequence respectively.
Step 802, calculating the similarity between the first fusion vector and each of the second fusion vectors, as the similarity between the target case and each of the candidate cases.
In some embodiments of the present disclosure, determining the recommended class of the target case according to the similarity may include: sorting the similarity between the target case and each candidate case in the appointed case base; and taking the candidate case corresponding to the maximum similarity as a recommended case of the target case.
In some embodiments of the present disclosure, the similarity calculation may use any suitable similarity algorithm (e.g., cosine similarity algorithm, etc.).
While the process flows described above include a plurality of operations occurring in a particular order, it should be apparent that the processes may include more or fewer operations, which may be performed sequentially or in parallel (e.g., using a parallel processor or a multi-threaded environment).
In an exemplary embodiment of the present disclosure, the walk step of the metaath 2Vec algorithm in the hscenet network is set to 6 (because the meta path is a sequence of 6 nodes at maximum), and the dimensions of the hscenet network embedded representation and the SPb-Lawformer text embedded representation are uniformly set to 200. A comparison experiment and an ablation experiment were performed on the LeCaRD legal case retrieval dataset, i.e., a comparison experiment was performed with the existing Doc2Vec, BERT, legalBERT, BERT-PLI, lawformer model, and the hscene, SPb-Lawformer model presented in this specification (i.e., the Lawformer model with the pre-segmentation function in the examples of this specification) was performed. The effectiveness of the class recommendation method combining the legal element hierarchical network and the long text features of the embodiments of the present specification is verified through experiments. Specifically, the experiments in the examples herein evaluate the performance of the method according to the following three criteria:
(1) Correlation (Correlation): case similarity is measured by calculating pearson correlation coefficients.
(2) Mean Square Error (MSE):
wherein,is->True value of individual samples, +.>First->Predictive value of individual samples +.>Is the number of samples.
(3) F1-Score. The index is used in a binary classification setting where pairs of Chinese characters will be classified as similar/dissimilar.
Wherein,express accuracy>Representing recall.
Specifically, the experimental results are shown in table 1.
Table 1 experimental results
Corresponding to the above-mentioned case recommendation method based on the legal element hierarchical network and the text feature, the embodiment of the present disclosure further provides a case recommendation device based on the legal element hierarchical network and the text feature, which may be configured on the above-mentioned server, as shown in fig. 9, and in some embodiments of the present disclosure, the case recommendation device based on the legal element hierarchical network and the text feature may include:
the network construction module 91 is configured to generate a hierarchical legal tree and a reference legal map of the law cited by the target case, and associate the hierarchical legal tree with the reference legal map according to a reference relationship, so as to construct a hierarchical legal reference network of the target case;
The vector representation module 92 is configured to semantically divide the case summary text in the target case into a plurality of text blocks with complete semantics, and input the text blocks into a Lawformer model to obtain a text vector of the target case;
a similarity calculation module 93, configured to calculate, according to the hierarchical legal quotation network and the text vector, a similarity between the target case and each candidate case in the specified case library, respectively;
and a class recommendation module 94, configured to determine a recommended class of the target case according to the similarity.
In the class recommendation device of some embodiments of the present specification, the generating the hierarchical legal tree and the reference legal map of the law cited by the target case includes:
extracting structural information of the reference legal strips from the target case text in a full-scale mode according to the first regular expression; the structural information includes legal names, chapters, terms and term content;
constructing a tree structure taking legal names as root nodes and chapter, clause and clause contents as hierarchical sub-nodes according to the structure information, and taking the tree structure as a hierarchical legal tree of the law quoted by the target case;
and constructing a reference legal strip graph by taking each reference clause in the structural information as an independent node.
In the class recommendation device of some embodiments of the present specification, the associating the hierarchical legal strip tree with the reference legal strip graph according to a reference relationship includes:
and connecting the nodes in the hierarchical method strip tree with the nodes in the reference method strip map by lines according to the reference relation.
In some embodiments of the present disclosure, the classifying the case summary text in the target case into a plurality of text blocks with complete semantics according to semantics includes:
extracting a case summary text from the target case text according to the second regular expression;
decomposing the case summary text by taking sentences as units to form sentence sequences;
starting from the first sentence in the sentence sequence, sequentially splicing a plurality of adjacent sentences into text blocks with fixed length to obtain one or more text blocks; the fixed length is the input limit length of the Lawformer model;
and if the spliced text block is smaller than the fixed length and the total length of the next sentence adjacent to the text block is larger than the fixed length, increasing the length of the text block to the fixed length in a way of zero padding at the end of the sentence.
In some embodiments of the class recommendation device of the present disclosure, the calculating, according to the hierarchical legal system reference network and the text vector, the similarity between the target case and each candidate case in the specified case library includes:
calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case respectively; calculating the text similarity between the text vector and the text vector of each candidate case;
and respectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case, and correspondingly taking the average pooled similarity as the similarity of the target case and each candidate case.
In the class recommendation device of some embodiments of the present disclosure, the calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case includes:
and (3) invoking a Metapath2Vec algorithm to predict the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case.
In some embodiments of the present disclosure, the averaging and pooling the structural similarity and the text similarity of the target case and each of the candidate cases includes:
According to the formulaRespectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case;
wherein,for the object case and->Similarity of individual candidate cases->For the object case and->Structural similarity of the candidate cases, +.>For the object case and->Text similarity of each candidate case.
In some embodiments of the present disclosure, the class recommendation device calculates, according to the hierarchical legal citation network and the text vector, a similarity between the target case and each candidate case in the specified case library, including:
sequentially splicing the representation vector of the hierarchical legal quotation network and the text vector into a first fusion vector; the text vector of each candidate case and the representation vector of the hierarchical legal quotation network are spliced in sequence to form a corresponding second fusion vector;
and calculating the similarity of the first fusion vector and each second fusion vector to serve as the similarity of the target case and each candidate case.
In some embodiments of the class recommendation device of the present disclosure, the determining the recommended class of the target case according to the similarity includes:
Sorting the similarity between the target case and each candidate case in the appointed case base;
and taking the candidate case corresponding to the maximum similarity as a recommended case of the target case.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
In the embodiments of the present disclosure, the user information (including, but not limited to, user device information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) are information and data that are authorized by the user and are sufficiently authorized by each party.
Embodiments of the present description also provide a computer device. As shown in fig. 10, in some embodiments of the present description, the computer device 1002 may include one or more processors 1004, such as one or more Central Processing Units (CPUs) or Graphics Processors (GPUs), each of which may implement one or more hardware threads. Computer device 1002 may also include any memory 1006 for storing any kind of information, such as code, settings, data, etc., and in a particular embodiment, a computer program on memory 1006 and executable on processor 1004 that, when executed by the processor 1004, performs the instructions of the legal element level network and text feature based class recommendation method described in any of the embodiments above. For example, and without limitation, memory 1006 may include any one or more of the following combinations: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may store information using any technique. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 1002. In one case, when the processor 1004 executes associated instructions stored in any memory or combination of memories, the computer device 1002 can perform any of the operations of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like, for interacting with any memory.
The computer device 1002 may also include an input/output interface 1010 (I/O) for receiving various inputs (via input device 1012) and for providing various outputs (via output device 1014). One particular output mechanism may include a presentation device 1016 and an associated graphical user interface 1018 (GUI). In other embodiments, input/output interface 1010 (I/O), input device 1012, and output device 1014 may not be included as just one computer device in a network. Computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the above-described components together.
The communication link 1022 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the internet), a point-to-point connection, etc., or any combination thereof. Communication links 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), computer-readable storage media, and computer program products according to some embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processor to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processor, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processor to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processor to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computer device. Computer readable media, as defined in the specification, does not include transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present embodiments may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processors that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
It should also be understood that, in the embodiments of the present specification, the term "and/or" is merely one association relationship describing the association object, meaning that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A class recommendation method based on legal element hierarchical network and text features is characterized by comprising the following steps:
generating a layered legal tree and a reference legal map of the cited law of the target case;
associating the hierarchical legal strip tree with the reference legal strip atlas according to a reference relationship to construct a hierarchical legal strip reference network of the target case;
dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain a text vector of the target case;
according to the hierarchical legal quotation network and the text vector, calculating the similarity between the target case and each candidate case in the appointed case library;
determining a recommended case of the target case according to the similarity;
according to the hierarchical legal quotation network and the text vector, calculating the similarity between the target case and each candidate case in the appointed case base comprises the following steps:
calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case respectively; calculating the text similarity between the text vector and the text vector of each candidate case; respectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case, and correspondingly taking the average pooled similarity as the similarity of the target case and each candidate case;
Or, splicing the representation vector of the hierarchical legal quotation network and the text vector in sequence to form a first fusion vector; the text vector of each candidate case and the representation vector of the hierarchical legal quotation network are spliced in sequence to form a corresponding second fusion vector; and calculating the similarity of the first fusion vector and each second fusion vector to serve as the similarity of the target case and each candidate case.
2. The method for recommending a class based on a hierarchical network of legal elements and text features according to claim 1, wherein said generating a hierarchical legal tree and a reference legal atlas of the law referenced by the target case comprises:
extracting structural information of the reference legal strips from the target case text in a full-scale mode according to the first regular expression; the structural information includes legal names, chapters, terms and term content;
constructing a tree structure taking legal names as root nodes and chapter, clause and clause contents as hierarchical sub-nodes according to the structure information, and taking the tree structure as a hierarchical legal tree of the law quoted by the target case;
and constructing a reference legal strip graph by taking each reference clause in the structural information as an independent node.
3. The legal elements hierarchical network and text feature based class recommendation method of claim 1, wherein said associating said hierarchical legal strip tree with said reference legal strip graph according to a reference relationship comprises:
and connecting the nodes in the hierarchical method strip tree with the nodes in the reference method strip map by lines according to the reference relation.
4. The method for recommending a case based on a hierarchical network of legal elements and text features according to claim 1, wherein said semantically dividing the case summary text in the target case into a plurality of semantically complete text blocks comprises:
extracting a case summary text from the target case text according to the second regular expression;
decomposing the case summary text by taking sentences as units to form sentence sequences;
starting from the first sentence in the sentence sequence, sequentially splicing a plurality of adjacent sentences into text blocks with fixed length to obtain one or more text blocks; the fixed length is the input limit length of the Lawformer model;
and if the spliced text block is smaller than the fixed length and the total length of the next sentence adjacent to the text block is larger than the fixed length, increasing the length of the text block to the fixed length in a way of zero padding at the end of the sentence.
5. The legal element hierarchical network and text feature based class recommendation method of claim 1, wherein said calculating the structural similarity of said hierarchical legal strip referencing network to each of said candidate case's hierarchical legal strip referencing networks, respectively, comprises:
and (3) invoking a Metapath2Vec algorithm to predict the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case.
6. The legal element hierarchical network and text feature based class recommendation method of claim 1, wherein said respectively averaging and pooling structural similarity and text similarity of said target case and each of said candidate cases comprises:
according to the formulaRespectively associating the target case with the structure of each candidate caseCarrying out average pooling on the similarity and the text similarity;
wherein,for the object case and->Similarity of individual candidate cases->For the object case and->Structural similarity of the candidate cases, +.>For the object case and->Text similarity of each candidate case.
7. The method for recommending a class based on a hierarchical network of legal elements and text features according to claim 1, wherein said determining a recommended class of the target case according to the similarity comprises:
Sorting the similarity between the target case and each candidate case in the appointed case base;
and taking the candidate case corresponding to the maximum similarity as a recommended case of the target case.
8. A class recommendation device based on a legal element hierarchical network and text features, comprising:
the network construction module is used for generating a hierarchical legal tree and a reference legal map of the law quoted by the target case, and associating the hierarchical legal tree with the reference legal map according to a quotation relationship so as to construct a hierarchical legal quotation network of the target case;
the vector representation module is used for dividing the case summary text in the target case into a plurality of text blocks with complete semantics according to the semantics, and inputting the text blocks into a Lawformer model to obtain the text vector of the target case;
the similarity calculation module is used for calculating the similarity between the target case and each candidate case in the appointed case base according to the hierarchical legal quotation network and the text vector;
the class recommendation module is used for determining a recommendation class of the target case according to the similarity;
according to the hierarchical legal quotation network and the text vector, calculating the similarity between the target case and each candidate case in the appointed case base comprises the following steps:
Calculating the structural similarity between the hierarchical legal quotation network and the hierarchical legal quotation network of each candidate case respectively; calculating the text similarity between the text vector and the text vector of each candidate case; respectively carrying out average pooling on the structural similarity and the text similarity of the target case and each candidate case, and correspondingly taking the average pooled similarity as the similarity of the target case and each candidate case;
or, splicing the representation vector of the hierarchical legal quotation network and the text vector in sequence to form a first fusion vector; the text vector of each candidate case and the representation vector of the hierarchical legal quotation network are spliced in sequence to form a corresponding second fusion vector; and calculating the similarity of the first fusion vector and each second fusion vector to serve as the similarity of the target case and each candidate case.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory, characterized in that the computer program, when being executed by the processor, performs the instructions of the method according to any of claims 1-7.
10. A computer storage medium having stored thereon a computer program, which, when executed by a processor of a computer device, performs the instructions of the method according to any of claims 1-7.
CN202311437604.8A 2023-11-01 2023-11-01 Class case recommendation method and device based on legal element hierarchical network and text characteristics Active CN117149999B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311437604.8A CN117149999B (en) 2023-11-01 2023-11-01 Class case recommendation method and device based on legal element hierarchical network and text characteristics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311437604.8A CN117149999B (en) 2023-11-01 2023-11-01 Class case recommendation method and device based on legal element hierarchical network and text characteristics

Publications (2)

Publication Number Publication Date
CN117149999A CN117149999A (en) 2023-12-01
CN117149999B true CN117149999B (en) 2024-01-23

Family

ID=88897311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311437604.8A Active CN117149999B (en) 2023-11-01 2023-11-01 Class case recommendation method and device based on legal element hierarchical network and text characteristics

Country Status (1)

Country Link
CN (1) CN117149999B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201513031A (en) * 2013-09-23 2015-04-01 Chunghwa Telecom Co Ltd Method and system for recommending citation law
WO2020063512A1 (en) * 2018-09-30 2020-04-02 北京国双科技有限公司 Method for determining similar texts, method for obtaining neural network model, and related apparatus
CN115017319A (en) * 2022-07-11 2022-09-06 鹤壁职业技术学院 Construction project contract dispute law enforcement identification method based on deep neural network
CN115757819A (en) * 2022-11-08 2023-03-07 北京华夏电通科技股份有限公司 Method and device for acquiring information of quoting legal articles in referee document
CN116245167A (en) * 2023-03-28 2023-06-09 清华大学 Text encoder training method, class search method, device and electronic equipment
CN116432693A (en) * 2023-03-15 2023-07-14 北京擎盾信息科技有限公司 Method and device for constructing large-scale pre-training language model, storage medium and electronic device
CN116804997A (en) * 2023-07-19 2023-09-26 中国人民解放军国防科技大学 Chinese similar case recommending method, device and equipment based on graph neural network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201513031A (en) * 2013-09-23 2015-04-01 Chunghwa Telecom Co Ltd Method and system for recommending citation law
WO2020063512A1 (en) * 2018-09-30 2020-04-02 北京国双科技有限公司 Method for determining similar texts, method for obtaining neural network model, and related apparatus
CN115017319A (en) * 2022-07-11 2022-09-06 鹤壁职业技术学院 Construction project contract dispute law enforcement identification method based on deep neural network
CN115757819A (en) * 2022-11-08 2023-03-07 北京华夏电通科技股份有限公司 Method and device for acquiring information of quoting legal articles in referee document
CN116432693A (en) * 2023-03-15 2023-07-14 北京擎盾信息科技有限公司 Method and device for constructing large-scale pre-training language model, storage medium and electronic device
CN116245167A (en) * 2023-03-28 2023-06-09 清华大学 Text encoder training method, class search method, device and electronic equipment
CN116804997A (en) * 2023-07-19 2023-09-26 中国人民解放军国防科技大学 Chinese similar case recommending method, device and equipment based on graph neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于法条知识的刑事类案推荐模型;吴欢栋;电脑知识与技术;第第18卷卷(第第25期期);全文 *

Also Published As

Publication number Publication date
CN117149999A (en) 2023-12-01

Similar Documents

Publication Publication Date Title
Ristoski et al. Rdf2vec: Rdf graph embeddings for data mining
RU2628431C1 (en) Selection of text classifier parameter based on semantic characteristics
US9595004B2 (en) Systems and methods for semantic concept definition and semantic concept relationship synthesis utilizing existing domain definitions
CN108681557B (en) Short text topic discovery method and system based on self-expansion representation and similar bidirectional constraint
CN107688870B (en) Text stream input-based hierarchical factor visualization analysis method and device for deep neural network
US11573994B2 (en) Encoding entity representations for cross-document coreference
CN111767325B (en) Multi-source data deep fusion method based on deep learning
WO2023134057A1 (en) Affair information query method and apparatus, and computer device and storage medium
CN111737997A (en) Text similarity determination method, text similarity determination equipment and storage medium
US11645523B2 (en) Generating explanatory paths for predicted column annotations
Kathuria et al. Real time sentiment analysis on twitter data using deep learning (Keras)
Quemy et al. On integrating and classifying legal text documents
Repke et al. Extraction and representation of financial entities from text
US20120076416A1 (en) Determining correlations between slow stream and fast stream information
CN112632223B (en) Case and event knowledge graph construction method and related equipment
CN112463960B (en) Entity relationship determination method and device, computing equipment and storage medium
CN108038109A (en) Method and system, the computer program of Feature Words are extracted from non-structured text
CN117149999B (en) Class case recommendation method and device based on legal element hierarchical network and text characteristics
CN114637846A (en) Video data processing method, video data processing device, computer equipment and storage medium
CN114491076A (en) Data enhancement method, device, equipment and medium based on domain knowledge graph
CN110879853B (en) Information vectorization method and computer-readable storage medium
Tavares et al. How COVID-19 Impacted Data Science: a Topic Retrieval and Analysis from GitHub Projects’ Descriptions
US20140280149A1 (en) Method and system for content aggregation utilizing contextual indexing
CN112364666B (en) Text characterization method and device and computer equipment
CN117633197B (en) Search information generation method and device applied to paraphrasing document 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
GR01 Patent grant