A method and device for file retrieval

By dividing and distributing legal cases in the legal knowledge graph, using case index table and target node positioning technology, the problems of long response time and low efficiency in existing legal case search technology are solved, and fast and efficient file retrieval is achieved.

CN112148701BActive Publication Date: 2025-02-11PINGAN ZHITONG CONSULT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011010147.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-23
Publication Date
2025-02-11
Estimated Expiration
2040-09-23

AI Technical Summary

Technical Problem

Existing legal case search technology requires full-text keyword search, resulting in a long response time. Especially in the case of a large number of cases, it increases the waiting time for file search and reduces the search efficiency.

Method used

Through a preset legal knowledge graph, historical cases are divided into multiple data packets and stored in multiple nodes in a distributed manner, and a case index table is created to store the network address of the distributed storage node. Determine the target node based on the search keywords and generate file search results.

Benefits of technology

This method greatly reduces the search time, improves the search efficiency, avoids the need for full-text search, and directly locates the target node associated with the search keyword.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112148701B_ABST
    Figure CN112148701B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a method and device for file retrieval, including: based on the knowledge nodes contained in the preset legal knowledge graph, each of the historical cases is divided into multiple data packets; based on the knowledge nodes associated with each data packet, a case index table corresponding to the historical case is created; each of the knowledge nodes is associated with a corresponding distributed storage node; based on the case index table, each of the data packets of the historical case is stored in the associated distributed storage node; based on the received search keyword, a target node associated with the search keyword in the legal knowledge graph is determined; based on the historical cases contained in the distributed storage node corresponding to the target node, a file retrieval result is generated. The present application reduces the time consumption of searching and improves the efficiency of searching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method and device for file retrieval. Background Art

[0002] With the popularization of legal knowledge, the general public has more and more opportunities to come into contact with legal cases. Due to work needs or personal interests, users can select specific cases for review. However, due to the large number of legal cases, if users are required to manually screen cases, it will greatly increase the time required for users to select cases, thereby increasing the difficulty of case selection. Therefore, how to provide an efficient means of searching for legal cases has become an urgent problem that needs to be solved.

[0003] Existing legal case retrieval technology mainly uses keyword-based search to determine whether the keywords entered by the user exist in the text. However, since legal cases often contain a large number of words, a full-text keyword search of legal cases requires a long response time. In addition, when the number of legal cases is large, the above search time will be further increased, thereby increasing the waiting time for file retrieval and reducing retrieval efficiency. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method and device for file retrieval to solve the existing legal case retrieval technology, which requires full-text keyword search of legal cases, has a long response time, and when the number of legal cases is large, the time consumption of the above search will be further increased, which increases the waiting time for file retrieval and the problem of low retrieval efficiency.

[0005] A first aspect of an embodiment of the present application provides a method for file retrieval, comprising:

[0006] Based on the knowledge nodes contained in the preset legal knowledge graph, each of the historical cases is divided into multiple data packets;

[0007] According to the knowledge nodes associated with each data packet, a case index table corresponding to the historical case is created; each of the knowledge nodes is associated with a corresponding distributed storage node; the case index table is used to store the network address of the distributed storage node;

[0008] Based on the case index table, storing each of the data packets of the historical case in the associated distributed storage node;

[0009] Based on the received search keyword, determine a target node in the legal knowledge graph associated with the search keyword;

[0010] Generate a file retrieval result according to the historical cases contained in the distributed storage node corresponding to the target node.

[0011] A second aspect of an embodiment of the present application provides a device for file retrieval, including:

[0012] A data packet division unit, used for dividing each of the historical cases into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph;

[0013] A case index table creation unit, used to create a case index table corresponding to the historical case according to the knowledge nodes associated with each data packet; each of the knowledge nodes is associated with a corresponding distributed storage node; the case index table is used to store the network address of the distributed storage node;

[0014] A data packet storage unit, configured to store each data packet of the historical case in the associated distributed storage node based on the case index table;

[0015] A search keyword receiving unit, configured to determine a target node associated with the search keyword in the legal knowledge graph based on the received search keyword;

[0016] The file retrieval result output unit is used to generate a file retrieval result according to the historical cases contained in the distributed storage node corresponding to the target node.

[0017] A third aspect of an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the first aspect when executing the computer program.

[0018] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the first aspect are implemented.

[0019] The method and device for file retrieval provided by the embodiments of the present application have the following beneficial effects:

[0020] When storing historical cases, the embodiment of the present application divides the historical cases into multiple data packets according to the legal knowledge graph, and stores them in multiple different nodes in a distributed manner. Through the corresponding case index table, the associated data packets can be extracted from different distributed storage nodes to regenerate historical cases. In the subsequent keyword search, the target node can be determined by searching the keyword. The historical case corresponding to the data packet stored in the target node is the target case of this search, and the file search result is generated, achieving the purpose of file search. Compared with the existing legal case retrieval technology, since different distributed storage nodes store data packets of historical cases, and the data packets in each distributed storage node correspond to the same knowledge node, there is no need to perform a full-text search in the subsequent search process. After determining the target node associated with the search keyword, the historical case corresponding to the data packet stored in the target node is the target case of this search, thereby greatly reducing the search time and improving the search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 This is a flowchart of a method for file retrieval provided in the first embodiment of the present application;

[0023] Figure 2 This is a specific implementation flow chart of a file retrieval method provided in the second embodiment of the present application;

[0024] Figure 3 This is a specific implementation flow chart of a file retrieval method S202 provided in the third embodiment of the present application;

[0025] Figure 4 is an associated network provided by an embodiment of the present application;

[0026] Figure 5 This is a specific implementation flow chart of a file retrieval method provided in the fourth embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of the structure of a case relationship tree provided in an embodiment of the present application;

