Law usage item query method and system

By combining the matching and screening of the legal and legal database and the judicial document library in the legal query system, NLP technology is used to analyze the judicial documents, which solves the problem of valueless results caused by the incorrect time of the user during query, achieving more accurate and Humanized legal query results.

CN119046445AInactive Publication Date: 2024-11-29JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS

Patent Information

Application Number
CN202411537630.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the process of legal inquiry, the user does not consider that the effective time of the legal provision does not correspond to the time of the event in the judgment document, resulting in the search results being valuable.

Method used

By receiving legal query information, input it into the legal legal database for matching, obtaining legal provisions for effective time, and entering them into the judicial document library for searching, filtering based on the effective time and the time information in the judicial document, and retaining the consistent Judgment documents, and NLP technology is used to analyze the text and extract relevant event information.

Benefits of technology

Automatically filter out valuable judicial documents to ensure that the effective time of legal provisions matches the time of judicial documents, and provide more accurate and humane query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046445A_ABST
    Figure CN119046445A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of law article query, and provides a law article query method and system, and the method comprises the following steps: receiving law article query information which comprises one or more keywords; the legal provision query information is input into a law provision library for matching, a plurality of legal provisions are obtained, and each legal provision corresponds to effective time; inputting the legal provisions into a judgment document library, performing retrieval matching, and outputting a plurality of matched judgment documents; the judgment documents are screened according to the effective time of the legal provisions and the time information in the judgment documents, and the judgment documents required by the user are reserved, so that the content of the judgment documents is valuable for the user. And finally, the text of the reserved judgment document is analyzed based on the NLP technology to obtain the legal provisions and the corresponding event information, so that the user can query and watch the legal provisions more conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of legal provision query, and in particular to a legal provision query method and system for legal studies. Background Art

[0002] In the field of law, legal article query is an indispensable part of daily study and work. Generally, professional legal databases are used for retrieval. In the database, searches can be performed by keywords, legal article numbers, legal departments, etc. Many times, users want to retrieve legal articles in conjunction with cases to facilitate a deep understanding of the legal articles. At this time, they can search for judgment documents. Judgment documents record the process and results of court trials. They are the carriers of the results of litigation activities and record events and cited laws and regulations. When users search for judgment documents based on legal articles, they will not care about the effective time of the legal provisions, resulting in the event time in the judgment document not corresponding to the effective time of the legal provisions, and may retrieve results that are of no value to the user.

[0003] Therefore, it is necessary to provide a method and system for querying legal provisions in order to solve the above problems. Summary of the invention

