A legal text retrieval method and device

By matching the fact description entered by the user with the legal problem label in the judgment document, the matching legal provisions are retrieved, which solves the problem of inaccurate keyword search in the prior art, and achieves more accurate and applicable legal provision search.

CN114579770BActive Publication Date: 2025-03-21ALIBABA DAMO (HANGZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210119189.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-08
Publication Date
2025-03-21
Estimated Expiration
2042-02-08

AI Technical Summary

Technical Problem

The existing legal provision search methods mainly rely on keyword search, resulting in inaccurate search results and the applicability of legal provisions is not considered.

Method used

By obtaining the fact description entered by the user, inputting it into the classification module to obtain the corresponding legal issue label, and then matching it with the legal issue label in the judgment document to determine the degree of matching between the legal provisions and the fact description in the judgment document, thereby retrieving the target legal provisions.

Benefits of technology

The accuracy of the search results is improved, and users can retrieve the required content without understanding the expression of legal provisions. The applicability of legal provisions is taken into account, and it applies to users who are familiar with and unfamiliar with the law.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579770B_ABST
    Figure CN114579770B_ABST
Patent Text Reader

Abstract

The present specification provides a legal text retrieval method and device, which obtain the fact description to be retrieved; input the fact description to be retrieved into a classification module to obtain a first legal issue label corresponding to the fact description to be retrieved; match the first legal issue label with the second legal issue label corresponding to each judicial document in a judicial document collection to obtain the matching degree between each judicial document and the fact description to be retrieved; determine the clause matching degree between each legal clause included in each judicial document and the fact description to be retrieved based on the matching degree between each judicial document and the fact description to be retrieved and the legal clauses cited in each judicial document; retrieve the target legal clause corresponding to the fact description to be retrieved from each legal clause based on the clause matching degree of each legal clause.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer application technology, and more particularly, to a method and device for searching legal texts. Background Art

[0002] With the progress of legal education, more and more people know and understand the law, and more and more people will search for legal solutions online when encountering problems. This has led to more and more people having the need to search for legal provisions.

[0003] In the related art, the search for legal provisions generally only supports searching based on keywords. Specifically, after the user enters keywords, the legal provision search system will retrieve the legal provisions containing the keywords entered by the user from its own database and return the retrieved legal provisions to the user.

[0004] The method of searching legal texts by keywords in the related art does not take the applicability of the legal texts into consideration, resulting in inaccurate search results. Summary of the invention

[0005] In view of this, one or more embodiments of this specification provide a legal text retrieval method and device.

[0006] According to a first aspect of one or more embodiments of this specification, a legal text retrieval method is proposed, the method comprising:

[0007] Obtaining a description of facts to be retrieved; the description of facts is a description of a legal issue;

[0008] Inputting the fact description to be retrieved into a classification module to obtain a first legal issue label corresponding to the fact description to be retrieved, wherein the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs;

[0009] Matching the first legal issue label with the second legal issue label corresponding to each judgment document in the judgment document set to obtain a matching degree between each judgment document and the fact description to be retrieved, wherein the second legal issue label is used to indicate the legal category to which the fact description included in the judgment document belongs;

[0010] According to the matching degree between each judgment document and the description of the facts to be searched, and the legal provisions cited in each judgment document, the matching degree between each legal provision included in each judgment document and the description of the facts to be searched is determined;

[0011] According to the matching degree of each legal article, the target legal article corresponding to the fact description to be retrieved is retrieved from each legal article.

[0012] According to a second aspect of one or more embodiments of this specification, a smart court system is provided, wherein the smart court system comprises at least a legal text retrieval module;

[0013] The legal text retrieval module performs:

[0014] When it is detected that the judge has selected a fact description in the indictment or complaint in the file reading interface, the fact description selected by the judge is used as the fact description to be retrieved;

[0015] Retrieving the target legal provision according to the legal provision retrieval method according to any one of claims 1 to 7;

[0016] The retrieved target legal provisions are displayed in the examination interface so that the judge can make a judgment based on the target legal provisions.

[0017] According to a third aspect of one or more embodiments of this specification, a legal consultation system is provided, wherein the legal consultation system is used to match an informant with an answerer, and the answerer is responsible for answering the legal questions provided by the informant; the legal consultation system at least includes a legal provision retrieval module;

[0018] The legal text retrieval module performs:

[0019] After detecting that the respondent has selected the fact description of the legal issue input by the inquirer, the selected fact description is used as the fact description to be retrieved, and the target legal provision is retrieved by the above-mentioned legal provision retrieval method;

[0020] The target legal provisions are sent to the respondent so that the respondent can provide legal consulting services to the consultant based on the target legal provisions.

[0021] According to a fourth aspect of one or more embodiments of this specification, a legal text retrieval device is provided, the device comprising:

[0022] A fact description acquisition module is used to acquire a fact description to be retrieved; the fact description is a description of a legal issue;

[0023] A classification module, used for inputting the fact description to be retrieved into the classification module, and obtaining a first legal issue label corresponding to the fact description to be retrieved, wherein the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs;

[0024] a matching module, used to match the first legal issue label with a second legal issue label corresponding to each judgment document in the judgment document set, to obtain a matching degree between each judgment document and the fact description to be retrieved, wherein the second legal issue label is used to indicate the legal category to which the fact description included in the judgment document belongs;

[0025] A clause matching degree determination module, used to determine the clause matching degree between each legal clause included in each judgment document and the fact description to be retrieved, based on the matching degree between each judgment document and the fact description to be retrieved, and the legal clauses cited in each judgment document;

[0026] The target legal article retrieval module is used to retrieve the target legal article corresponding to the fact description to be retrieved from each legal article according to the article matching degree of each legal article.

[0027] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned legal text retrieval method is implemented.

[0028] According to a sixth aspect of the embodiments of this specification, there is provided an electronic device, including:

[0029] processor;

[0030] a memory for storing processor-executable instructions;

[0031] The processor executes the executable instructions according to the above-mentioned legal text retrieval method.

[0032] The present specification provides a legal text retrieval method, which obtains a description of facts to be retrieved; the description of facts is a description of legal issues; the description of facts to be retrieved is input into a classification module to obtain a first legal issue label corresponding to the description of facts to be retrieved, the first legal issue label is used to indicate the legal category to which the description of facts to be retrieved belongs; the first legal issue label is matched with a second legal issue label corresponding to each judicial document in a judicial document collection to obtain a matching degree between each judicial document and the description of facts to be retrieved, the second legal issue label is used to indicate the legal category to which the description of facts included in the judicial document belongs; based on the matching degree between each judicial document and the description of facts to be retrieved, and the legal texts cited in each judicial document, the text matching degree between each legal text included in each judicial document and the description of facts to be retrieved is determined; based on the text matching degree of each legal text, a target legal text corresponding to the description of facts to be retrieved is retrieved from each legal text.

[0033] Through the above method, firstly, by entering the fact description instead of keywords, users can retrieve the legal provisions they need even if they are not familiar with the expression of the legal provisions, making the search results more accurate. Secondly, by matching the fact description entered by the user with the fact description of the judgment document, the search takes into account the applicability of the law, further improving the accuracy of the search results. Finally, there is no need for users to enter the search scope, so that users who are not familiar with the law can also better use the legal provision search system.

[0034] The legal text search method disclosed in this specification improves the accuracy of the search results, and enables users who are familiar with the law (lawyers, judges, etc.) and users who are not familiar with the law (ordinary people) to use the legal text search system well to retrieve the legal texts they need.

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

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles of the specification.

[0037] Figure 1 It is a schematic diagram of a legal text retrieval system in the related technology shown in this specification according to an embodiment.

[0038] Figure 2 It is a flow chart of a legal text retrieval method shown in this specification according to an exemplary embodiment.

[0039] Figure 3 It is a schematic diagram of a legal text retrieval system shown in this specification according to a specific embodiment.

[0040] Figure 4 It is a block diagram of a legal text retrieval device according to an exemplary embodiment of the present specification.

[0041] Figure 5 This is a hardware structure diagram of an electronic device in which a legal text retrieval device is located according to an exemplary embodiment of this specification. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0043] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0044] In order to meet the needs of legal text retrieval, there is a method of searching legal texts by keywords in the related technology. Specifically, Figure 1 As shown, general regulations (referring to laws and regulations applicable nationwide, corresponding to local regulations), local regulations, legislative materials and legislative plans are the search scopes that users can choose, and search titles and search full text are two search methods that users can choose. For example, when a user selects general regulations and enters "Constitution" in the search title, the legal article retrieval system will retrieve legal articles with titles including "Constitution" in the general regulations; when a user selects local regulations and enters "illegal parking" in the search full text, the legal article retrieval system will retrieve legal articles with full texts including "illegal parking" in the local regulations.