[0028] Figure 7 This is a specific implementation flow chart of a file retrieval method S101 provided in the fifth embodiment of the present application;

[0029] Figure 8This is a specific implementation flow chart of a file retrieval method S104 provided in the sixth embodiment of the present application;

[0030] Fig. 9 This is a specific implementation flow chart of a file retrieval method S105 provided in the seventh embodiment of the present application;

[0031] Fig.10 It is a structural block diagram of a file retrieval device provided by an embodiment of the present application;

[0032] Fig.11 It is a schematic diagram of a terminal device provided in another embodiment of the present application. DETAILED DESCRIPTION

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

[0034] The embodiment of the present application obtains user information of the user, determines documents that are associated with the user as candidate documents, performs preliminary screening of documents in the document database, and generates document feature vectors corresponding to each candidate document; and generates user feature vectors based on the user knowledge graph corresponding to each user and the browsing history in the user information, imports the text feature vector and the user feature vector into a preset recommendation model, determines recommended documents from the candidate documents, and generates a recommendation list containing the above-mentioned recommended documents, and outputs it to the user, thereby achieving the purpose of automatically generating a recommendation list and solving the problem that the existing legal document recommendation technology cannot achieve accurate recommendation, reduces recommendation efficiency, and increases the time-consuming search for documents of interest for users.

[0035] In the embodiment of the present application, the execution subject of the process is a terminal device, which includes but is not limited to: a server, a computer, a smart phone, a tablet computer and other devices capable of performing file retrieval tasks. Figure 1 The following is a flowchart of the method for file retrieval provided in the first embodiment of the present application, which is described in detail as follows:

[0036] In S101, each of the historical cases is divided into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph.

[0037] In this embodiment, the terminal device may pre-store a legal knowledge graph, which may be downloaded from a cloud server. The legal knowledge graph downloaded from the cloud server may be generated based on multiple standard legal texts, such as the standard legal texts such as the criminal law, civil law, and constitution, to identify the legal entities contained in the above legal texts, and to establish associations between different legal entities based on the number of common occurrences and locations of occurrences between each legal entity, thereby constructing the above legal knowledge graph. In a possible implementation, the above legal knowledge graph may also be constructed based on all existing historical cases in the document database. Similarly, the terminal device may identify the legal entities contained in the above historical cases, and to establish associations between different legal entities based on the number of common occurrences and locations of occurrences between each legal entity, thereby constructing the above legal knowledge graph. In this case, if new cases are added to the document database, the legal knowledge graph may be updated based on the new cases, thereby ensuring the validity of the legal knowledge graph.

[0038] In this embodiment, the legal knowledge graph pre-stored in the terminal device contains multiple knowledge nodes, and each knowledge node can correspond to a legal entity. For example, the above legal entities can be "intellectual property", "trademark" and "litigant", etc. There are corresponding associations between different legal entities. For example, "intellectual property" contains "trademark", that is, the former contains the latter, which belongs to an inclusion relationship. The terminal device can create corresponding knowledge nodes for different legal entities, and generate a legal knowledge graph based on the associations between different knowledge nodes.

[0039] In this embodiment, a plurality of historical cases may be stored in the storage module of the terminal device, and the historical cases may include standard legal texts, such as criminal law, civil law, and constitution, which are used to define legal clauses; the historical cases may also include all intermediate texts generated by each user when handling legal cases and the judgment results of legal cases, such as prosecution documents, defense evidence, and judgments, etc. The terminal device may download the above historical cases from the Internet, or receive uploads from each user, and configure a corresponding case identifier for each historical case, which is stored in a local storage module or in a cloud server. In a possible implementation, in order to improve the storage efficiency of historical cases, the terminal device may perform a duplicate check operation on all historical cases before storing historical cases, calculate the repetition rate between each historical case, and if the repetition rate between any two historical cases is greater than a preset repetition threshold, the above two historical cases are identified as the same case, and multiple historical cases with a repetition rate greater than the preset repetition threshold are merged, thereby reducing the data repetition rate in the storage device and improving the storage efficiency of the database.

[0040] In this embodiment, the terminal device can perform semantic analysis on historical cases to determine whether the historical cases contain node keywords corresponding to any knowledge node in the legal knowledge graph. If so, the historical cases are divided into multiple data packets with different data volumes based on the identified node keywords. Among them, the text information contained in each data packet is merged to obtain the above-mentioned complete historical cases, and the historical cases are divided into blocks and stored in distributed storage nodes to improve the efficiency of retrieval and extraction.

[0041] In S102, a case index table corresponding to the historical case is created according to the knowledge nodes associated with each data packet; each of the knowledge nodes is associated with a corresponding distributed storage node; the case index table is used to store the network address of the distributed storage node.

[0042] In this embodiment, the terminal device can pre-configure corresponding distributed storage nodes for each knowledge node in the legal knowledge graph. Each distributed storage node is used to store data packets corresponding to the associated knowledge node. Therefore, the text information of all data packets stored in the distributed storage node contains node keywords corresponding to the knowledge node. In the subsequent retrieval process, if a data packet of a historical case is stored in the distributed storage node of the target node corresponding to the search keyword, the historical case can be determined as the target case retrieved by the user, thereby realizing the rapid output of the retrieval results.

[0043] In this embodiment, the file retrieval system includes a plurality of distributed storage nodes, which constitute a distributed storage system. In addition to the distributed storage nodes, the distributed storage system may also include an addressing root node. When the distributed storage system needs to obtain a certain historical case, the case identification of the historical case will be sent to the addressing root node, and the addressing root node will obtain the case index table corresponding to the received case identification. Since the case index table stores the network addresses of the distributed storage nodes corresponding to each fragment of the historical case, i.e., the above-mentioned data packet, each data packet of the historical case can be retrieved from each distributed storage node based on the case index table, thereby generating a historical case and outputting the historical case.