[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a method and system for querying legal provisions in law to solve the problems existing in the above-mentioned background technology.

[0005] The present invention is implemented as follows: a method for searching legal articles in legal studies, the method comprising the following steps: Receiving legal article query information, wherein the legal article query information includes one or more keywords; Input the legal article query information into the legal article database for matching, and obtain several legal articles, each of which has a corresponding effective time; Input legal provisions into the judicial document database, perform search and matching, and output a number of matching judicial documents; Filter the judgment documents according to the effective date of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user; Based on NLP technology, the text of the retained judicial documents is parsed to obtain the legal provisions and corresponding event information.

[0006] As a further solution of the present invention: the step of inputting the legal article query information into the legal article database for matching to obtain a plurality of legal articles specifically includes: Preprocessing the legal article query information, wherein the preprocessing includes keyword extraction, stop word removal, and synonym replacement; Input the pre-processed legal article query information into a legal article database, wherein each legal article in the legal article database corresponds to metadata, and the metadata includes the legal article name, number, effective time, and repeal time; Use the full-text search engine Elasticsearch to conduct a full-text search on the legal provisions database to obtain several legal provisions.

[0007] As a further solution of the present invention: the step of inputting the legal provisions into the judicial document library, performing search and matching, and outputting a number of matching judicial documents specifically includes: Extract keywords and standardize legal texts; Inputting the processed legal provisions into a judgment document library, wherein each judgment document in the judgment document library is marked with metadata, wherein the metadata includes case number, case name, court name, judgment time, and cited provisions; Based on the input legal provisions and cited provisions, retrieval and matching are performed, and the successfully matched judgment documents are output. Each judgment document has corresponding time information.

[0008] As a further solution of the present invention: the step of screening the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents specifically includes: Extract all the incident times in the judgment documents, and perform union processing on all incident times to obtain the incident time set; The effective time of several legal provisions is combined to obtain an effective period set; Determine whether there is an intersection between the crime time set and the effective period set. If so, retain the corresponding judgment document; otherwise, delete the corresponding judgment document.

[0009] As a further solution of the present invention: the step of parsing the text of the retained judgment document based on NLP technology to obtain the legal provisions and the corresponding event information specifically includes: Identify the legal provisions in the judgment document and strengthen the marking of the legal provisions in the judgment document; Parse the paragraphs of the judgment documents based on punctuation marks to determine the content of the paragraph where the legal provisions are located; Analyze the paragraph content, extract time, character and event keywords, and perform full-text matching of judicial documents based on time, character and event keywords to obtain matching event information.

[0010] Another object of the present invention is to provide a legal clause query system, the system comprising: A legal article query information module, used to receive legal article query information, wherein the legal article query information includes one or more keywords; The legal article matching module is used to input the legal article query information into the legal article database for matching, and obtain a number of legal articles, each of which has an effective time; The judgment document matching module is used to input legal provisions into the judgment document library, perform search and matching, and output a number of matching judgment documents; The judgment document screening module is used to screen the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user; The judicial document parsing module is used to parse the text of the retained judicial documents based on NLP technology to obtain legal provisions and corresponding event information.

[0011] As a further solution of the present invention: the legal clause matching module includes: A query information preprocessing unit, used to preprocess the legal query information, wherein the preprocessing includes keyword extraction, stop word removal, and synonym replacement; A query information input unit, used to input the pre-processed legal article query information into a legal article database, wherein each legal article in the legal article database corresponds to metadata, and the metadata includes the legal article name, number, effective time and repeal time; The legal text output unit is used to use the full-text search engine Elasticsearch to perform a full-text search on the legal text database to obtain a number of legal texts.

[0012] As a further solution of the present invention: the judgment document matching module includes: Standardization processing unit, used to extract keywords and standardize legal texts; A legal text input unit, used to input the processed legal text into a judgment document library, wherein each judgment document in the judgment document library is marked with metadata, and the metadata is case number, case name, court name, judgment time and cited text; The judgment document output unit is used to search and match based on the input legal provisions and cited provisions, and output the successfully matched judgment documents. Each judgment document has corresponding time information.

[0013] The present invention also provides a computer device, including a memory, a processor, and a computer device program stored in the memory and executable on the processor, wherein the processor implements the method for querying legal terms when executing the computer device program.

[0014] The present invention also provides a storage medium, which includes a stored program, and when the program is running, controls the device where the storage medium is located to execute the method for querying legal terms.

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention will automatically filter the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user, that is, the effective time of the legal provisions coincides with the time information in the corresponding judgment documents, so that the content of this judgment document is valuable to the user. In addition, the present invention will also parse the text of the retained judgment documents based on NLP technology to obtain the legal provisions and the corresponding event information, so that it is more convenient for users to query and view, and more humane. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The present invention is a flowchart of a method for searching legal articles used in law.

[0017] Figure 2 The present invention is a flowchart of obtaining several legal provisions in a legal provision query method.

[0018] Figure 3 The present invention is a flowchart for outputting judicial documents in a legal article query method.

[0019] Figure 4 The present invention is a flowchart for screening judicial documents in a legal article query method.

[0020] Figure 5 The present invention is a flowchart for obtaining legal provisions and corresponding event information in a legal provision query method.

[0021] Figure 6 The figure is a schematic diagram of the structure of a legal clause query system.

[0022] Figure 7 The present invention is a structural diagram of a legal article matching module in a legal article query system.

[0023] Figure 8 This is a structural diagram of a judicial document matching module in a legal article query system. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0025] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.

[0026] like Figure 1As shown, an embodiment of the present invention provides a method for querying legal terms, the method comprising the following steps: S100, receiving legal article query information, where the legal article query information includes one or more keywords; S200, inputting the legal article query information into the legal article database for matching, and obtaining a number of legal articles, each of which has an effective time; S300, inputting the legal provisions into the judicial document database, performing search and matching, and outputting a number of matching judicial documents; S400, screening the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents, and retaining the judgment documents required by the user; S500: Parse the text of the retained judicial documents based on NLP technology to obtain legal provisions and corresponding event information.

[0027] It should be noted that when users search for judicial documents based on legal provisions, they do not care about the effective time of the legal provisions, which results in the event time in the judicial documents not corresponding to the effective time of the legal provisions, and may retrieve results that are of no value to the user. The embodiments of the present invention aim to solve the above problem.