[0045] The above-mentioned method of searching for legal provisions by keywords has the following problems: First, this method requires the user to determine the search scope, which is inconvenient for users who are not familiar with the law. Secondly, since only legal provisions containing keywords will be retrieved during the search, and the expression of legal provisions is different from daily conversations, it is difficult for users who do not understand the expression of legal provisions to obtain the legal provisions they need. Finally, the issue of legal applicability is not considered when searching for legal provisions. In other words, the application of legal provisions in actual cases is not considered, which may result in the retrieved legal provisions being inaccurate.

[0046] In order to solve the above problems, this specification provides a legal text retrieval method to obtain a description of facts to be retrieved; the description of facts is a description of legal issues; the description of facts to be retrieved is input into a classification module to obtain a first legal issue label corresponding to the description of facts to be retrieved, the first legal issue label is used to indicate the legal category to which the description of facts to be retrieved belongs; the first legal issue label is matched with a second legal issue label corresponding to each judicial document in a judicial document collection to obtain a matching degree between each judicial document and the description of facts to be retrieved, the second legal issue label is used to indicate the legal category to which the description of facts included in the judicial document belongs; according to the matching degree between each judicial document and the description of facts to be retrieved, and the legal texts cited in each judicial document, the text matching degree between each legal text included in each judicial document and the description of facts to be retrieved is determined; according to the text matching degree of each legal text, the target legal text corresponding to the description of facts to be retrieved is retrieved from each legal text.

[0047] Through the above method, firstly, by entering the fact description instead of keywords, users can retrieve the legal provisions they need even if they are not familiar with the expression of the legal provisions, making the search results more accurate. Secondly, by matching the fact description entered by the user with the fact description of the judgment document, the search takes into account the applicability of the law, further improving the accuracy of the search results. Finally, there is no need for users to enter the search scope, so that users who are not familiar with the law can also better use the legal provision search system.

[0048] The legal text search method disclosed in this specification improves the accuracy of the search results, and enables users who are familiar with the law (lawyers, judges, etc.) and users who are not familiar with the law (ordinary people) to use the legal text search system well to retrieve the legal texts they need.

[0049] Next, a legal text retrieval method provided in this manual will be described in detail.

[0050] like Figure 2 As shown, Figure 2 This is a flowchart of a legal text search method shown in this specification, which includes the following steps:

[0051] Step 201, obtain the fact description to be retrieved.

[0052] Specifically, in order to accurately obtain legal text search results, it is first necessary to obtain the search input. Considering that the factual description method as the search input is more convenient for people who do not understand the expression method of legal texts, it is necessary to obtain the factual description.

[0053] After explaining the overall purpose of step 201, it is first necessary to explain the application subject of the legal article retrieval method. The method can be applied to a legal article retrieval system. The legal article retrieval system is the legal article retrieval system mentioned above. The legal article retrieval system can provide users with legal article retrieval services through web pages, and can also provide users with legal article retrieval services through a client. This specification does not limit the form of the legal article retrieval system.

[0054] After explaining the legal text retrieval system, the description of facts to be retrieved in step 201 will be explained next. Specifically, as for the source of the fact description, the fact description can be directly input by the user; when the processing pressure of the legal text retrieval system is relatively large, the fact description input by the user cannot be processed in time, then the fact description can be temporarily stored in the storage space of the legal text retrieval system, and after the legal text retrieval system processes the fact description input before the fact description is input, the stored fact description to be retrieved will be obtained from the storage space of the legal text retrieval system, and the fact description will be retrieved.

[0055] As for the meaning of fact description, the fact description is a description of legal issues. Specifically, the source of fact description is the user's input, and the fact description is the legal issue described by the user in words. For example, the fact description can be "My unit has modified the rules and regulations on salary without notifying me, and my salary has been reduced."

[0056] Step 203: input the fact description to be retrieved into the classification module to obtain the first legal issue label corresponding to the fact description to be retrieved.

[0057] Step 205, matching the first legal issue label with the second legal issue label corresponding to each judgment document in the judgment document set, and obtaining the matching degree between each judgment document and the fact description to be retrieved.

[0058] Next, step 203 and step 205 will be described collectively.

[0059] Specifically, through the classification module, the fact description (if not otherwise specified in the following text, the fact description refers to the fact description to be retrieved) is classified to obtain the first legal issue label corresponding to the fact description, and then the first legal issue label and the second legal issue label of the judgment document are used for retrieval to obtain the judgment document that matches the fact description.

[0060] It should be noted that the reason for choosing to search for judicial documents through the first legal issue label rather than matching the feature vector converted from the factual description with the feature vector converted from the factual description of the judicial document is that if the matching judicial documents are determined only through the feature vector, the matched judicial documents obtained are only those that are semantically similar to the factual description; and in some cases, some judicial documents are semantically dissimilar to the factual description, but belong to the same legal category. If the matching judicial documents are retrieved through the feature vector, some judicial documents that are semantically dissimilar but belong to the same legal category will be missed.