[0044] In this embodiment, the terminal device may store an addressing table of each distributed storage node, query the network address of the distributed storage node corresponding to each knowledge node according to the data packets obtained by historical case classification and the knowledge nodes corresponding to each data packet, and establish an association relationship between the data packet and the network address to generate the above-mentioned case index table. It should be noted that each historical case can correspond to a case index table.

[0045] In S103, based on the case index table, each of the data packets of the historical case is stored in the associated distributed storage node.

[0046] In this embodiment, the terminal device can upload each data packet to the distributed storage node corresponding to the associated knowledge node for storage according to the network address recorded in the case index table, thereby realizing distributed storage of the entire historical case.

[0047] In a possible implementation, when the amount of data is large, one knowledge node may correspond to multiple distributed storage nodes. In this case, the terminal device may select one of the multiple distributed storage nodes as the target storage node for storing the data packets of historical cases through a preset load balancing algorithm. The terminal device may obtain the occupancy rate of each distributed storage node and the network operation parameters of each distributed storage node. Specifically, if the occupancy rate of the distributed storage node is higher, the corresponding storage priority is higher; if the value of the network operation parameter of the distributed storage node is larger (wherein the value of the network operation parameter is used to represent the data transmission rate and signal-to-noise ratio of the distributed storage node, so the larger the value, the larger the data transmission rate and the higher the signal-to-noise ratio), the corresponding storage priority is higher. The terminal device may import the storage occupancy rate and the network operation parameter into the storage priority conversion model, calculate the storage priority of each distributed storage node respectively, and select the distributed storage node with the highest storage priority as the target storage node.

[0048] It should be noted that if there are new cases, the new cases can be divided into multiple data packets through the operations of S101 to S103, and each data packet is stored in a distributed storage node corresponding to the associated knowledge node.

[0049] In S104, based on the received search keyword, a target node associated with the search keyword in the legal knowledge graph is determined.

[0050] In this embodiment, when a user needs to search for historical cases, he or she can send search keywords to the terminal device. If the terminal device is a mobile terminal, such as a smart phone, a laptop computer, etc., the user can input the search keywords of the desired search cases through the interactive module of the terminal device, and the terminal device can generate file retrieval results based on the received search keywords; if the terminal device is a server, such as a retrieval server, the user can generate a retrieval request through the user terminal, and the retrieval request includes the above search keywords, and send the retrieval request to the server through the client associated with the server built into the user terminal. After receiving the retrieval request, the server extracts the search keywords included in the retrieval request and generates file retrieval results.

[0051] In this embodiment, the terminal device can match the search keyword with each knowledge node in the legal knowledge graph, and select the knowledge node that matches the search keyword as the above-mentioned target node.

[0052] In S105, a file search result is generated according to the historical cases contained in the distributed storage node corresponding to the target node.

[0053] In this embodiment, the target node stores a data packet containing a node keyword of an associated knowledge node, and the node keyword matches the search keyword, then the text information of the data packet matches the search keyword, so that it can be determined that the historical case corresponding to the data packet is the target case that the user needs to search for. Therefore, the case identification of the historical case corresponding to each data packet in the target node can be obtained. The case identification can be the case title of the historical case, and the above-mentioned file retrieval results are generated based on each case identification.

[0054] In a possible implementation, if the search keyword contains multiple ones, the terminal device can determine the display order of each historical case in the file search results according to the number of search keywords contained in the historical case, and the greater the number of matching search keywords, the higher the display order. If multiple historical cases contain the same number of search keywords, the display order of each historical case in the file search results can be determined according to the number of times each search keyword appears in the historical case, wherein the historical case with more appearances has a higher display order.

[0055] From the above, it can be seen that when storing historical cases, a method for file retrieval provided by an embodiment of the present application divides historical cases into multiple data packets according to the legal knowledge graph, and stores them in multiple different nodes in a distributed manner. Through the corresponding case index table, the associated data packets can be extracted from different distributed storage nodes to regenerate historical cases; in the subsequent keyword search, the target node can be determined by searching for keywords, and the historical case corresponding to the data packet stored in the target node is the target case of this search, and the file retrieval result is generated, thereby achieving the purpose of file retrieval. Compared with the existing legal case retrieval technology, since different distributed storage nodes store data packets of historical cases, and the data packets in each distributed storage node correspond to the same knowledge node, in the subsequent search process, there is no need to perform a full-text search. After determining the target node associated with the search keyword, the historical case corresponding to the data packet stored in the target node is the target case of this retrieval, thereby greatly reducing the search time and improving the retrieval efficiency.

[0056] Figure 2 The following is a flowchart showing a specific implementation of a method for file retrieval provided in the second embodiment of the present application. Figure 2 , relative to Figure 1 In the embodiment, a method for document retrieval provided by the embodiment further includes: S201 to S204, which are described in detail as follows:

[0057] Furthermore, before dividing each of the historical cases into a plurality of data packets based on the knowledge nodes included in the preset legal knowledge graph, the method further includes:

[0058] In S201, semantic analysis is performed on all the historical cases in the case database to obtain multiple legal entities.

[0059] In this embodiment, the terminal device can determine the case keywords contained in the historical cases through the semantic analysis algorithm, identify the part of speech type of each document keyword, select the case keywords related to legal knowledge as the above-mentioned legal entity, and thus obtain the legal entity of each existing document. Among them, the process of determining the case keywords through the semantic analysis algorithm can specifically include: dividing the historical cases into sentences to obtain multiple case sentences, extracting phrases from the sentences, obtaining candidate keywords corresponding to the case sentences, identifying the part of speech of each candidate keyword, selecting candidate keywords of the noun part of speech as case keywords, and keywords such as verbs and prepositions can be used to determine the association relationship between different case keywords.