[0028] In the embodiment of the present invention, when the user needs to search for legal provisions, the legal provision search information is firstly input, and the legal provision search information includes one or more keywords. Then the embodiment of the present invention automatically inputs the legal provision search information into the legal provision library for matching, and obtains several legal provisions, each of which has an effective time. Then the embodiment of the present invention automatically inputs the legal provisions into the judgment document library, searches and matches, and outputs several corresponding judgment documents. It is understood that the effective time will not be considered in the matching here, as long as the legal provisions are basically consistent with the legal provision information appearing in the judgment document. Then, the embodiment of the present invention will screen the judgment documents according to the effective time of the legal provisions and the time information in the judgment document, and retain the judgment documents required by the user, that is, the effective time of the legal provisions coincides with the time information in the corresponding judgment document. In this way, the content of this judgment document is valuable to the user. Finally, the embodiment of the present invention will also parse the text of the retained judgment document based on NLP technology to obtain the legal provisions and the corresponding event information, so that it is more convenient for users to query and watch, and more humane.

[0029] like Figure 2 As shown, as a preferred embodiment of the present invention, the step of inputting the legal article query information into the legal article database for matching to obtain a plurality of legal articles specifically includes: S201, preprocess the legal provision query information, where the preprocessing includes keyword extraction, stop word removal, and synonym replacement; S202, input the preprocessed legal provision query information into the legal provision database. Each legal provision in the legal provision database corresponds to metadata, and the metadata is the legal provision name, number, effective time, and repeal time; S203, use the full-text search engine Elasticsearch to perform full-text search on the legal provision database to obtain several legal provisions. In the embodiment of the present invention, in order to more accurately obtain the legal provisions desired by the user, the legal provision query information will be preprocessed. The preprocessing includes keyword extraction, stop word removal, and synonym replacement. Specifically, keyword extraction refers to extracting key words or phrases from the query information input by the user, and these words or phrases will be used as the basis for the search. Stop word removal means removing common but actually valueless words in the query information, such as "of", "is", etc. Synonym replacement means replacing the words in the query information with their synonyms or near-synonyms to expand the search scope. Then input the preprocessed legal provision query information into the legal provision database. Each legal provision in the legal provision database corresponds to metadata, and the metadata is the legal provision name, number, effective time, and repeal time. It is also necessary to construct an index for the legal provisions in the legal provision database to quickly respond to query requests. Finally, use a full-text search engine (such as Elasticsearch, Solr, etc.) to perform full-text search on the legal provision database to find the legal provisions containing the query keywords.

[0030] As a preferred embodiment of the present invention, preprocess the legal provision query information, and the preprocessing further includes keyword weight optimization. The specific steps for keyword weight optimization are as follows: Perform stop word removal, synonym replacement, and keyword extraction on the legal provision query information in sequence to obtain query keywords; Calculate the TF-IDF scores of each query keyword and construct a TF-IDF matrix using the TF-IDF scores. Among them, the rows of the TF-IDF matrix represent each keyword, the columns represent different query information, and each element in the TF-IDF matrix is the TF-IDF score of the corresponding keyword in a specific query information; Perform singular value decomposition on the TF-IDF matrix to obtain multiple singular values, and select the first several singular values and the corresponding vectors in descending order to construct a low-dimensional semantic space for dimensionality reduction processing to obtain a dimensionality-reduced matrix; Extract the feature weights of each keyword from the dimensionality-reduced matrix, and combine the TF-IDF scores and the feature weights of the keywords in a weighted summation manner to obtain a combined score; The keywords are ranked according to the combined scores to confirm the importance of the keywords according to the ranking.

[0031] In an embodiment of the present invention, in order to more accurately obtain the legal provisions that the user wants, the legal provision query information will be preprocessed. In order to more accurately identify the core keywords in the query information and improve the accuracy of information retrieval, on the basis of the steps of stop word removal, synonym replacement and keyword extraction, the keywords are optimized by combining TF-IDF and LSA technology. The most representative keywords in the query information can be effectively identified, which improves the accuracy of information retrieval. The optimized keywords reduce the search space, make the retrieval process more efficient, and shorten the response time. The optimized and sorted keywords are more in line with the query intent, making the matched legal provisions more relevant and useful.