[0061] For example, the factual description of the judgment document describes the problem of unequal distribution of inheritance, but the problem of unequal distribution of inheritance among multiple children of an elderly person is described in the factual description to be retrieved, which describes the problem of unequal distribution of inheritance between the wife and parents of the deceased. Both of them belong to the legal category of inheritance distribution, but they may have different semantics due to different subjects and different expressions. If the judgment document is retrieved by feature vector, such judgment documents with different semantics but belonging to the same legal category will be missed. It can be seen that retrieving judgment documents matching the factual description by the first legal issue label can make the search results richer without losing the search accuracy.

[0062] It should also be noted that the choice of searching through judicial documents in this manual is to fully consider the applicability of each legal provision to retrieve the legal provisions required by the user. If only the legal provisions themselves are used for searching, it may not be easy to get accurate results. Judgment documents are obtained by judges through legal knowledge to analyze the facts identified. Therefore, there is the use of legal provisions in judicial documents. Searching through judicial documents can take into account the applicability of legal provisions.

[0063] After explaining the reasons for searching through the first legal issue label and the reasons for selecting judicial documents for searching, the nouns involved in step 203 and step 205 will be explained next.

[0064] First, the classification module refers to a module for classifying fact descriptions, which is pre-trained. The module can be implemented by a bidirectional encoder representation (Bidirectional Encoder Representation from Transformers, Bert) series classifier based on a transformer. Specifically, the fact description can be encoded by Bert first, and then the encoded fact description can be classified by the classifier to obtain the first legal issue label of the fact description. It should be noted that the encoding model for the fact description is not necessarily Bert, but can also be other text encoders, and this specification does not limit this.

[0065] The classification module can filter out several legal issue tags that match the fact description from all legal issue tags as the first legal issue tag. The classification module can not only classify the fact description to be retrieved, but also classify the fact description of the judgment document. Of course, other classification modules can also be used to classify the fact description of the judgment document, and this specification does not limit this.

[0066] Secondly, the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs, and the second legal issue label is used to indicate the legal category to which the fact description included in the judgment document belongs. The difference between the first legal issue label and the second legal issue label is only the subject. In other words, the same legal issue label, if it is the legal issue label of the fact description to be retrieved, then the legal issue label is the first legal issue label; if it is the legal issue label of the judgment document, then the legal issue label is the second legal issue label. In addition, the number and form of the legal issue labels are described in detail below, which will not be repeated here. It should also be noted that a first legal issue label refers to a label, and a second legal issue label refers to a label. If not specified, the first legal issue label corresponding to the fact description refers to all legal issue labels corresponding to the fact description, and the second legal issue label corresponding to the judgment document refers to all legal issue labels corresponding to the judgment document.

[0067] It should also be noted that judicial documents generally include judgments, rulings, mediations, decisions, notices and orders, among which rulings, mediations, decisions, notices and orders generally only cite the Civil Procedure Law of the People's Republic of China, and do not cite other laws, and may not contain factual descriptions. Therefore, the judicial documents involved in this specification refer to judgments, and are judgments where there are plaintiffs and defendants.

[0068] For the second legal issue label of the judgment document, it is necessary to first filter out the factual description of the judgment document, and then classify the factual description of the judgment document to obtain the second legal issue label of each judgment document. A method for filtering the factual description part of the judgment document is described below.

[0069] For the first instance, the factual description included in the judgment document will generally follow "After trial, this court has determined the facts as follows", "After trial, this court has determined the facts as follows", etc., so the content after these words can be used as the factual description of the judgment document. In other words, keywords such as "this court", "determined", "facts", etc. can be used to make the content after these keywords and before "this court believes" as the factual description of the judgment document.

[0070] For the second instance, if the second instance court agrees with the facts found by the first instance court, it will mention "This court confirms the facts found in the first instance after trial", "The first instance judgment finds the facts to be true", etc. If the facts found in the first instance are true, the content after "The first instance court found the facts" and "The first instance court found out" and before "This court believes" in the judgment document can be used as the fact description of the judgment document. If the facts found by the second instance court and the first instance court are different, it will be stated in the judgment document that "This court found the following facts in the second instance" or "This court finds the following facts", etc. Therefore, when the above keywords appear, the content after the above keywords and before "This court believes" can be used as the fact description of the judgment document.

[0071] For the retrial, similar to the second instance, the judgment document will first state the facts determined in the first instance / first instance and the second instance. If the retrial court agrees with the facts determined in a certain review, it will mention the sentence that agrees with the facts determined in that review. In this case, the content after this sentence and before "this court believes" can be used as the fact description of the judgment document. If the retrial court disagrees with the facts determined in the previous review, it will mention a sentence like "this court determines the facts as follows", and the content after this sentence and before "this court believes" can be used as the fact description.

[0072] In addition, the factual description part of the judicial document can also be screened through a neural network model. For example, Bert can be used to determine the beginning and end of the factual description of the judicial document. This specification does not limit the method of screening the factual description part of the judicial document.

[0073] After explaining the factual description of the judgment document, the "matching degree" will be explained. The matching degree between the judgment document and the factual description to be retrieved represents the similarity between the first legal issue label and the second legal issue label. In other words, the more similar the first legal issue label of the factual description and the second legal issue label of the judgment document are, the higher the matching degree between the two. The specific method of determining the judgment document and the factual description to be retrieved is described below and will not be repeated here.

[0074] Step 207, based on the matching degree between each judicial document and the description of facts to be retrieved, and the legal provisions cited in each judicial document, determine the matching degree between each legal provision included in each judicial document and the description of facts to be retrieved.

[0075] Step 209: According to the matching degree of each legal article, the target legal article corresponding to the fact description to be retrieved is retrieved from each legal article.

[0076] Next, step 207 and step 209 will be described.

[0077] Specifically, step 205 obtains the matching degree between the judgment document and the factual description, and what the legal article retrieval system needs to output is the legal article that matches the factual description. Therefore, it is necessary to determine the matching degree between the factual description and each legal article based on the matching degree between the judgment document and the factual description, and then determine the target legal article based on the article matching degree, so as to return the target legal article to the user and complete the retrieval of the legal article. It should be noted that the number of target legal articles returned to the user can be one or more, and this specification does not limit this.

[0078] After explaining the overall purpose of steps 207 and 209, the specific implementation of steps 207 and 209 will be explained below.

[0079] Among them, the clause matching degree between the legal provision and the fact description to be retrieved represents whether the legal provision is applicable to the fact description. Specifically, the more applicable a legal provision is to the fact description, the higher the clause matching degree between the legal provision and the fact description to be retrieved.

[0080] Among them, the method of determining the legal provisions cited in each judgment document can be to screen out the content in the judgment document with the following format: the title is followed by the Mth article (M can be any natural number, the same below, such as Article 60 of the Contract Law of the People's Republic of China), or the title is followed by multiple Mth articles and the multiple Mth articles are separated by a semicolon or a comma or a word indicating the meaning of "and" (such as Article 39, Article 40, Article 41, Article 60, Article 96, Article 97, Article 107, and Article 114 of the Contract Law of the People's Republic of China). Of course, the legal provisions cited in each judgment document can also be determined based on other relevant technologies. In order to improve efficiency, the determination of the legal provisions cited in each judgment document can be completed and stored before retrieval.