[0060] In S202, clustering operation is performed on the plurality of legal entities based on the standard legal text to obtain a plurality of the knowledge nodes.

[0061] In this embodiment, after obtaining the legal entities included in the legal text, the terminal device can perform a clustering operation on the legal entities, encapsulate multiple legal entities with associated relationships into the same knowledge node, and thus determine the knowledge nodes included in the legal text.

[0062] In one possible implementation, historical cases include multiple different languages, for example, English and its corresponding Chinese translation. Therefore, for the same entity, there are translated names in different languages ​​in the above historical cases, that is, legal entities in different languages, and there is an association relationship between the above legal entities corresponding to the same entity, and multiple legal entities belonging to the same entity are clustered into one knowledge node.

[0063] In one possible implementation, the terminal device stores an alias list obtained from the Internet or legal texts. For the same entity, there may be multiple different alias names in different legal documents. For example, "Criminal Law" and "Criminal Law" have different names, but the corresponding legal entities are the same and they are alias relationships. After obtaining the legal entities contained in the historical cases, the terminal device can identify multiple legal entities with alias relationships, cluster the legal entities with alias relationships, and identify them through the same knowledge node in the legal knowledge graph, thereby improving the accuracy of the legal knowledge graph.

[0064] In S203, association relationships between the knowledge nodes are established based on co-occurring segments of each knowledge node in all the historical cases.

[0065] In this embodiment, different legal entities can appear in the same paragraph of historical cases, and two legal entities in the same paragraph are identified as having a co-occurrence relationship, and the paragraph containing multiple legal entities in the historical cases is identified as a co-occurrence paragraph. For example, "Civil law includes marriage law, contract law, etc.", this paragraph contains three legal entities, namely "Civil law", "Marriage law" and "Contract law", then the paragraph that records the above three legal entities at the same time is a co-occurrence paragraph.

[0066] In this embodiment, the terminal device can obtain co-occurring segments of legal entities corresponding to multiple different knowledge nodes, locate the above-identified legal entities in the co-occurring segments, and determine the association relationship between the multiple legal entities based on the conjunctions between the multiple legal entities, and identify the association relationship between the legal entities as the association relationship between the corresponding knowledge nodes.

[0067] In S204, the legal knowledge graph is generated based on the association relationship and the knowledge nodes.

[0068] In this embodiment, the terminal device can connect knowledge nodes based on association relationships, so as to generate a legal knowledge graph about all identified legal entities.

[0069] In an embodiment of the present application, by performing voice analysis on historical cases, the legal entities contained in each historical case are determined, and the legal entities belonging to the same content are clustered to generate knowledge nodes, and a legal knowledge graph is constructed, thereby improving the aggregation and accuracy of the legal knowledge graph.

[0070] Figure 3 FIG. 2 shows a specific implementation flow chart of a file retrieval method S202 provided in the third embodiment of the present application. Figure 3 , relative to Figure 2In the embodiment, the file retrieval method provided in this embodiment includes S2021 to S2024, which are described in detail as follows:

[0071] Furthermore, the user information includes the to-be-processed tasks of the target user, and the step of extracting candidate documents associated with the user information from the document database based on the user information of the target user includes:

[0072] In S2021, the associated entities and the associated types of each of the legal entities are determined in the standard legal text.

[0073] In this embodiment, in addition to determining whether there is an alias relationship between different legal entities by downloading an alias list from the Internet, the terminal device can also determine whether different legal entities correspond to the same legal content through self-learning of multiple standard legal texts.

[0074] In this embodiment, the terminal device can mark the legal entity in each standard legal text, obtain the statement corresponding to the legal entity, and obtain other entities in the statement except the above legal entity, identify them as associated entities that have an associated relationship with the legal entity, and determine the association type between the legal entity and each associated entity from the above statement.

[0075] For example, the legal entity that needs to determine the alias relationship is "Civil Law". A standard legal text contains the following sentence "Civil Law includes Marriage Law, Contract Law, etc." In addition to the legal entity "Civil Law", this sentence also includes two related entities, "Marriage Law" and "Contract Law", and the relationship type between "Civil Law" and the above two related entities is an "inclusion" relationship.

[0076] In S2022, an association network of the legal entity is generated based on the associated entities and the association types of the associated entities.

[0077] In this embodiment, since the standard legal text is specifically used to define various legal concepts, the association types between different legal knowledge can be determined through the standard legal text, and the above-identified association relationship is determined based on the definition statement of the standard legal text for legal probability, so the accuracy of the association relationship is high. After the terminal device performs the above-mentioned extraction of the associated entities of the legal entity and determines the association type of each associated entity on all standard legal texts, all the associated entities and association types can be integrated to generate the above-mentioned association network of the legal entity.

[0078] In a possible implementation, the above-mentioned association network can be a star-shaped relationship network, the center of the star-shaped relationship network is the above-mentioned legal entity, and the branch nodes of the star-shaped relationship network are the associated entities that have an association relationship with the legal entity. The connecting line between the central node and the branch node can be used to represent the type of association between the two. Figure 4 1 shows an associated network provided by an embodiment of the present application. Figure 4 As shown, the association network is specifically the association network corresponding to the legal entity "Civil Law". The associated entities corresponding to the "Civil Law" include "Marriage Law", "Contract Law", "Inheritance Law", "Criminal Law" and "Civil Claims", and the association relationship between the "Civil Law" and each associated entity is shown in the figure.

[0079] In S2023, if the similarity between the association networks of any two of the legal entities is greater than a preset similarity threshold, it is identified that the two legal entities have an alias relationship.