[0032] like Figure 3 As shown, as a preferred embodiment of the present invention, the step of inputting the legal provisions into the judicial document library, performing search and matching, and outputting a number of matching judicial documents specifically includes: S301, extract keywords and standardize legal texts; S302, inputting the processed legal provisions into a judgment document library, wherein each judgment document in the judgment document library is marked with metadata, wherein the metadata includes case number, case name, court name, judgment time, and cited provisions; S303, perform search and matching based on the input legal provisions and referenced provisions, and output the successfully matched judgment documents, each of which has corresponding time information.

[0033] In the embodiment of the present invention, in order to obtain the judgment documents that meet the requirements, it is first necessary to extract keywords and standardize the legal provisions. Standardization refers to converting the legal provisions into a standardized format so that they can be retrieved in the judgment document library. This can include removing formatting characters, unifying terms, etc. Then the processed legal provisions need to be input into the judgment document library. The judgment document library needs to be designed in advance to ensure that the judgment document library contains a large number of judgment documents, and these documents are comprehensive, accurate and up-to-date; to perform index construction, the judgment documents in the judgment document library are indexed and constructed to quickly respond to retrieval requests. The index can be based on multiple dimensions such as keywords, legal provision citations, case types, etc., and rich metadata is added to each judgment document, such as case number, case name, court name, judgment time, cited legal provisions, etc. Finally, based on the input legal provisions and cited provisions, retrieval matching is performed, and the judgment documents that are successfully matched are output, and each judgment document corresponds to time information.

[0034] As a preferred embodiment of the present invention, the specific steps of searching and matching based on the input legal provisions and the referenced provisions and outputting the successfully matched judgment documents are as follows: Using the word embedding model Word2Vec, each word in the legal provisions and the referenced provisions is converted into a first numerical vector of a fixed length, and the average of all the first numerical vectors in the sentence is taken to obtain the average word vector; Using the contextual embedding model BERT, the sentences in the legal text and the referenced text are converted into a second numerical vector of fixed length; The average word vector and the second numerical vector are concatenated to obtain a comprehensive vector representation of the legal provisions and the cited provisions; Calculate the cosine similarity of the comprehensive vector representation of the legal provisions and the cited provisions; Calculate the Euclidean distance between the comprehensive vector representation of the legal provisions and the cited provisions; Normalize the cosine similarity and Euclidean distance to the same scale, and set corresponding weights for the cosine similarity and Euclidean distance parts according to the nature of the task; The standardized cosine similarity and Euclidean distance are added in a linear combination according to the weights to obtain the comprehensive similarity, and the successfully matched judicial documents are output based on the comprehensive similarity.

[0035] In the embodiment of the present invention, in order to obtain a compliant judicial document, the present invention combines the advantages of word embedding and context embedding models, wherein the word embedding model can capture the basic semantic relationship at the vocabulary level, and the context embedding model can understand the complex context and semantics at the sentence level. By combining the two models, a more comprehensive semantic representation can be obtained, and the accuracy of text matching and similarity calculation can be improved. In addition, cosine similarity focuses on directional similarity and is suitable for high-dimensional sparse data, while Euclidean distance focuses on absolute differences and reflects the actual distance of vectors. By combining the two similarities through multi-angle evaluation, the subtle differences between texts can be captured more comprehensively. When one method performs poorly in a specific situation, another method can provide supplementation and increase robustness.

[0036] like Figure 4 As shown, as a preferred embodiment of the present invention, the step of screening the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents specifically includes: S401, extracting all the incident times in the judgment documents, and performing a union process on all the incident times to obtain an incident time set; S402, performing a union process on the effective time of a plurality of legal provisions to obtain an effective period set; S403, determine whether there is an intersection between the crime occurrence time set and the effective period set. If so, retain the corresponding judgment document; otherwise, delete the corresponding judgment document.

[0037] In an embodiment of the present invention, in order to accurately screen judicial documents, it is necessary to extract all the incident times in the judicial documents, perform union processing on all the incident times to obtain an incident time set, then perform union processing on the effective times of several legal provisions to obtain an effective period set, and finally determine whether the incident time set and the effective period set have an intersection. When there is an intersection, it means that the effective time of the legal provision is consistent with the incident time, and the judicial document has reference value, so that the corresponding judicial document is retained; when the incident time set and the effective period set do not have an intersection, it means that the effective time of the legal provision is inconsistent with the incident time, the judicial document has no reference value, and the corresponding judicial document is deleted.