[0081] For step 207, each judgment document will cite several legal provisions. When the matching degree between each judgment document and the factual description is known, the matching degree between each legal provision and the factual description can be determined in the following manner: first, the judgment documents whose matching degree with the factual description is greater than a preset threshold are screened out, and then the legal provisions cited by each screened judgment document are determined, and the number of times each legal provision is cited in these judgment documents is counted, and the number of citations is used as the matching degree between each legal provision and the factual description. This method can more conveniently determine the matching degree between each legal provision and the factual description.

[0082] In order to improve accuracy and consider the application of laws in more judicial documents, for step 207, the matching degree of each legal provision and the factual description can also be determined in the following way: for each judicial document, according to the matching degree between the judicial document and the factual description to be retrieved, the matching degree of each legal provision cited by the judicial document and the factual description to be retrieved is obtained; for each legal provision, according to the matching degree between the legal provision and the factual description to be retrieved corresponding to each judicial document that cited the legal provision, the matching degree of the legal provision is obtained.

[0083] For each judgment document, the matching degree between the judgment document and the description of facts to be retrieved can be directly used as the matching degree between the various legal provisions cited by it and the description of facts, or the matching degree between the judgment document and the description of facts to be retrieved can be divided by the number of legal provisions cited by the judgment document, and the result can be used as the matching degree between the various legal provisions cited by the judgment document and the description of facts to be retrieved. The matching degree between the various legal provisions cited by the judgment document and the description of facts can also be determined according to the position of the cited legal provisions in the judgment document. Specifically, if a legal provision is cited in the middle or earlier position of the judgment document (generally, it may be a legal provision cited in the previous review), a smaller weight is set for the legal provision. If a legal provision is cited at the last position of the judgment document, a higher weight is set for the legal provision. The weight of each legal provision is multiplied by the similarity between the judgment document and the description of facts to obtain the similarity between the legal provision and the description of facts for the judgment document.

[0084] In order to facilitate subsequent calculations, before obtaining the clause matching degree, the similarities between each judgment document and the fact description may be normalized so that the sum of the similarities between each judgment document and the fact description is 1. The specific normalization method may be normalization through softmax, and of course other normalization methods may also be used.

[0085] It should be noted that only a few examples are given here to illustrate the specific implementation of step 207. These examples do not represent a limitation on step 207. Step 207 can also be implemented through other ways.

[0086] For step 209, the implementation method can be: taking the legal provision with a clause matching degree greater than a preset clause matching degree threshold as the target provision, or taking the first N legal provisions with the largest clause matching degrees as the target provision (N can be a preset natural number). Of course, the method of determining the target legal provision is not limited to the above, as long as it satisfies: the clause matching degree between the selected target legal provision and the factual description is greater than the clause matching degree of any unselected legal provision (that is, other legal provisions except the target legal provision).

[0087] After explaining the specific implementation methods of step 207 and step 209, it is also necessary to explain that most judicial documents will cite specific legal provisions in the litigation law (specific legal provisions are legal provisions that must be cited when making judicial documents). These legal provisions may not be helpful in solving the user's problem. In other words, the target legal provisions do not include the above-mentioned specific legal provisions.

[0088] In addition, most judicial documents will not quote the specific content of legal provisions in the text, but only the titles of legal provisions. For example, Article 60 of the Contract Law of the People's Republic of China, when the target legal provision is the title, the title can be returned to the user. In order to make it more intuitive for users, the specific content of the legal provision can also be returned to the user.

[0089] The specific implementation of step 205 will be described in detail below in combination with the number and form of the legal issue tags.

[0090] First, the method for obtaining the second legal issue label corresponding to each judicial document is explained.

[0091] Regarding the timing of obtaining the second legal issue label, the second legal issue label corresponding to each judgment document can be obtained when matching the first legal issue label and the second legal issue label; in order to reduce processing pressure, the second legal issue label can also be pre-acquired and stored in a storage medium.

[0092] As for the method of obtaining the second legal issue label, it can be obtained through a neural network model, such as through the above-mentioned classification module, or through other classification modules. It should be noted that if the modules used to obtain the first legal issue label and the second legal issue label are different, all the classifiable labels of these two different modules are the same (that is, the labels used for classification are the same).

[0093] If it is obtained through the above-mentioned classification module and is stored in the storage medium after being pre-acquired, then the above-mentioned method also includes: inputting the factual description of each judicial document into the classification module to obtain the second legal issue label corresponding to each judicial document; and storing the second legal issue label corresponding to each judicial document.

[0094] After explaining the method for obtaining the second legal issue label, the specific implementation method of step 205 will be explained next.

[0095] First, since the first legal issue label and the second legal issue use a set of classification systems, the first legal issue label and each second legal issue label can be converted into a Q-dimensional vector (one-hot vector) respectively, where Q is the number of all classification labels that can be used in the classification module. The Q-dimensional vector is a dense vector where each bit is either 0 or 1. Then, the similarity between the first legal issue label and each second legal issue label is used to determine the matching degree between each judgment document and the factual description.

[0096] In other words, step 105 specifically includes: converting the first legal issue label into a first label vector; obtaining the second label vector converted from the second legal issue label corresponding to each judicial document; calculating the similarity between the first label vector and each second label vector, and obtaining the matching degree between each judicial document and the fact description to be retrieved based on the similarity.

[0097] It should be noted that the matching degree between each judicial document and the description of the facts to be retrieved can be obtained based on the similarity. The similarity can be directly used as the matching degree between each judicial document and the description of the facts to be retrieved, or the similarity can be multiplied by a preset coefficient and the multiplied content can be used as the matching degree between each judicial document and the description of the facts to be retrieved.

[0098] The first legal issue label refers to all legal issue labels corresponding to the fact description. The first label vector is used to characterize the matching degree between the fact description and each legal issue label, and the second label vector corresponding to any judgment document is used to characterize the matching degree between the judgment document and each legal issue label. The similarity between the first label vector and the second label vector can be represented by cosine similarity or by Euclidean distance. Of course, it can also be calculated by other algorithms for characterizing vector similarity, which is not limited in this specification.

[0099] The first label vector and the second label vector can be obtained by directly converting each label into a Q-dimensional vector. For example, suppose there are three legal labels that can be used for classification, namely private lending, joint debt of husband and wife, and unagreed interest (it should be noted that there are not only three labels, and the labels cannot be only about borrowing money. For the convenience of example, only these three labels are used here, and the following examples do not represent limitations on labels). In addition, suppose that the first legal issue label of the fact description is private lending, the two second legal issue labels of judgment document A are private lending and joint debt of husband and wife, and the two second legal issue labels of judgment document B are private lending and unagreed interest. Then the first label vector corresponding to the fact description is (1,0,0), the second label vector corresponding to judgment document A is (1,1,0), and the second label vector corresponding to judgment document B is (1,0,0).