[0080] In this embodiment, after obtaining the association network corresponding to each legal entity, the terminal device can calculate the similarity between any two association networks, wherein the similarity calculation is specifically as follows: counting the first number of the same association entities, identifying the association type between the same association entities, counting the second number of the same association entities and the same association type, and determining the similarity between the two association networks based on the first number and the second number. The more the first number of the same association entities, the higher the similarity between the two legal entities.

[0081] In one possible implementation, the terminal device can calculate the similarity between two associated networks through a preset similarity calculation algorithm, wherein the above-mentioned similarity calculation algorithm can specifically be a cosine similarity calculation algorithm or a Euclidean distance calculation algorithm. Specifically, the two associated networks are converted into corresponding vector matrices, and the vector distance between the two vector matrices is determined. The similarity between the two associated networks is determined based on the above-mentioned vector distance.

[0082] In a possible implementation, the similarity can be calculated as follows: the terminal device can configure the corresponding basic weight for the same associated entity, wherein the smaller the conceptual scope of the associated entity, the higher the corresponding basic weight; conversely, if the conceptual scope of the associated entity is larger, the corresponding basic weight is lower. For example, if the conceptual scope corresponding to "Civil Law" is larger, the corresponding basic weight value is smaller, which can be "1"; and compared with "Civil Law", the conceptual scope corresponding to "Marriage Law" is smaller, the corresponding basic weight value is larger, which can be "2". If the association type corresponding to the same associated entity is also the same, the preset weighting coefficient can be superimposed on the basic weight to obtain the similarity factor corresponding to each of the same associated entities. By superimposing the similarity factors of all the same associated entities, the similarity between the above two associated networks can be calculated.

[0083] In this embodiment, if the similarity between the association networks of two legal entities is less than or equal to a preset similarity threshold, it is recognized that the two legal entities correspond to different legal concepts, that is, different aliases that do not belong to the same concept; conversely, if the similarity is greater than the similarity threshold, it is recognized that the two legal entities correspond to the same legal concept and are aliases to each other.

[0084] In S2024, the plurality of legal entities having the alias relationship are clustered into the same knowledge node.

[0085] In this embodiment, the terminal device clusters multiple legal entities that have alias relationships into the same knowledge node, so that alias association can be achieved in the subsequent search process, thereby improving the search accuracy.

[0086] In an embodiment of the present application, by constructing an association network of different legal entities, calculating the similarity between different association networks, identifying multiple different legal entities with alias relationships, and performing clustering operations, the accuracy of the legal knowledge graph can be improved and the retrieval efficiency can be further improved.

[0087] Figure 5 FIG. 4 shows a specific implementation flow chart of a method for file retrieval provided in the fourth embodiment of the present application. Figure 5 , relative to Figure 1 The embodiment, a method for document retrieval provided by the embodiment, before the knowledge nodes contained in the preset legal knowledge graph are respectively divided into multiple data packets, includes: S501 to S503, which are specifically described as follows:

[0088] Furthermore, before dividing each of the historical cases into a plurality of data packets based on the knowledge nodes included in the preset legal knowledge graph, the method includes:

[0089] In S501, the case labels of each of the historical cases in the case database are obtained, and based on the label levels of each of the case labels, a case relationship tree corresponding to the case database is constructed; the case relationship tree includes multiple branch nodes; each branch node is associated with one of the case labels.

[0090] In this embodiment, when a historical case is stored in a case database, a corresponding case label can be configured for the historical case based on dimensions such as the content, title, and document acquisition channel of the historical case. The above-mentioned case label can be configured by manual input by the user, or it can be automatically extracted after the terminal device performs semantic analysis on the document content. The historical cases in the case database can include case labels for identifying information of different dimensions, including legal category labels for identifying the legal field to which the historical case belongs. The terminal device can extract the legal category label from all case labels of the historical case to determine the legal field corresponding to the existing document.

[0091] For example, the legal category label can be determined based on the document content of the historical case. If the document content of the historical case describes the process of property inheritance of a certain user, the value of the legal category label can be "Inheritance Law"; if the document content of the historical case describes the process of determining the marriage relationship between two users, the value of the legal category label can be "Marriage Law". Of course, if the document content of a historical case involves multiple legal fields, for example, a historical case involves the property inheritance of a divorced and widowed partner, then the existing document may involve two parts of content, "Inheritance Law" and "Marriage Law", and the legal type label can be "Inheritance Law" and "Marriage Law".

[0092] In this embodiment, each case label can determine the cascade relationship between each other according to the size of the field to which it belongs and the coverage relationship. For example, if a case label is "Civil Law" and another case label is "Marriage Law", and Marriage Law is a legal branch of Civil Law, that is, Civil Law belongs to an upper label node of Marriage Law; and Marriage Law belongs to a lower label node of Civil Law. The terminal device can generate a case relationship tree corresponding to the case database according to the cascade relationship between each case label, that is, the above-mentioned label level, and store the historical cases in the corresponding branch nodes according to the case labels corresponding to each historical case, thereby achieving the purpose of classifying historical cases based on the case relationship tree.

[0093] For example, Figure 6 FIG. 1 shows a schematic diagram of the structure of a case relationship tree provided by an embodiment of the present application. Figure 6As shown, the case relationship tree contains multiple branch nodes, each of which corresponds to a case label. The cascade relationship between each branch node can be determined according to the size of the field to which it belongs and the inclusion relationship. Among them, the coverage of the parent node covers the coverage of the child node, that is, the field range of the parent node is larger than the field range of the child node, and the inclusion relationship between the parent node and the child node. Among them, each label node can mark the number of related historical cases.

[0094] In S502, each of the historical cases is imported into the associated branch node according to the case label, and a legal sub-graph of the branch node is established based on the legal entities of all the historical cases contained in the branch node.