[0038] As a preferred embodiment of the present invention, the specific steps of extracting all the incident times in the judgment documents, performing union processing on all the incident times, and obtaining the incident time set are as follows: All time periods are represented as nodes in a graph structure. If two time periods have an intersection, an edge is added between the two time periods to construct a graph structure. Use depth-first search to find all interconnected nodes in the graph structure, and mark the interconnected nodes as connected components; The incident time period and the effective period period are respectively formed into two sets, and each connection component is checked to see whether it contains the time periods in the two current sets at the same time; If any connection component contains both the time period of the incident and the effective period, it is confirmed that the time periods have an intersection, so that the relevant judgment documents are retained; if there is no connection component, the judgment documents are deleted.

[0039] In the embodiment of the present invention, in order to accurately screen judicial documents, the present invention ensures the accuracy of time period intersection judgment by constructing a graph structure and searching for connected components, can effectively identify all overlapping relationships, can handle complex intersections of multiple groups of time periods, is applicable to a variety of different time period combinations, and is applicable to the judgment of various time periods, is not limited to specific formats or situations, and has high versatility.

[0040] like Figure 5 As shown, as a preferred embodiment of the present invention, the step of parsing the text of the retained judgment document based on NLP technology to obtain the legal provisions and the corresponding event information specifically includes: S501, determining the legal provisions in the judgment document, and marking the legal provisions in the judgment document; S502, parsing the judgment document based on punctuation marks to determine the content of the paragraph where the legal provision is located; S503, analyzing the paragraph content, extracting the keywords of time, person and event, and performing full text matching of the judgment document based on the keywords of time, person and event to obtain matching event information.

[0041] In an embodiment of the present invention, the legal provisions that the user wants in the judgment document are determined, and the legal provisions are enhanced in the judgment document, for example, marked in red and bold. Then, the judgment document is parsed based on punctuation marks to determine the entire paragraph content where the legal provisions are located, and the paragraph content is analyzed to extract time, person and event keywords. The full text of the judgment document is matched based on the time, person and event keywords to obtain matching event information, and these matching event information are also enhanced. In this way, the user can quickly find the required content.

[0042] As a preferred embodiment of the present invention, the paragraph content is analyzed to extract the keywords of time, person and event, and the full text of the judgment document is matched based on the keywords of time, person and event to obtain the matching event information. The specific steps are as follows: The full text of the judgment document is divided into paragraphs to obtain multiple paragraphs; Extract the keywords of time, person and event from each paragraph to obtain the extracted information; Search the name or number of the legal provision in each paragraph to confirm whether the paragraph contains the specified legal provision; If the paragraph contains legal provisions, the paragraph information is stored in a dictionary structure along with the extracted keywords; Create a keyword index for the extracted information of each paragraph and classify it according to time, person and event keywords; The established keyword index is used to match the entire judicial document to find the same or similar event information, and the event information is associated with the corresponding legal provisions to obtain matching event information.

[0043] like Figure 6 As shown, the embodiment of the present invention also provides a legal clause query system, the system comprising: The legal article query information module 100 is used to receive legal article query information, wherein the legal article query information includes one or more keywords; The legal article matching module 200 is used to input the legal article query information into the legal article database for matching, and obtain a number of legal articles, each of which has an effective time; The judgment document matching module 300 is used to input legal provisions into the judgment document library, perform search and matching, and output a number of matching judgment documents; The judgment document screening module 400 is used to screen the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user; The judgment document parsing module 500 is used to parse the text of the retained judgment document based on NLP technology to obtain legal provisions and corresponding event information.

[0044] like Figure 7 As shown, as a preferred embodiment of the present invention, the legal clause matching module 200 includes: The query information preprocessing unit 201 is used to preprocess the legal article query information, wherein the preprocessing includes keyword extraction, stop word removal, and synonym replacement; The query information input unit 202 is used to input the pre-processed legal article query information into the legal article database, wherein each legal article in the legal article database corresponds to metadata, and the metadata includes the legal article name, number, effective time and repeal time; The legal text output unit 203 is used to use the full-text search engine Elasticsearch to perform a full-text search on the legal text database to obtain a number of legal texts.

[0045] like Figure 8 As shown, as a preferred embodiment of the present invention, the judgment document matching module 300 includes: A standardization processing unit 301 is used to extract keywords and perform standardization processing on legal provisions; The legal provision input unit 302 is used to input the processed legal provisions into the judgment document library, each judgment document in the judgment document library is marked with metadata, and the metadata is the case number, case name, court name, judgment time and cited provisions; The judgment document output unit 303 is used to perform search and matching based on the input legal provisions and cited provisions, and output the successfully matched judgment documents, each of which has corresponding time information.