[0100] In addition, considering that different legal issue labels have different effects on the matching degree, for example, for debt-related judicial documents, most of the judicial documents may have a second legal issue label of failure to repay as agreed, while only a small number of judicial documents will have a second legal issue label of failure to agree on interest. Then, for the factual description, if you want to find a judicial document that matches the factual description more, since most of the debt-related judicial documents will be matched with the legal issue label of failure to repay as agreed, you should consider the role of the second legal issue label of failure to agree on interest, which will help improve the accuracy of the matching degree.

[0101] In other words, it is necessary to set a weight for each legal issue label. For legal issue labels in the same litigation field, the more judicial documents a certain legal issue label matches (matching means that the judicial document has the legal issue label), the lower the weight of the legal issue label. Therefore, when obtaining the first label vector and the second label vector, the weight of each first label vector can be considered to obtain them. Specifically, in the case where there are multiple first legal issue labels; the conversion of the first legal issue label into the first label vector includes: according to the multiple first legal issue labels corresponding to the fact description to be retrieved, and the preset weights corresponding to each first legal issue label, the multiple first legal issue labels corresponding to the fact description to be retrieved are converted into the first label vector.

[0102] For example, suppose there are four legal issue labels, namely private lending, joint debt of husband and wife, unagreed interest, and failure to repay as agreed. Assume that the number of judgment documents matched to private lending is A, and the preset weight is a; the number of judgment documents matched to joint debt of husband and wife is B (here A and B are different from judgment documents A and B in the previous text), and the preset weight is b; the number of judgment documents matched to unagreed interest is C, and the preset weight is c; the number of judgment documents matched to failure to repay as scheduled is D, and the preset weight is d; the size relationship is D>A>B>C (here this quantitative size relationship is used as an example, and this quantitative relationship does not represent the actual situation). In this case, the size relationship of the preset weights of the four legal issue labels is: d <a<b<c。

[0103] Secondly, the specific implementation method of the above-mentioned step 205 can achieve better results when the number of first legal issue labels is large, and when the number of first legal issue labels is small, step 205 can be achieved by directly comparing the first legal issue labels corresponding to the factual description with the second legal issue labels of each judicial document. For each judicial document, the number of legal issue labels whose second legal issue labels are the same as the first legal issue labels of the judicial document is determined as the matching degree between the judicial document and the factual description.

[0104] For example, suppose there are three legal labels that can be used for classification, namely private lending, joint debt of husband and wife, and unagreed interest. Also suppose that the first legal issue label of the fact description is private lending, and the two second legal issue labels of judgment document A are private lending and joint debt of husband and wife, and the second legal issue labels of judgment document B are joint debt of husband and wife. Then it can be seen that the fact description and judgment document A have 1 identical label (private lending), so it can be determined that the matching degree between judgment document A and the fact description is 1, and the fact description judgment document B does not have the same label, so it can be determined that the matching degree between judgment document B and the fact description is 0.

[0105] In addition, when there are multiple levels of labels, and the label with the smallest level in the multiple levels of labels is the label with the largest range of legal issues, the labels are then sorted from small to large in order, and for every two adjacent labels, the label with the larger serial number is a subcategory of the label with the smaller serial number. Taking two-level labels as an example, the above-mentioned multi-level labels are: the first legal issue label and the second legal issue label include a first-level label and a second-level label respectively, the first-level label indicates that the legal category to which the fact description belongs is the first category, the second-level label indicates that the legal category to which the fact description belongs is the second category, and the second category is a subcategory of the first category.

[0106] For example, assuming that all first-level labels used for classification include criminal law issues and civil law issues (this is just an example and does not represent a limitation on the first-level labels), and the second-level labels are subcategories of criminal law issues and civil law issues, for example, all second-level labels used for classification include: A, B, C (ABC here has a different meaning from ABC above) and economic disputes, marital disputes (this is just an example and does not represent a limitation on the second-level labels), ABC belongs to the subcategory of criminal law issues and is the second-level label corresponding to criminal law issues; economic disputes and marital disputes belong to the subcategory of civil law issues, that is, both are the second-level labels corresponding to civil law issues.

[0107] It should be noted that the above examples do not represent limitations on this specification. In addition to the first-level labels and second-level labels, there can also be third-level labels, fourth-level labels, and so on. In this case, the classification module can be classified according to the label level. In other words, the first-level label of the fact description is first classified, and then the second-level label corresponding to the first-level label is classified to obtain the second-level label of the fact description. It should also be noted that the number of each level of labels classified by the classification module can be 1 or more. In the case of multiple labels, the multiple labels can belong to the same subcategory or different subcategories.

[0108] In the above case, the processing efficiency can be improved in the following way: considering that the method of obtaining the matching degree of each judgment document and the fact description in step 205 is relatively complicated, in the case of multi-level labels, a set of judgment documents containing a small number of judgment documents can be pre-screened according to the characteristics of the multi-level labels. Specifically, judgment documents with first-level labels corresponding to the fact description can be screened out first, and then judgment documents with second-level labels corresponding to the fact description can be further screened out from the screened judgment documents, and so on, until the number of screened judgment documents is less than the preset threshold, or the preset label level is screened out.

[0109] In other words, before executing step 205, it is necessary to obtain a collection of judicial documents. The example of the existence of first-level legal labels and second-level legal labels is used to illustrate how to obtain the collection of judicial documents: based on the matching degree between the first legal issue label and the first-level label included in the second legal issue label corresponding to each judicial document, an initial collection of judicial documents is obtained, and the first-level label of the factual description included in each judicial document in the initial collection of judicial documents matches the first-level label of the factual description to be retrieved; based on the matching degree between the first legal issue label and the second-level label included in the second legal issue label corresponding to each judicial document, a collection of judicial documents is obtained from the initial collection of judicial documents, and the second-level label of the factual description included in each judicial document in the collection of judicial documents matches the second-level label of the factual description to be retrieved.

[0110] It should be noted that the method for obtaining the matching degree of the first-level label here is simpler than the method for obtaining the matching degree of the clause in step 205. For example, the matching degree of the first-level label (or any level label) here can be obtained in the following way: for each level label, determine whether each judgment document contains the label of the level of the fact description. If both are included, set the matching degree to 1; if any label of the level of the judgment document is not included, set the matching degree to 0; the matching degree of the first-level label (or any level label) here can also be obtained in the following way: for each level label, determine the number of overlaps between each judgment document and the label of the level of the fact description. If the number of overlaps is greater than the corresponding number threshold, set the matching degree to 1, otherwise set the matching degree to 0. Of course, the above two examples do not represent limitations on obtaining a collection of judgment documents in this specification.

[0111] It should also be noted that, although only two levels of labels are given in the above example, the above method is still applicable when there are three levels of labels. Specifically, when there is a third-level label that is used to characterize that the legal category to which the fact description belongs is the third category, the set of judicial documents obtained by filtering through the second-level labels can be directly used as the corresponding set of judicial documents, or another screening can be performed based on the third-level documents.

[0112] If it is the latter, the above-mentioned obtaining a set of judgment documents from the initial set of judgment documents based on the matching degree between the first legal issue label and the second-level label included in the second legal issue label corresponding to each judgment document, wherein the second-level label of the fact description included in each judgment document in the set of judgment documents matches the second-level label of the fact description to be retrieved, includes:

[0113] According to the matching degree between the first legal issue label and the second-level label included in the second legal issue label corresponding to each judicial document, a reference judicial document set is obtained from the initial judicial document set, and the second-level label of the fact description included in each judicial document in the reference judicial document set matches the second-level label of the fact description to be retrieved; according to the matching degree between the first legal issue label and the third-level label included in the second legal issue label corresponding to each judicial document, a judicial document set is obtained from the initial judicial document set, and the second-level label of the fact description included in each judicial document in the judicial document set matches the second-level label of the fact description to be retrieved.

[0114] The same applies to the case where there is a fourth-level tag, and this manual will not go into details.

[0115] After explaining the specific implementation of step 205, it is also necessary to explain that this specification not only provides a method for retrieving legal provisions through judicial documents, but also provides a method for jointly retrieving legal provisions based on judicial documents and legal provisions themselves.

[0116] In other words, the method of this specification also includes: encoding the description of facts to be retrieved to obtain a feature vector of the description of facts to be retrieved; matching the feature vector of the description of facts to be retrieved with the feature vector of each legal provision to obtain a second provision matching degree between each legal provision and the description of facts to be retrieved.

[0117] That is to say, the feature vector corresponding to the factual description is matched with the feature vector corresponding to the legal provision to obtain the second provision matching degree of each legal provision relative to the factual description.

[0118] After obtaining the second article matching degree, two legal article sets can be screened out based on the second article matching degree and the article matching degree obtained through the judgment document above, and then the two legal article sets are taken as a union and returned to the user.

[0119] Alternatively, the legal provisions may be outputted by combining the second provision matching degree and the provision matching degree obtained through the judgment document. Specifically, step 209 specifically includes: taking the provision matching degree between the legal provisions included in each judgment document and the fact description to be retrieved as the first provision matching degree; for each legal provision, combining the first matching degree and the second matching degree corresponding to the legal provision, obtaining the provision matching degree between the legal provision and the fact description to be retrieved; according to the provision matching degree of each legal provision, retrieving the target legal provision corresponding to the fact description to be retrieved from each legal provision.

[0120] Among them, the above-mentioned combination of the first matching degree and the second matching degree to obtain the article matching degree can be achieved by adding the first matching degree and the second matching degree of each legal article accordingly to obtain the article matching degree of each legal article; taking into account the different accuracies of the first matching degree and the second matching degree determined by the judgment document and the legal article itself, the weighted sum of the first matching degree and the second matching degree of each legal article can be used as the article matching degree of each legal article.

[0121] Through the above method, this specification achieves the following technical effects: First, the user does not need to select the search scope by any means, and the user does not need to enter keywords, but only needs to enter a continuous natural language description of the legal problem encountered, so that users who do not understand the law can also get a better user experience. Secondly, the method of this specification can also obtain a dense semantic vector of the fact description through the encoding module, and obtain the retrieved legal provisions through vector matching, so that the search results are more accurate. In addition, the method of this specification retrieves legal provisions through judicial documents, and uses judicial documents as a bridge to link the user-entered fact description and the recommended legal provisions, that is: in the process of recommending legal provisions to users, the system takes into account the applicability of legal provisions in judicial judgments, which also makes the search results more accurate.

[0122] Next, the legal text retrieval method provided in this specification will be described through a specific embodiment.

[0123] This method is applied to legal text retrieval systems, such as Figure 3 As shown, the legal article retrieval system includes four modules: fact classification module, judgment document matching module, fact coding module and legal article (that is, the abbreviation of legal article) coding module. Each module performs the following to complete the retrieval of legal articles:

[0124] (1) Fact Classification Module:

[0125] The fact classification module is a multi-label classification task, which aims to obtain the first legal issue label contained in the fact description input by the user by analyzing the characteristics of the fact description. The legal issue labels that can be used for classification are pre-defined, and the fact description of each judgment document in the judgment document collection is also marked with a corresponding second legal issue label. The specific classification method can be found in the description above.

[0126] (2) Judgment document matching module:

[0127] The judicial document matching module uses the first label output by the fact classification module as the query, and retrieves the judicial documents whose second legal issue label is most similar to the query in the judicial document collection.

[0128] Specific retrieval method: It is realized by label vectorization, that is, the first legal issue label output by the fact classification module and the second legal issue label of each judicial document are represented as one-hot vectors, and weighted according to the importance of the label (corresponding to the preset weight), to obtain the query vector (i.e. the first label vector mentioned above) and the second label vector of each judicial document. The query vector and the second label vector of each judicial document are similarly calculated and the final probability distribution of the legal provisions cited by the judicial document is obtained through softmax (i.e. the first article matching degree).

[0129] (3) Fact Encoding Module:

[0130] The fact encoding module is used to encode the fact description input by the user, and obtain a dense vector rich in semantic information through the encoder encoding, which is used for dense retrieval in legal provisions.

[0131] (4) Legal Article Coding Module

[0132] The legal article encoding module is similar to the fact encoding module and is used to encode all legal articles. Through this module, we can obtain the dense vector representation of each legal article, and calculate the similarity between it and the dense vector obtained by the fact encoder, and obtain the final probability distribution (i.e. the matching degree of the second article) through softmax. It should be noted that due to the differences in the textual expression styles of fact descriptions and legal articles, the encoders used by the legal article encoding module and the fact encoding module are independent of each other.

[0133] Finally, the two probability distributions obtained by the judgment document matching module and the legal provision coding module are added together (that is, the first article matching degree between a legal provision and the factual description, and the second article matching degree between the legal provision and the factual description are added together to obtain the article matching degree of the legal provision), and the probability distribution of the final recommended legal provision (that is, the article matching degree) is obtained, and the legal provision with the highest probability is taken as the final recommendation result.

[0134] Through the above method, when the input fact description is: "My unit has modified the rules and regulations on remuneration without notifying me, and my salary has been reduced", the legal article retrieval system will recommend the following content to the user: Article 4 of the Labor Contract Law "Employers shall establish and improve labor rules and regulations in accordance with the law to ensure that employees enjoy labor rights and perform labor obligations. When employers formulate, modify or decide on rules and regulations or major matters directly related to the vital interests of employees such as labor remuneration, working hours, rest and vacation, labor safety and health, insurance and welfare, employee training, labor discipline, and labor quota management, they shall discuss and propose plans and opinions at the employee representative conference or all employees, and determine them through equal consultation with the trade union or employee representatives. During the implementation of rules and regulations and major decisions, if the trade union or employees consider them inappropriate, they have the right to propose them to the employer and modify and improve them through consultation. Employers shall publicize rules and regulations and major decisions that directly affect the vital interests of employees, or inform employees."

[0135] In addition, in addition to being applied to the legal article retrieval system for users to directly retrieve legal articles, the above-mentioned legal article retrieval method can also be applied to smart court systems, legal consultation systems or legal aid systems. The following will describe in detail how the above-mentioned method is applied to smart court systems and legal consultation systems.