[0095] In this embodiment, the terminal device can store each historical case in the corresponding branch node according to the case label corresponding to each historical case. The historical cases belonging to the same branch node contain the same case label, so that the historical cases can be classified based on the case relationship tree. The terminal device can also perform semantic analysis on each historical case in each branch node, extract the legal entities contained in each historical case, and create a knowledge node based on the legal entity, and generate a legal sub-graph of the branch node based on all the knowledge nodes in the branch node.

[0096] In S503, the legal knowledge graph is generated based on the legal sub-graphs of all branch nodes and the case relationship tree.

[0097] In this embodiment, the terminal device connects the legal sub-graphs of each branch node based on the association relationship between each branch node in the case relationship tree to generate the above-mentioned legal knowledge graph.

[0098] In an embodiment of the present application, by constructing a case relationship tree corresponding to the case database and establishing a legal knowledge graph based on the case relationship tree, the cascade relationship between different knowledge nodes in the legal knowledge graph can be improved, thereby improving the accuracy of subsequent retrieval.

[0099] Figure 7 FIG. 5 shows a specific implementation flow chart of a file retrieval method S101 provided in the fifth embodiment of the present application. Figure 7 , relative to Figure 1-6 In the embodiment, a file retrieval method S101 provided in this embodiment includes: S1011 to S1013, which are described in detail as follows:

[0100] Furthermore, the knowledge nodes contained in the preset legal knowledge graph are used to divide each of the historical cases into a plurality of data packets, including:

[0101] In S1011, the historical cases are divided into a plurality of text segments according to a preset block data volume.

[0102] In this embodiment, each distributed storage node can pre-set the block data volume of the data packet, so as to facilitate the management of the data packet. Specifically, the data volume of each data packet is not greater than the above-mentioned block data volume. Based on this, the terminal device can divide the historical case into multiple text segments based on the block data volume, and the data volume corresponding to each text segment is not greater than the above-mentioned block data volume.

[0103] In S1012, keywords are extracted from each of the text segments based on the legal knowledge graph to obtain text keywords corresponding to each of the text segments; the text keywords are recorded in the knowledge nodes of the legal knowledge graph.

[0104] In this embodiment, after dividing historical cases into multiple text segments, the terminal device can perform keyword search on each text segment to determine whether the text segment contains a node keyword corresponding to any knowledge node of the legal knowledge graph. If the text segment contains a node keyword corresponding to a knowledge node, the node keyword is identified as the text keyword corresponding to the text segment.

[0105] In one possible implementation, if the text segment contains node keywords corresponding to multiple knowledge nodes, the associated nodes corresponding to the knowledge nodes can be obtained, the number of associated keywords of the associated nodes contained in the text segment can be counted, and the knowledge node containing the largest number of associated keywords can be selected as the knowledge node corresponding to the text segment.

[0106] In S1013, an association relationship between the text segment and the knowledge node is established, and the data packet is generated according to the association relationship and the text segment.

[0107] In this embodiment, after determining the associated knowledge nodes of each text segment in the legal knowledge graph, the terminal device can establish an association relationship between the two and encapsulate the association relationship in the above data packet, so that it can be uploaded to the distributed storage node corresponding to the knowledge node based on the above association relationship during subsequent storage.

[0108] In an embodiment of the present application, the historical text is divided into text segments based on the amount of block data, so as to ensure that the data amount of each data packet is consistent, thereby improving the efficiency of subsequent data storage and management.

[0109] Figure 8 FIG. 6 shows a specific implementation flow chart of a file retrieval method S104 provided in the sixth embodiment of the present application. Figure 8 , relative to Figures 1 to 6In any of the above embodiments, in a file retrieval method provided in this embodiment, S104 includes: S1041 to S1042, which are described in detail as follows:

[0110] Furthermore, the step of determining a target node associated with the search keyword in the legal knowledge graph based on the received search keyword includes:

[0111] In S1041, semantic analysis is performed on the search keyword to determine the legal entity included in the search keyword.

[0112] In this embodiment, when searching for historical cases, the user can enter the corresponding search keyword, and the terminal device can perform semantic analysis on the search keyword to extract the legal entity contained in the search keyword. Since the above search keyword can be composed of multiple different legal entities, for example, "intellectual property rights protection" contains the two legal entities "intellectual property" and "rights protection"; or a search keyword can have multiple different aliases or translations, the terminal device can determine the legal entities corresponding to different aliases or translations based on the search keyword entered by the user, and realize search association.

[0113] In S1042, the legal entity contained in the search keyword is matched with each knowledge node in the legal knowledge graph, and the knowledge node matched with the legal entity is identified as the target node associated with the search keyword.

[0114] In this embodiment, the terminal device may match the legal entity included in the search keyword with each knowledge node, and use the matched knowledge node as the target node corresponding to the search keyword.

[0115] In an embodiment of the present application, by performing semantic analysis on the search keywords, the legal entities contained in the search keywords are determined, and the corresponding knowledge nodes are searched based on the legal entities, thereby achieving the purpose of determining the knowledge nodes corresponding to the search results.

[0116] Fig. 9 The flowchart of S105 of the method for file retrieval provided in the seventh embodiment of the present application is shown. Fig. 9 , relative to Figures 1 to 6 In any of the above embodiments, in a file retrieval method provided in this embodiment, S105 includes: S1051-S1052, which are specifically described as follows:

[0117] Furthermore, generating a file search result according to the historical cases contained in the distributed storage node corresponding to the target node includes:

[0118] In S1051, the data packet of the historical case stored in the distributed storage node corresponding to the target node is extracted, and the search keyword is marked from the case paragraph corresponding to the data packet.

[0119] In this embodiment, after determining the target node, the terminal device can query the data packets stored in the distributed storage node according to the network address of the distributed storage node associated with the target node, and each data packet can correspond to an associated historical case; by parsing the above data packets, the case paragraphs stored in the data packets are obtained, and the legal entities corresponding to the search keywords are marked in the case paragraphs. The above marks can be highlighted in red or highlighted.