[0046] An embodiment of the present invention also provides a computer device, including a memory, a processor, and a computer device program stored in the memory and executable on the processor, wherein the processor implements the method for querying legal terms when executing the computer device program.

[0047] An embodiment of the present invention further provides a storage medium, which includes a stored program, and when the program is executed, controls the device where the storage medium is located to execute the method for querying legal terms.

[0048] The above only describes in detail the preferred embodiments of the present invention, which is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0049] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0050] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0051] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the disclosure in the specification and examples. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for searching legal articles, characterized in that: The method comprises the following steps: Receiving legal article query information, wherein the legal article query information includes one or more keywords; Input the legal article query information into the legal article database for matching, and obtain several legal articles, each of which has a corresponding effective time; Input legal provisions into the judicial document database, perform search and matching, and output a number of matching judicial documents; Filter the judgment documents according to the effective date of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user; Parse the text of the retained judicial documents based on NLP technology to obtain legal provisions and corresponding event information; The step of inputting the legal article query information into the legal article database for matching to obtain a number of legal articles specifically includes: Preprocessing the legal article query information, wherein the preprocessing includes keyword extraction, stop word removal, and synonym replacement; Input the pre-processed legal article query information into a legal article database, wherein each legal article in the legal article database corresponds to metadata, and the metadata includes the legal article name, number, effective time, and repeal time; Use the full-text search engine Elasticsearch to conduct a full-text search on the legal provisions database to obtain several legal provisions.

2. The method for searching legal articles according to claim 1, characterized in that: The legal article query information is preprocessed, and the preprocessing also includes keyword weight optimization. The specific steps of keyword weight optimization are as follows: The legal article query information is sequentially subjected to stop word removal, synonym replacement, and keyword extraction to obtain query keywords; Calculate the TF-IDF score of each query keyword and use the TF-IDF score to construct a TF-IDF matrix. The rows of the TF-IDF matrix represent the keywords, the columns represent the different query information, and each element in the TF-IDF matrix is ​​the TF-IDF score of the corresponding keyword in the specific query information. Perform singular value decomposition on the TF-IDF matrix to obtain multiple singular values, and select the first several singular values ​​and their corresponding vectors in descending order to construct a low-dimensional semantic space for dimensionality reduction processing to obtain a matrix after dimensionality reduction; Extract the feature weight of each keyword from the matrix after dimension reduction, and combine the TF-IDF score with the feature weight of the keyword by weighted summation to obtain the combined score; The keywords are ranked according to the combined scores to confirm the importance of the keywords according to the ranking.

3. The method for searching legal articles according to claim 2 is characterized in that: The step of inputting the legal provisions into the judicial document database, performing search and matching, and outputting a number of matching judicial documents specifically includes: Extract keywords and standardize legal texts; Inputting the processed legal provisions into a judgment document library, wherein each judgment document in the judgment document library is marked with metadata, wherein the metadata includes case number, case name, court name, judgment time, and cited provisions; Based on the input legal provisions and cited provisions, retrieval and matching are performed, and the successfully matched judgment documents are output. Each judgment document has corresponding time information.

4. The method for searching legal articles according to claim 3 is characterized in that: The specific steps for searching and matching the input legal provisions and citing provisions and outputting the successfully matched judgment documents are as follows: Using the word embedding model Word2Vec, each word in the legal provisions and the referenced provisions is converted into a first numerical vector of a fixed length, and the average of all the first numerical vectors in the sentence is taken to obtain the average word vector; Using the contextual embedding model BERT, the sentences in the legal text and the referenced text are converted into a second numerical vector of fixed length; The average word vector and the second numerical vector are concatenated to obtain a comprehensive vector representation of the legal provisions and the cited provisions; Calculate the cosine similarity of the comprehensive vector representation of the legal provisions and the cited provisions; Calculate the Euclidean distance between the comprehensive vector representation of the legal provisions and the cited provisions; Normalize the cosine similarity and Euclidean distance to the same scale, and set corresponding weights for the cosine similarity and Euclidean distance parts according to the nature of the task; The standardized cosine similarity and Euclidean distance are added in a linear combination according to the weights to obtain the comprehensive similarity, and the successfully matched judicial documents are output based on the comprehensive similarity.