[0136] First, when the above method is applied to the smart court system, it can assist judges in making judgments. Specifically, when the judge stays on the reading interface, the judge can select the factual description in the indictment or the indictment, or select the facts recognized by the court. The smart court system can use the content selected by the judge as the factual description to be retrieved, retrieve the target legal provisions through the above method, and assist the judge in making judgments through the target legal provisions.

[0137] In other words, the present specification also provides a smart court system, which at least includes a legal text retrieval module; the legal text retrieval module executes: when it is detected that the judge selects a fact description in an indictment or a complaint in the file reading interface, the fact description selected by the judge is used as the fact description to be retrieved; the target legal text is retrieved according to the aforementioned legal text retrieval method; and the retrieved target legal text is displayed in the file reading interface for the judge to make a judgment based on the target legal text.

[0138] The file reading interface refers to the interface that the judge sees on the terminal to read files, evidence, etc. Through the above-mentioned smart court system, the judge's processing efficiency can be improved and the judge's user experience can be enhanced.

[0139] Secondly, when the above method is applied to the legal consulting system, it can assist lawyers or practitioners (i.e., respondents) who provide legal consulting services. Specifically, the legal consulting system will match each consultant with a respondent. After the respondent raises a legal question, the respondent can select a factual description of the legal question. The legal consulting system will use the selected content as the factual description to be retrieved, retrieve the legal text through the aforementioned legal text retrieval method, and send the legal text to the respondent to assist the respondent in providing legal consulting services.

[0140] In other words, the present specification also provides a legal consulting system, which is used to match the inquirer with the respondent, and the respondent is responsible for answering the legal questions provided by the inquirer; the legal consulting system includes at least a legal text retrieval module; the legal text retrieval module performs: after detecting that the respondent has selected the factual description of the legal question input by the inquirer, the selected factual description is used as the factual description to be retrieved, and the target legal text is retrieved by the aforementioned legal text retrieval method; the target legal text is sent to the respondent, so that the respondent can provide legal consulting services to the inquirer based on the target legal text.

[0141] The above legal consultation system can improve the efficiency of respondents and enhance the user experience of respondents and consultants.

[0142] In addition, the legal text retrieval method in this specification can also be applied to other scenarios where legal texts need to be retrieved, such as a legal aid system. The above two examples are just two examples and do not represent a limitation on the application scenarios of the above method in this specification.

[0143] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of a legal text retrieval device and an electronic device to which it is applied.

[0144] like Figure 4 As shown, Figure 4 This is a block diagram of a legal text retrieval device according to an exemplary embodiment of the present specification, the device comprising:

[0145] The fact description acquisition module 410 is used to acquire the fact description to be retrieved; the fact description is a description of the legal issue.

[0146] The classification module 420 is used to input the fact description to be retrieved into the classification module to obtain a first legal issue label corresponding to the fact description to be retrieved, wherein the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs.

[0147] The matching module 430 is used to match the first legal issue label with the second legal issue label corresponding to each judicial document in the judicial document collection to obtain the matching degree between each judicial document and the fact description to be retrieved, wherein the second legal issue label is used to indicate the legal category to which the fact description included in the judicial document belongs.

[0148] The article matching degree determination module 440 is used to determine the article matching degree between each legal article included in each judicial document and the fact description to be retrieved based on the matching degree between each judicial document and the fact description to be retrieved, and the legal articles cited in each judicial document.

[0149] The target legal article retrieval module 450 is used to retrieve the target legal article corresponding to the fact description to be retrieved from each legal article according to the article matching degree of each legal article.

[0150] The matching module 430 specifically includes: a conversion submodule 4301 ( Figure 4 ), used to convert the first legal issue label into a first label vector; similarity calculation submodule 4302 ( Figure 4 (not shown in the figure), used to obtain the second label vector converted from the second legal issue label corresponding to each judicial document; calculate the similarity between the first label vector and each second label vector, and obtain the matching degree between each judicial document and the fact description to be retrieved based on the similarity.

[0151] Among them, the number of the first legal issue labels is multiple; the similarity calculation submodule is specifically used to: convert the multiple first legal issue labels corresponding to the fact description to be retrieved into a first label vector according to the multiple first legal issue labels corresponding to the fact description to be retrieved and the preset weights corresponding to each first legal issue label.

[0152] The first legal question label and the second legal question label respectively include a first-level label and a second-level label, wherein the first-level label indicates that the legal category to which the fact description belongs is the first category, and the second-level label indicates that the legal category to which the fact description belongs is the second category, and the second category is a subcategory of the first category. In the above case, before the matching module 430, the judgment document acquisition module 425 ( Figure 4(not shown in the figure), which is used to obtain an initial set of judicial documents according to the matching degree between the first legal issue label and the first-level label included in the second legal issue label corresponding to each judicial document, wherein the first-level label of the fact description included in each judicial document in the initial set of judicial documents matches the first-level label of the fact description to be retrieved; and to obtain a set of judicial documents from the initial set of judicial documents according to the matching degree between the first legal issue label and the second-level label included in the second legal issue label corresponding to each judicial document, wherein the second-level label of the fact description included in each judicial document in the set of judicial documents matches the second-level label of the fact description to be retrieved.

[0153] In addition, the above device also includes a second legal issue label pre-storage module 400 ( Figure 4 (not shown) is used to input the factual description of each judicial document into the classification module to obtain the second legal issue label corresponding to each judicial document; and store the second legal issue label corresponding to each judicial document.

[0154] The article matching degree determination module 440 is specifically used for: for each judicial document, according to the matching degree between the judicial document and the description of facts to be retrieved, obtaining the matching degree between each legal article cited by the judicial document and the description of facts to be retrieved; for each legal article, according to the matching degree between the legal article corresponding to each judicial document that cited the legal article and the description of facts to be retrieved, obtaining the article matching degree of the legal article.

[0155] In addition, the above device also includes a legal provision matching module 460 ( Figure 4 (not shown), specifically used to encode the fact description to be retrieved, and obtain the feature vector of the fact description to be retrieved; match the feature vector of the fact description to be retrieved with the feature vector of each legal provision, and obtain the second provision matching degree between each legal provision and the fact description to be retrieved. In this case, the target legal provision retrieval module 450 is specifically used to: use the provision matching degree between the legal provisions included in each judgment document and the fact description to be retrieved as the first provision matching degree; for each legal provision, combine the first matching degree and the second matching degree corresponding to the legal provision to obtain the provision matching degree between the legal provision and the fact description to be retrieved; according to the provision matching degree of each legal provision, retrieve the target legal provision corresponding to the fact description to be retrieved from each legal provision.

[0156] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0157] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0158] like Figure 5 As shown, Figure 5 A hardware structure diagram of an electronic device in which the legal text retrieval device of the embodiment is located is shown, and the device may include: a processor 1010, a memory for storing processor executable instructions; 1020, an input / output interface 1030, a communication interface 1040 and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030 and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.

[0159] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification. The processor implements the above-mentioned legal text retrieval method by running the executable instructions.

[0160] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0161] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0162] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0163] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0164] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0165] The embodiments of this specification also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned legal text retrieval method is implemented.

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