[0120] In S1052, all the case segments marked with the search keyword are packaged to generate the document retrieval result.

[0121] In this embodiment, the terminal device encapsulates all case segments marked with search keywords in the target node and generates file retrieval results. Through the above file retrieval results, the user can determine the case segments containing the search keywords and the case identifiers of the historical cases corresponding to each case segment, and have a simple understanding of the search results. The user can select a number of historical cases from the file retrieval results as target cases. The terminal device can obtain the case index table corresponding to the target case according to the user's selection instruction, and extract the data packets about the target case from each distributed storage node, and reconstruct the above target case for output. There is no need to obtain the complete historical case in the search stage. The complete text of the historical case is only obtained when it needs to be downloaded, thereby improving the search speed and reducing the amount of access data of the file retrieval system.

[0122] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0123] Fig.10 The structure block diagram of a file retrieval device provided by an embodiment of the present application is shown. The file retrieval device includes various units for executing Figure 1 For details, please refer to the steps in the corresponding embodiment. Fig.10 and Figure 1 For the convenience of explanation, only the parts related to this embodiment are shown.

[0124] See also Fig.10 , the file retrieval device comprises:

[0125] A data packet division unit 11 is used to divide each of the historical cases into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph;

[0126] The case index table creation unit 12 is used to create a case index table corresponding to the historical case according to the knowledge nodes associated with each data packet; each of the knowledge nodes is associated with a corresponding distributed storage node; the case index table is used to store the network address of the distributed storage node;

[0127] The data packet storage unit 13 is used to store each data packet of the historical case in the associated distributed storage node based on the case index table;

[0128] A search keyword receiving unit 14, configured to determine a target node associated with the search keyword in the legal knowledge graph based on the received search keyword;

[0129] The file retrieval result output unit 15 is used to generate a file retrieval result according to the historical cases contained in the distributed storage node corresponding to the target node.

[0130] Optionally, the file retrieval device further includes:

[0131] A legal entity acquisition unit, used for performing semantic analysis on all the historical cases in the case database to obtain a plurality of legal entities;

[0132] A legal entity clustering unit, configured to perform a clustering operation on the plurality of legal entities based on a standard legal text to obtain a plurality of knowledge nodes;

[0133] An association determination unit, configured to establish associations between the knowledge nodes according to co-occurring segments of each knowledge node in all the historical cases;

[0134] The first legal knowledge graph generating unit is used to generate the legal knowledge graph according to the association relationship and the knowledge nodes.

[0135] Optionally, the legal entity clustering unit includes:

[0136] An associated entity determination unit, used to determine the associated entities and the associated types of each of the legal entities in the standard legal text;

[0137] an association network generating unit, configured to generate an association network of the legal entity based on the association entities and the association types of the association entities;

[0138] a similarity calculation unit, configured to identify that an alias relationship exists between the two legal entities if the similarity between the association networks of any two of the legal entities is greater than a preset similarity threshold;

[0139] The alias relationship identification unit is used to cluster the multiple legal entities with the alias relationship into the same knowledge node.

[0140] Optionally, the file retrieval device further includes:

[0141] A case relationship tree construction unit is used to obtain the case labels of each of the historical cases in the case database, and to construct a case relationship tree corresponding to the case database based on the label level of each of the case labels; the case relationship tree includes a plurality of branch nodes; each branch node is associated with one of the case labels;

[0142] A legal sub-graph generating unit, configured to import each of the historical cases into the associated branch node according to the case label, and to establish a legal sub-graph of the branch node based on the legal entities of all the historical cases contained in the branch node;

[0143] The second legal knowledge graph generating unit is used to generate the legal knowledge graph according to the legal sub-graphs of all branch nodes and the case relationship tree.

[0144] Optionally, the data packet division unit 11 includes:

[0145] A text segment division unit, used to divide the historical case into a plurality of text segments according to a preset block data amount;

[0146] A text keyword extraction unit, used to extract keywords from each of the text segments based on the legal knowledge graph to obtain text keywords corresponding to each of the text segments; the text keywords are recorded in the knowledge nodes of the legal knowledge graph;

[0147] The data packet encapsulation unit is used to establish an association relationship between the text segment and the knowledge node, and generate the data packet according to the association relationship and the text segment.

[0148] Optionally, the search keyword receiving unit 14 includes:

[0149] A legal entity determination unit, configured to perform semantic analysis on the search keyword to determine the legal entity contained in the search keyword;

[0150] A target node determination unit is used to match the legal entity contained in the search keyword with each knowledge node in the legal knowledge graph, and identify the knowledge node matching the legal entity as the target node associated with the search keyword.

[0151] Optionally, the file retrieval result output unit 15 includes:

[0152] A search keyword marking unit, configured to extract a data packet of the historical case stored in the distributed storage node corresponding to the target node, and mark the search keyword from the case paragraph corresponding to the data packet;

[0153] The case paragraph encapsulation unit is used to encapsulate all the case paragraphs marked with the search keyword to generate the document retrieval result.

[0154] Therefore, in the file retrieval device provided by the embodiment of the present application, since different distributed storage nodes store data packets of historical cases, and the data packets in each distributed storage node correspond to the same knowledge node, there is no need to perform a full-text search in the subsequent search process. After determining the target node associated with the search keyword, the historical case corresponding to the data packet stored in the target node is the target case of this retrieval, thereby greatly reducing the search time and improving the retrieval efficiency.