5. The method for searching legal articles according to claim 4 is characterized in that: The step of screening the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents specifically includes: Extract all the incident times in the judgment documents, and perform union processing on all incident times to obtain the incident time set; The effective time of several legal provisions is combined to obtain an effective period set; Determine whether there is an intersection between the crime time set and the effective period set. If so, retain the corresponding judgment document; otherwise, delete the corresponding judgment document.

6. The method for searching legal articles according to claim 5 is characterized in that: The specific steps for extracting all the incident times in the judgment documents and performing union processing on all the incident times to obtain the incident time set are as follows: All time periods are represented as nodes in a graph structure. If two time periods have an intersection, an edge is added between the two time periods to construct a graph structure. Use depth-first search to find all interconnected nodes in the graph structure, and mark the interconnected nodes as connected components; The incident time period and the effective period period are respectively formed into two sets, and each connection component is checked to see whether it contains the time periods in the two current sets at the same time; If any of the connected components contains both the time period of the incident and the effective period, it is confirmed that the time periods overlap, so that the relevant judgment documents are retained; If there is no connection component, the judgment document is deleted.

7. The method for searching legal articles according to claim 6, characterized in that: The step of parsing the text of the retained judgment document based on NLP technology to obtain legal provisions and corresponding event information specifically includes: Identify the legal provisions in the judgment document and strengthen the marking of the legal provisions in the judgment document; Parse the paragraphs of the judgment documents based on punctuation marks to determine the content of the paragraph where the legal provisions are located; Analyze the paragraph content, extract the keywords of time, characters and events, and perform full-text matching of judicial documents based on the keywords of time, characters and events to obtain matching event information.

8. The method for searching legal articles according to claim 7, characterized in that: Analyze the paragraph content, extract the keywords of time, people and events, and perform full-text matching of judgment documents based on the keywords of time, people and events to obtain matching event information. The specific steps are as follows: The full text of the judgment document is divided into paragraphs to obtain multiple paragraphs; Extract the keywords of time, person and event from each paragraph to obtain the extracted information; Search the name or number of the legal provision in each paragraph to confirm whether the paragraph contains the specified legal provision; If the paragraph contains legal provisions, the paragraph information is stored in a dictionary structure along with the extracted keywords; Create a keyword index for the extracted information of each paragraph and classify it according to time, person and event keywords; The established keyword index is used to match the entire judicial document to find the same or similar event information, and the event information is associated with the corresponding legal provisions to obtain matching event information.

9. A system for querying legal articles, the system being applied to the method for querying legal articles as claimed in any one of claims 1 to 8, characterized in that: The system comprises: A legal article query information module, used to receive legal article query information, wherein the legal article query information includes one or more keywords; The legal article matching module is used to input the legal article query information into the legal article database for matching, and obtain a number of legal articles, each of which has an effective time; The judgment document matching module is used to input legal provisions into the judgment document library, perform search and matching, and output a number of matching judgment documents; The judgment document screening module is used to screen the judgment documents according to the effective time of the legal provisions and the time information in the judgment documents, and retain the judgment documents required by the user; The judicial document parsing module is used to parse the text of the retained judicial documents based on NLP technology to obtain legal provisions and corresponding event information.

10. The legal clause query system according to claim 9 is characterized in that: The legal clause matching module includes: A query information preprocessing unit, used to preprocess the legal query information, wherein the preprocessing includes keyword extraction, stop word removal, and synonym replacement; A query information input unit, used to input the pre-processed legal article query information into a legal article database, wherein each legal article in the legal article database corresponds to metadata, and the metadata includes the legal article name, number, effective time and repeal time; The legal text output unit is used to use the full-text search engine Elasticsearch to perform a full-text search on the legal text database to obtain a number of legal texts.

Citation Information

Patent Citations

  • Processing method and device of judgment document

    CN106815261A

  • Method and device for searching law provisions

    CN106815263A

  • Searching method and device of judgment document

    CN106815265A

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

    CN108763484A

  • Legal provision retrieval method and device

    CN114579770A

Cited By

  • Law database query system and method

    CN119760107A

  • Standard provision query method, device and equipment based on large language model and medium

    CN120723891A

  • Method and device for obtaining law article, computer readable medium and electronic equipment

    CN122262190A

  • Law obtaining method and device, computer readable medium and electronic device

    CN122262190B

  • Pollution event index-based regulation applicable matching method

    CN122594365A