[0167] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0168] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A legal text retrieval method, the method comprising: Get the description of the facts to be retrieved; The factual description is a description of a legally relevant issue; Inputting the fact description to be retrieved into a classification module to obtain a first legal issue label corresponding to the fact description to be retrieved, wherein the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs; Matching the first legal issue label with the second legal issue label corresponding to each judgment document in the judgment document set to obtain the matching degree of each judgment document with the fact description to be retrieved, wherein the second legal issue label is used to indicate the legal category to which the fact description included in the judgment document belongs; wherein each judgment document includes a judgment in the case where there is a plaintiff and a defendant, and each judgment document includes a fact description; wherein the fact description of each judgment document is screened out to classify the fact description of the judgment document to obtain the second legal issue label of each judgment document; According to the matching degree between each judgment document and the description of the facts to be searched, and the legal provisions cited in each judgment document, the matching degree between each legal provision included in each judgment document and the description of the facts to be searched is determined; According to the matching degree of each legal article, the target legal article corresponding to the fact description to be retrieved is retrieved from each legal article.

2. According to the method of claim 1, matching the first legal issue label with the second legal issue label corresponding to each judgment document in the judgment document set to obtain the matching degree between each judgment document and the fact description to be retrieved comprises: Converting the first legal issue label into a first label vector; Obtain the second label vector converted from the second legal issue label corresponding to each judgment document; The similarity between the first label vector and each second label vector is calculated, and the matching degree between each judgment document and the fact description to be retrieved is obtained according to the similarity.

3. The method according to claim 2, wherein the number of the first legal issue tags is multiple; The converting the first legal issue label into a first label vector comprises: According to the multiple first legal issue labels corresponding to the fact description to be retrieved and the preset weights corresponding to each first legal issue label, the multiple first legal issue labels corresponding to the fact description to be retrieved are converted into a first label vector.

4. The method according to claim 1, wherein the first legal issue label and the second legal issue label respectively include a first-level label and a second-level label, wherein the first-level label indicates that the legal category to which the fact description belongs is a first category, and the second-level label indicates that the legal category to which the fact description belongs is a second category, and the second category is a subcategory of the first category; Before matching the first legal issue tag with the second legal issue tag corresponding to each judgment document in the judgment document set, the method further includes: According to the matching degree between the first legal issue label and the first-level label included in the second legal issue label corresponding to each judgment document, an initial judgment document set is obtained, wherein the first-level label of the fact description included in each judgment document in the initial judgment document set matches the first-level label of the fact description to be retrieved; According to the matching degree between the first legal issue label and the second-level label included in the second legal issue label corresponding to each judicial document, a judicial document set is obtained from the initial judicial document set, and the second-level label of the fact description included in each judicial document in the judicial document set matches the second-level label of the fact description to be retrieved.

5. The method according to claim 1, further comprising: Inputting the factual description of each judgment document into the classification module to obtain a second legal issue label corresponding to each judgment document; The second legal issue label corresponding to each judgment document is stored.

6. The method according to claim 1, wherein the determining the clause matching degree between each legal clause included in each judgment document and the description of facts to be retrieved according to the matching degree between each judgment document and the description of facts to be retrieved, and the legal clauses cited in each judgment document, comprises: For each judgment document, according to the matching degree between the judgment document and the fact description to be retrieved, the matching degree between each legal provision cited in the judgment document and the fact description to be retrieved is obtained; For each legal provision, the provision matching degree of the legal provision is obtained according to the matching degree between the legal provision and the fact description to be retrieved corresponding to each judgment document citing the legal provision.

7. The method according to any one of claims 1 to 6, Also includes: Encode the fact description to be retrieved to obtain a feature vector of the fact description to be retrieved; Matching the feature vector of the fact description to be retrieved with the feature vector of each legal provision to obtain the second provision matching degree between each legal provision and the fact description to be retrieved; The step of retrieving target legal provisions corresponding to the fact description to be retrieved from the legal provisions according to the matching degree of the legal provisions includes: The article matching degree between the legal articles included in each judgment document and the fact description to be retrieved is taken as the first article matching degree; For each legal provision, combining the first matching degree and the second matching degree corresponding to the legal provision, obtain the provision matching degree between the legal provision and the fact description to be retrieved; According to the matching degree of each legal article, the target legal article corresponding to the fact description to be retrieved is retrieved from each legal article.

8. A smart court system, the smart court system comprising at least a legal text retrieval module; The legal text retrieval module performs: When it is detected that the judge has selected a fact description in the indictment or complaint in the file reading interface, the fact description selected by the judge is used as the fact description to be retrieved; Retrieving the target legal provision according to the legal provision retrieval method according to any one of claims 1 to 7; The retrieved target legal provisions are displayed in the examination interface so that the judge can make a judgment based on the target legal provisions.

9. A legal consultation system, the legal consultation system is used to match the consultant with the respondent, and the respondent is responsible for answering the legal questions provided by the consultant; the legal consultation system at least includes a legal text retrieval module; The legal text retrieval module performs: After detecting that the respondent has selected the fact description of the legal question input by the inquirer, the selected fact description is used as the fact description to be retrieved, and the target legal provision is retrieved by the legal provision retrieval method described in any one of claims 1 to 7; The target legal provisions are sent to the respondent so that the respondent can provide legal consulting services to the consultant based on the target legal provisions.

10. A legal text retrieval device, comprising: A fact description acquisition module is used to acquire the fact description to be retrieved; The factual description is a description of a legally relevant issue; A classification module, used for inputting the fact description to be retrieved into the classification module, and obtaining a first legal issue label corresponding to the fact description to be retrieved, wherein the first legal issue label is used to indicate the legal category to which the fact description to be retrieved belongs; A matching module, used for matching the first legal issue label with the second legal issue label corresponding to each judgment document in the judgment document set, to obtain the matching degree between each judgment document and the fact description to be retrieved, wherein the second legal issue label is used to indicate the legal category to which the fact description included in the judgment document belongs; wherein each judgment document includes a judgment in the case where there is a plaintiff and a defendant, and each judgment document includes a fact description; wherein the fact description of each judgment document is screened out to classify the fact description of the judgment document to obtain the second legal issue label of each judgment document; A clause matching degree determination module, used to determine the clause matching degree between each legal clause included in each judgment document and the fact description to be retrieved, based on the matching degree between each judgment document and the fact description to be retrieved, and the legal clauses cited in each judgment document; The target legal article retrieval module is used to retrieve the target legal article corresponding to the fact description to be retrieved from each legal article according to the article matching degree of each legal article.

11. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the legal text retrieval method as described in any one of claims 1 to 7 by running the executable instructions.

12. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the legal text retrieval method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Legal provision recommendation method based on LDA (Latent Dirichlet Allocation) topic model

    CN108763484A

  • Natural language processing-based intelligent auxiliary judgment method for an enterprise bankruptcy case

    CN113536780A