[0155] Fig.11 is a schematic diagram of a terminal device provided by another embodiment of the present application. Fig.11 As shown, the terminal device 11 of this embodiment includes: a processor 110, a memory 111, and a computer program 112 stored in the memory 111 and executable on the processor 110, such as a file retrieval program. When the processor 110 executes the computer program 112, the steps in the above-mentioned various file retrieval method embodiments are implemented, such as Figure 1 Alternatively, when the processor 110 executes the computer program 112, the functions of each unit in the above-mentioned device embodiments are realized, for example, Fig.10 The functions of modules 11 to 15 are shown.

[0156] Exemplarily, the computer program 112 may be divided into one or more units, which are stored in the memory 111 and executed by the processor 110 to complete the present application. The one or more units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 112 in the terminal device 11. For example, the computer program 112 may be divided into a data packet division unit, a case index table creation unit, a data packet storage unit, a search keyword receiving unit, and a file retrieval result output unit, and the specific functions of each unit are as described above.

[0157] The terminal device 11 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 110 and a memory 111. Those skilled in the art will appreciate that Fig.11 It is only an example of the terminal device 11 and does not constitute a limitation of the terminal device 11. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0158] The processor 110 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0159] The memory 111 may be an internal storage unit of the terminal device 11, such as a hard disk or memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 11. Further, the memory 111 may also include both an internal storage unit of the terminal device 11 and an external storage device. The memory 111 is used to store the computer program and other programs and data required by the terminal device. The memory 111 may also be used to temporarily store data that has been output or is to be output.

[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0161] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for file retrieval, characterized in that: include: Based on the knowledge nodes contained in the preset legal knowledge graph, each historical case is divided into multiple data packets; According to the knowledge nodes associated with each data packet, a case index table corresponding to the historical case is created; each of the knowledge nodes is associated with a corresponding distributed storage node; The case index table is used to store the network address of the distributed storage node; Based on the case index table, storing each of the data packets of the historical case in the associated distributed storage node; Based on the received search keyword, determine a target node in the legal knowledge graph associated with the search keyword; Generate a file retrieval result according to the historical cases contained in the distributed storage node corresponding to the target node.

2. The file retrieval method according to claim 1, characterized in that: Before dividing each historical case into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph, it includes: Performing semantic analysis on all the historical cases in the case database to obtain multiple legal entities; Performing a clustering operation on the plurality of legal entities based on a standard legal text to obtain a plurality of knowledge nodes; Establishing associations between the knowledge nodes based on co-occurring segments of each knowledge node in all the historical cases; The legal knowledge graph is generated based on the association relationship and the knowledge nodes.

3. The file retrieval method according to claim 2, characterized in that: The clustering operation on the plurality of legal entities based on the standard legal text to obtain the plurality of knowledge nodes includes: Determining the associated entities and the type of association of each of the legal entities in the standard legal text; generating an association network of the legal entity based on the association entities and the association types of the association entities; If the similarity between the association networks of any two of the legal entities is greater than a preset similarity threshold, then it is identified that the two legal entities have an alias relationship; The plurality of legal entities having the alias relationship are clustered into the same knowledge node.

4. The file retrieval method according to claim 1, characterized in that: Before dividing each historical case into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph, it includes: Obtain the case labels of each of the historical cases in the case database, and construct a case relationship tree corresponding to the case database based on the label level of each of the case labels; the case relationship tree includes a plurality of branch nodes; each branch node is associated with one of the case labels; According to the case label, each of the historical cases is imported into the associated branch node, and based on the legal entities of all the historical cases contained in the branch node, a legal sub-graph of the branch node is established; The legal knowledge graph is generated based on the legal sub-graphs of all branch nodes and the case relationship tree.

5. The file retrieval method according to any one of claims 1 to 4, characterized in that: Based on the knowledge nodes contained in the preset legal knowledge graph, each historical case is divided into multiple data packets, including: Dividing the historical case into a plurality of text segments according to a preset block data volume; Based on the legal knowledge graph, keywords are extracted from each of the text segments to obtain text keywords corresponding to each of the text segments; the text keywords are recorded in the knowledge nodes of the legal knowledge graph; An association relationship between the text segment and the knowledge node is established, and the data packet is generated according to the association relationship and the text segment.

6. The file retrieval method according to any one of claims 1 to 4, characterized in that: The step of determining a target node associated with the search keyword in the legal knowledge graph based on the received search keyword includes: Performing semantic analysis on the search keywords to determine the legal entities contained in the search keywords; The legal entity contained in the search keyword is matched with each knowledge node in the legal knowledge graph, and the knowledge node matched with the legal entity is identified as the target node associated with the search keyword.

7. The file retrieval method according to any one of claims 1 to 4, characterized in that: Generating a file search result according to the historical cases contained in the distributed storage node corresponding to the target node includes: Extracting the data packet of the historical case stored in the distributed storage node corresponding to the target node, and marking the search keyword from the case paragraph corresponding to the data packet; All the case paragraphs marked with the search keyword are packaged to generate the document retrieval result.

8. A device for file retrieval, characterized in that: include: A data packet division unit, used to divide each historical case into a plurality of data packets based on the knowledge nodes contained in the preset legal knowledge graph; A case index table creation unit, used to create a case index table corresponding to the historical case according to the knowledge nodes associated with each data packet; each of the knowledge nodes is associated with a corresponding distributed storage node; The case index table is used to store the network address of the distributed storage node; A data packet storage unit, configured to store each of the data packets of the historical case in the associated distributed storage node based on the case index table; A search keyword receiving unit, configured to determine a target node associated with the search keyword in the legal knowledge graph based on the received search keyword; The file retrieval result output unit is used to generate a file retrieval result according to the historical cases contained in the distributed storage node corresponding to the target node.

9. A terminal device, characterized in that: The terminal device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for identifying legal entity

    CN109508458A

  • Knowledge graph retrieval method and system based on multiple storage media

    CN109783599A