Legal map library construction method and device based on data fragmentation

By clustering and completing the original legal map network and completing the entity attributes, data shard storage is realized, solving the problems of low efficiency and poor flexibility in the creation process of legal knowledge maps, and improving creation efficiency and flexibility.

CN119168043APending Publication Date: 2024-12-20HUNAN HUIYOUJIE NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411192152.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The current legal knowledge graph creation process has the problem of low creation efficiency and poor flexibility.

Method used

By obtaining the original legal map network, extracting the initial relationship path, identifying the associated entity attribute pair, calculating the target path length, adjusting the relationship path length, performing cluster analysis and cluster classification, obtaining multiple category entity attribute sets, and extracting the maximum overlap target with the maximum overlap Category entity attribute set, entity attribute completion, and finally data fragmented storage is performed on the target legal map classification network.

Benefits of technology

It improves the efficiency and flexibility of creating legal knowledge graphs, realizes more efficient data integration and storage, and solves the problems of low efficiency and poor flexibility in the creation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168043A_ABST
    Figure CN119168043A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge maps, and discloses a legal map library construction method based on data fragmentation, which comprises the following steps: adjusting the length of an initial relation path according to the length of a target path to obtain a target legal map network, carrying out clustering analysis on the target legal map network to obtain a legal map clustering network, performing cluster segmentation on the legal map clustering network to obtain an original legal map classification network set, and performing entity attribute complementation on the original legal map classification network according to the original legal map network by utilizing a target category entity attribute set to obtain a target legal map classification network set, and performing data fragmentation storage on the target legal map classification network set. The invention further provides a legal map library construction device based on data fragmentation, electronic equipment and a computer readable storage medium. According to the method, the problems of low creation efficiency and poor flexibility in the current legal knowledge graph creation process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and in particular to a method, device, electronic device and computer-readable storage medium for constructing a legal graph library based on data sharding. Background Art

[0002] Knowledge graphs are widely used in information retrieval, intelligent question answering, and decision support due to their high efficiency in the field of knowledge retrieval. my country has begun to continuously strengthen the construction of smart justice in order to promote the development of artificial intelligence in the judicial field.

[0003] At present, my country's judicial data comes from a wide range of sources, involving a variety of laws and legal terminology. In the process of judicial personnel clearing up the case and collecting evidence, it often takes a lot of manpower. Therefore, the legal knowledge graph came into being. Through the legal knowledge graph, relevant judicial data can be integrated to form a structured knowledge graph network, thereby realizing functions such as case recommendation, crime prediction, and intelligent question and answer. However, the current way of constructing the legal knowledge graph is mainly to refer to legal documents in related fields and create them one by one. Therefore, the current creation process of the legal knowledge graph has the problems of low creation efficiency and poor flexibility. Summary of the invention

[0004] The present invention provides a method, device and computer-readable storage medium for constructing a legal graph library based on data sharding, the main purpose of which is to solve the problems of low creation efficiency and poor flexibility in the current legal knowledge graph creation process.

[0005] To achieve the above purpose, the present invention provides a method for constructing a legal atlas library based on data sharding, comprising:

[0006] Obtaining an original legal graph network, and sequentially extracting initial relationship paths in the original legal graph network;

[0007] Identify the associated entity attribute pairs connected by the initial relationship path, and identify the first relationship path number and the second relationship path number of the associated entity attribute pairs;

[0008] According to the first relationship path number and the second relationship path number, a target path length of the initial relationship path is calculated using a pre-constructed path length formula, wherein the path length formula is as follows:

[0009]

[0010] Wherein, l represents the target path length, k1 represents the first relationship proportional coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship proportional coefficient, and s2 represents the number of second relationship paths;

[0011] Adjust the length of the initial relationship path according to the target path length to obtain a target legal graph network;

[0012] Perform cluster analysis on the target legal graph network to obtain a legal graph cluster network, perform cluster segmentation on the legal graph cluster network to obtain an original legal graph classification network set;

[0013] Extracting original legal graph classification networks in the original legal graph classification network set in turn to obtain multiple category entity attribute sets;

[0014] Extracting a target category entity attribute set with the largest overlap with the original legal graph classification network from multiple category entity attribute sets;

[0015] Using the target category entity attribute set, the original legal graph classification network is supplemented with entity attributes according to the original legal graph network to obtain a target legal graph classification network set;

[0016] The target legal graph classification network set is stored in data shards to complete the construction of a legal graph library based on data shards.

[0017] Optionally, the identifying the number of first relationship paths and the number of second relationship paths of the associated entity attribute pairs includes:

[0018] Respectively identifying the number of relationship paths of two associated entity attributes in the associated entity attribute pair to obtain a pair of relationship path numbers;

[0019] Compare the two relationship path numbers in the relationship path number pair to obtain the first relationship path number and the second relationship path number, wherein the first relationship path number is greater than the second relationship path number.

[0020] Optionally, performing cluster analysis on the target legal graph network to obtain a legal graph cluster network includes:

[0021] Randomly selecting a calibrated entity attribute node in the target legal graph network;

[0022] According to a preset batch extraction method, the distances between other entity attribute nodes and the calibrated entity attribute node are sequentially extracted in the target legal graph network to obtain an entity attribute distance sequence;

[0023] Draw an entity attribute distance line graph according to the entity attribute distance sequence;

[0024] Identify the inflection point entity attribute distance in the entity attribute distance line graph, and use the inflection point entity attribute distance as the domain radius;

[0025] According to the preset minimum number of domain nodes and the domain radius, the target legal graph network is clustered using a pre-constructed density clustering algorithm to obtain a legal graph clustering network.

[0026] Optionally, clustering the target legal graph network using a pre-built density clustering algorithm according to the preset minimum number of domain nodes and the domain radius to obtain a legal graph clustering network includes:

[0027] A core entity attribute node is randomly selected in the target legal graph network according to the minimum number of domain nodes and the domain radius;

[0028] Determine the entity attribute node set including the core entity attribute node according to the domain radius;

[0029] Classify the node set containing entity attributes according to the minimum number of nodes in the field and the field radius to obtain an edge entity attribute node set and a core entity attribute node set;

[0030] Delineating iterative node clustering clusters in the target legal graph network according to the edge entity attribute node set, the core entity attribute node set and the domain radius;

[0031] Extracting core entity attribute nodes in the core entity attribute node set in sequence, returning to the step of determining the entity attribute node set including the core entity attribute node according to the domain radius, until there are no core entity attribute nodes in the iterative node clustering cluster, and obtaining a target node clustering cluster;

[0032] Removing the target node cluster in the target legal graph network to obtain a legal graph network to be clustered;

[0033] A core entity attribute node is randomly selected in the legal graph network to be clustered according to the minimum number of domain nodes and the domain radius, and the step of determining the entity attribute node set including the core entity attribute node according to the domain radius is returned to the above step until there is no target node clustering cluster in the legal graph network to be clustered, thereby obtaining a legal graph clustering network.

[0034] Optionally, the node classification of the node set containing entity attributes is performed according to the minimum number of nodes in the domain and the domain radius to obtain the edge entity attribute node set and the core entity attribute node set, including:

[0035] Sequentially extracting nodes containing entity attributes from the set of nodes containing entity attributes;

[0036] Defining the density direct reach domain of the entity attribute nodes according to the domain radius;

[0037] Determine whether the number of entity attribute nodes in the density direct access field is greater than or equal to the minimum number of nodes in the field;

[0038] If the number of entity attribute nodes in the density-reaching domain is greater than or equal to the minimum number of nodes in the domain, the included entity attribute node is used as a core entity attribute node;

[0039] If the number of entity attribute nodes in the density-reaching domain is not greater than or equal to the minimum number of nodes in the domain, the entity attribute node is used as an edge entity attribute node;

[0040] All edge entity attribute nodes and core entity attribute nodes in the entity attribute node set are aggregated to obtain an edge entity attribute node set and a core entity attribute node set.

[0041] Optionally, the clustering of the legal graph clustering network is performed to obtain an original legal graph classification network set, including:

[0042] sequentially identifying a set of out-cluster relationship paths of each target node cluster in the legal graph cluster network;

[0043] The legal graph clustering network is segmented from each external cluster relationship path in the external cluster relationship path set to obtain an original legal graph classification network set.

[0044] Optionally, extracting a target category entity attribute set having the largest overlap with the original legal graph classification network from a plurality of category entity attribute sets includes:

[0045] Sequentially extracting category entity attribute sets from the multiple category entity attribute sets;

[0046] Extracting an original entity attribute set in the original legal graph classification network;

[0047] Identify the number of entity attributes that are the same in the category entity attribute set and the original entity attribute set and the number of entity attributes in the category entity attribute set;

[0048] Using a pre-constructed coincidence formula, the coincidence of the category entity attribute set is calculated according to the number of the same entity attributes and the number of entity attributes in the category entity attribute set to obtain a coincidence set;

[0049] A target category entity attribute set corresponding to the maximum overlap is extracted from the overlap set.

[0050] Optionally, the coincidence degree formula is as follows:

[0051]

[0052] Among them, cij represents the overlap between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, x ij represents the number of identical entity attributes between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, l i Represents the number of entity attributes in the i-th category entity attribute set among multiple category entity attribute sets.

[0053] Optionally, the use of the target category entity attribute set to complete the entity attributes of the original legal graph classification network according to the original legal graph network to obtain a target legal graph classification network set includes:

[0054] Determine whether there are heterogeneous original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network;

[0055] If there are out-of-cluster original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network, the out-of-cluster original entity attributes are removed to obtain a legal graph classification network to be completed;

[0056] If there is no heterogeneous original entity attribute that does not belong to the target category entity attribute set in the original legal graph classification network, the original legal graph classification network is used as the legal graph classification network to be completed;

[0057] The original entity attribute set in the to-be-completed legal graph classification network is removed from the target category entity attribute set to obtain the to-be-completed entity attribute set;

[0058] In the original legal graph network, the entity attributes to be completed in the entity attribute set to be completed are sequentially connected with the original legal graph classification network through relationship paths to obtain a target legal graph classification network;

[0059] The target legal graph classification networks of all the original legal graph classification networks in the original legal graph classification network set are aggregated to obtain the target legal graph classification network set.

[0060] In order to solve the above problems, the present invention also provides a device for constructing a legal atlas library based on data sharding, the device comprising:

[0061] An initial relationship path extraction module is used to obtain an original legal graph network and sequentially extract initial relationship paths in the original legal graph network;

[0062] The initial relationship path adjustment module is used to identify the associated entity attribute pairs connected by the initial relationship path, identify the first relationship path number and the second relationship path number of the associated entity attribute pairs; and calculate the target path length of the initial relationship path using a pre-built path length formula according to the first relationship path number and the second relationship path number, wherein the path length formula is as follows:

[0063]

[0064] Wherein, l represents the target path length, k1 represents the first relationship ratio coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship ratio coefficient, and s2 represents the number of second relationship paths; the length of the initial relationship path is adjusted according to the target path length to obtain the target legal graph network;

[0065] The legal graph clustering network segmentation module is used to perform cluster analysis on the target legal graph network to obtain the legal graph clustering network, perform cluster segmentation on the legal graph clustering network, and obtain the original legal graph classification network set;

[0066] The original legal graph classification network completion module is used to sequentially extract the original legal graph classification networks in the original legal graph classification network set to obtain multiple category entity attribute sets; extract the target category entity attribute set with the largest overlap with the original legal graph classification network from the multiple category entity attribute sets; and use the target category entity attribute set to complete the entity attributes of the original legal graph classification network according to the original legal graph network to obtain the target legal graph classification network set;

[0067] A data sharding storage module is used to perform data sharding storage on the target legal graph classification network set.

[0068] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0069] at least one processor; and,

[0070] a memory communicatively connected to the at least one processor; wherein,

[0071] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to implement the above-mentioned method for constructing a legal graph library based on data sharding.

[0072] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned method for constructing a legal graph library based on data sharding.

[0073] Compared with the background technology: the current legal knowledge graph creation process has the phenomenon of low creation efficiency and poor flexibility. In the process of data sharding and storing the original legal graph network, the embodiment of the present invention needs to first obtain a target legal graph classification network set that can be stored in shards. Therefore, the original legal graph network needs to be classified. In the classification process, the original legal graph network needs to be clustered to facilitate classification. In order to achieve the clustering purpose, the original legal graph network is clustered by adjusting the target path length of the associated entity attribute pairs. The specific method is to first extract the initial relationship paths in the original legal graph network in sequence, and then identify the associated entity attribute pairs connected by the initial relationship paths. At this time, by identifying the first relationship path number and the second relationship path number of the associated entity attribute pairs, the purpose of calculating the target path length of the initial relationship path according to the first relationship path number and the second relationship path number using the pre-constructed path length formula is achieved. After the target path length is obtained, the target legal graph network can be clustered. The legal graph clustering network is obtained by analysis, and then the legal graph clustering network is clustered to obtain the original legal graph classification network set. Since the original legal graph classification network set is obtained by clustering the target legal graph network, it is necessary to complete the entity attributes of the original legal graph classification network. When completing the entity attributes, the original legal graph classification network can be extracted in sequence in the original legal graph classification network set to obtain multiple category entity attribute sets, and then the target category entity attribute set with the largest overlap with the original legal graph classification network is extracted from the multiple category entity attribute sets. Then, the target category entity attribute set is used. Since the original legal graph network has the category entity attributes that need to be completed in the original legal graph classification network, the original legal graph classification network can be completed according to the original legal graph network to obtain the target legal graph classification network set. At this time, the target legal graph classification network set can be stored in data shards, thereby completing the construction of the legal graph library based on data shards. Therefore, the method, device, electronic device and computer-readable storage medium for constructing a legal graph library based on data sharding proposed in the present invention can solve the problems of low creation efficiency and poor flexibility in the current legal knowledge graph creation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of a process for constructing a legal atlas library based on data sharding provided in one embodiment of the present invention;

[0075] Figure 2 A functional module diagram of a device for constructing a legal atlas library based on data sharding provided in one embodiment of the present invention;

[0076] Figure 3 A schematic diagram of the structure of an electronic device for implementing the method for constructing a legal graph library based on data sharding provided in one embodiment of the present invention.

[0077] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0078] 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.

[0079] The embodiment of the present application provides a method for constructing a legal atlas library based on data sharding. The execution subject of the method for constructing a legal atlas library based on data sharding includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for constructing a legal atlas library based on data sharding can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0080] Embodiment 1:

[0081] Reference Figure 1 FIG. 1 is a flow chart of a method for constructing a legal atlas library based on data sharding according to an embodiment of the present invention. In this embodiment, the method for constructing a legal atlas library based on data sharding includes:

[0082] S1. Obtain an original legal graph network, and extract initial relationship paths in the original legal graph network in sequence.

[0083] In an embodiment of the present invention, the original legal graph network refers to a knowledge graph constructed within a certain legal scope based on legal entities, attributes and related relationships. For example: a legal knowledge graph that includes all legal content, a legal knowledge graph that only includes substantive law, a legal knowledge graph that only includes procedural law, and a legal knowledge graph that only includes criminal law, etc. The initial relationship path refers to the relationship line segment connecting two legal entities or a legal entity and a legal attribute in the original legal knowledge graph. For example, the third item of the first paragraph of Article 293 of the Criminal Law has a correlation between legal entities and legal attributes: "The crime of provoking trouble" is punished with "imprisonment of not more than five years, detention or control". Among them, "the crime of provoking trouble" represents the legal entity, "punished" represents the correlation, and "imprisonment of not more than five years, detention or control" represents the legal attribute.

[0084] S2. Identify the associated entity attribute pairs connected by the initial relationship path, and identify the first relationship path number and the second relationship path number of the associated entity attribute pairs.

[0085] It can be understood that the associated entity attribute pair refers to two legal entities or a legal entity and a legal attribute connected by an initial relationship path, and the associated entity attribute pair has a direct correlation relationship. The first relationship path number refers to the legal entity or legal attribute that has more initial relationship paths connected in the associated entity attribute pair, and the second relationship path number refers to the legal entity or legal attribute that has fewer initial relationship paths connected in the associated entity attribute pair. For example, the crime of "picking quarrels and provoking trouble" in "Article 293, Paragraph 1, Item 1 of the Criminal Law" is "picking quarrels and provoking trouble"; the crime of "picking quarrels and provoking trouble" includes "beating others at will, with serious circumstances"; the crime of "picking quarrels and provoking trouble" includes "chasing, intercepting, insulting, and intimidating others, with serious circumstances"; the crime of "picking quarrels and provoking trouble" includes "forcibly taking or arbitrarily damaging or occupying public or private property, with serious circumstances"; the crime of "picking quarrels and provoking trouble" includes "causing trouble in public places, causing serious disorder in public order. Gathering others to repeatedly commit the acts in the preceding paragraph, seriously disrupting social order"; the penalty for "picking quarrels and provoking trouble" is "imprisonment of not less than five years but not more than ten years, and may be fined",

[0086] Furthermore, from the above six legal provisions alone, the legal subject "crime of provoking trouble", the legal attribute "randomly beating others, with serious circumstances" and the initial relationship path "crime includes" constitute an associated entity attribute pair. Among them, the legal subject "crime of provoking trouble" is connected with 6 initial relationship paths, and the legal attribute "randomly beating others, with serious circumstances" is connected with 1 initial relationship path. At this time, the number of first relationship paths and the number of second relationship paths of this associated entity attribute pair are 6 and 1 respectively.

[0087] In the embodiment of the present invention, the first relationship path number and the second relationship path number of identifying the associated entity attribute pair include:

[0088] Respectively identifying the number of relationship paths of two associated entity attributes in the associated entity attribute pair to obtain a pair of relationship path numbers;

[0089] Compare the two relationship path numbers in the relationship path number pair to obtain the first relationship path number and the second relationship path number, wherein the first relationship path number is greater than the second relationship path number.

[0090] S3. Calculate the target path length of the initial relationship path using a pre-constructed path length formula according to the first relationship path number and the second relationship path number.

[0091] It can be explained that the target path length refers to the length of the initial relationship path after adjustment according to the first relationship path number and the second relationship path number. The initial length of the initial relationship path may be 1.

[0092] In detail, the path length formula is as follows:

[0093]

[0094] Among them, l represents the target path length, k1 represents the first relationship proportional coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship proportional coefficient, and s2 represents the number of second relationship paths.

[0095] Furthermore, in order to facilitate clustering, the initial relationship paths connected to the legal entities or legal attributes with a large number of relationship paths should be reduced, and the initial relationship paths connected to the legal entities or legal attributes with a small number of relationship paths should be increased, so that the legal entities or legal attributes around the legal entities or legal attributes with a small number of relationship paths are sparser, and the legal entities or legal attributes around the legal entities or legal attributes with a large number of relationship paths are denser. Therefore, since a relationship path connects two legal entities or legal attributes, the target path length of a relationship path needs to comprehensively consider the first relationship path number and the second relationship path number.

[0096] It can be understood that the path length formula is obtained based on the tanh (hyperbolic tangent activation function) transformation. Tanh is an increasing function with a range of (-1, 1) and a domain of (-∞, +∞). By exchanging the numerator and denominator, a decreasing function is obtained, that is, the more relationship paths a legal subject or legal attribute has, the shorter the initial length of the initial relationship path is adjusted, and the fewer relationship paths a legal subject or legal attribute has, the longer the initial length of the initial relationship path is adjusted. In order to intuitively reflect the clustering effect after the original legal graph network is adjusted, the scale of adjustment of legal subjects or legal attributes with a larger number of relationship paths and legal subjects or legal attributes with a smaller number of relationship paths should be set as needed, and can be specifically adjusted using the first relationship proportional coefficient and the second relationship proportional coefficient.

[0097] S4. Adjust the length of the initial relationship path according to the target path length to obtain a target legal graph network.

[0098] It should be understood that after all the initial relationship paths in the original legal graph network are adjusted to the corresponding target path length, clustering is completed. At this time, legal entities or legal attributes with high correlation will show stronger clustering, while legal entities or legal attributes with low correlation will show weaker clustering.

[0099] S5. Perform cluster analysis on the target legal graph network to obtain a legal graph clustering network, perform cluster segmentation on the legal graph clustering network, and obtain an original legal graph classification network set.

[0100] It is understandable that the legal subjects or legal attributes with high correlation in the target legal graph network will be clustered closely, and the legal subjects or legal attributes with low correlation will be clustered sparsely. At this time, the target graph network can be clustered according to the preset clustering algorithm to obtain the legal graph clustering network. Generally, when there is a clear gap between the legal subjects or legal attribute set of a region and the surrounding legal subjects or legal attributes, it means that the legal subjects or legal attribute set of the region is a cluster. For example: in procedural law, the Civil Procedure Law, the Criminal Procedure Law, the Administrative Procedure Law, and the Legislative Procedure Law are each a cluster. When the legal graph clustering network is procedural law, the legal subjects or legal attributes involved in the Civil Procedure Law will be clustered more densely, and the legal subjects or legal attributes involved in the Criminal Procedure Law will be clustered more densely.

[0101] It should be understood that after obtaining the legal graph cluster network, each cluster in the legal graph cluster network can be separated from the surrounding clusters along the relationship path, thereby obtaining an independent original legal graph classification network separated from the legal graph cluster network. Each original legal graph classification network represents a cluster.

[0102] In the embodiment of the present invention, the cluster analysis of the target legal graph network to obtain the legal graph cluster network includes:

[0103] Randomly selecting a calibrated entity attribute node in the target legal graph network;

[0104] According to a preset batch extraction method, the distances between other entity attribute nodes and the calibrated entity attribute node are sequentially extracted in the target legal graph network to obtain an entity attribute distance sequence;

[0105] Draw an entity attribute distance line graph according to the entity attribute distance sequence;

[0106] Identify the inflection point entity attribute distance in the entity attribute distance line graph, and use the inflection point entity attribute distance as the domain radius;

[0107] According to the preset minimum number of domain nodes and the domain radius, the target legal graph network is clustered using a pre-constructed density clustering algorithm to obtain a legal graph clustering network.

[0108] Optionally, considering the randomness of the distribution of legal entities or legal attributes in the original legal graph network (the shape of legal entities or legal attributes in the same cluster is long strips), the clustering method used in the embodiment of the present invention is a density-based spatial clustering of applications with noise (DBSCAN for short).

[0109] It can be understood that the density-based algorithm has two key hyperparameters: radius epsilon and minimum sample number minPts. The minimum number of nodes in the domain refers to the minimum sample number minPts, which can be set as needed, for example: 4. The domain radius refers to the radius epsilon.

[0110] It should be understood that the inflection point entity attribute distance refers to the distance at which the entity attribute distance sequence has a mutation. In order to determine the appropriate value of the domain radius, the entity attribute distance corresponding to the first inflection point of the entity attribute distance line graph is usually used as the domain radius.

[0111] In the embodiment of the present invention, the method of clustering the target legal graph network using a pre-built density clustering algorithm according to the preset minimum number of nodes in the field and the field radius to obtain the legal graph clustering network includes:

[0112] A core entity attribute node is randomly selected in the target legal graph network according to the minimum number of domain nodes and the domain radius;

[0113] Determine the entity attribute node set including the core entity attribute node according to the domain radius;

[0114] Classify the node set containing entity attributes according to the minimum number of nodes in the field and the field radius to obtain an edge entity attribute node set and a core entity attribute node set;

[0115] Delineating iterative node clustering clusters in the target legal graph network according to the edge entity attribute node set, the core entity attribute node set and the domain radius;

[0116] Extracting core entity attribute nodes in the core entity attribute node set in sequence, returning to the step of determining the entity attribute node set including the core entity attribute node according to the domain radius, until there are no core entity attribute nodes in the iterative node clustering cluster, and obtaining a target node clustering cluster;

[0117] Removing the target node cluster in the target legal graph network to obtain a legal graph network to be clustered;

[0118] A core entity attribute node is randomly selected in the legal graph network to be clustered according to the minimum number of domain nodes and the domain radius, and the step of determining the entity attribute node set including the core entity attribute node according to the domain radius is returned to the above step until there is no target node clustering cluster in the legal graph network to be clustered, thereby obtaining a legal graph clustering network.

[0119] It can be explained that when a circle is drawn with the location of any entity attribute in the target legal graph network as the center and the domain radius as the radius, the number of entity attributes contained in the circle is greater than or equal to the minimum number of nodes in the domain, and the location of the entity attribute can be used as a core entity attribute node. The core entity attribute node set refers to the set of core entity attribute nodes.

[0120] Furthermore, when a circle is drawn with the location of any entity attribute in the target legal graph network as the center and the domain radius as the radius, the number of entity attributes contained in the circle is less than the minimum number of nodes in the domain, and the location of the entity attribute can be used as an edge entity attribute node. The edge entity attribute node set refers to the set of edge entity attribute nodes.

[0121] It can be understood that the entity attribute node set includes all entity attribute nodes in the directly density-reachable area determined by the core entity attribute node according to the domain radius. The iterative node cluster refers to a cluster composed of all entity attribute nodes in the directly density-reachable area iteratively in the target legal graph network according to the edge entity attribute node set, the core entity attribute node set and the domain radius. The target node cluster refers to a cluster composed of all entity attribute nodes in the density-reachable area of ​​the core entity attribute node.

[0122] In the embodiment of the present invention, the node classification of the node set containing entity attributes is performed according to the minimum number of nodes in the domain and the domain radius to obtain the edge entity attribute node set and the core entity attribute node set, including:

[0123] Sequentially extracting nodes containing entity attributes from the set of nodes containing entity attributes;

[0124] Defining the density direct reach domain of the entity attribute nodes according to the domain radius;

[0125] Determine whether the number of entity attribute nodes in the density-direct-reaching domain is greater than or equal to the minimum number of nodes in the domain;

[0126] If the number of entity attribute nodes in the density-reaching domain is greater than or equal to the minimum number of nodes in the domain, the included entity attribute node is used as a core entity attribute node;

[0127] If the number of entity attribute nodes in the density-reaching domain is not greater than or equal to the minimum number of nodes in the domain, the entity attribute node is used as an edge entity attribute node;

[0128] All edge entity attribute nodes and core entity attribute nodes in the entity attribute node set are aggregated to obtain an edge entity attribute node set and a core entity attribute node set.

[0129] It can be explained that the density direct reach area refers to the area determined according to the area radius and the position of the core entity attribute node.

[0130] In the embodiment of the present invention, the clustering of the legal graph clustering network is performed to obtain the original legal graph classification network set, including:

[0131] sequentially identifying a set of out-cluster relationship paths of each target node cluster in the legal graph cluster network;

[0132] The legal graph clustering network is segmented from each external cluster relationship path in the external cluster relationship path set to obtain an original legal graph classification network set.

[0133] Furthermore, the external cluster relationship path set refers to a set of relationship paths between the target node cluster and other target node clusters.

[0134] S6. Extracting original legal graph classification networks in the original legal graph classification network set in sequence to obtain multiple category entity attribute sets.

[0135] It is understandable that the category entity attribute set refers to the set of legal entities or legal attributes in various legal fields contained in the original legal graph network. For example, when the original legal graph network is substantive law, the category entity attribute set can be: the set of legal entities or legal attributes in civil law, the set of legal entities or legal attributes in criminal law, and the set of legal entities or legal attributes in administrative law.

[0136] S7. Extracting a target category entity attribute set having the largest overlap with the original legal graph classification network from multiple category entity attribute sets.

[0137] It can be explained that since the legal graph clustering network is obtained by clustering analysis using a clustering algorithm, and the legal entities or legal attributes in the same legal field are clustered, each original legal graph classification network usually represents the vast majority of legal entities or legal attributes in a legal field. However, each original legal graph classification network is directly split from the legal graph clustering network according to the clustering algorithm. Therefore, there must be a problem that the legal entities or legal attributes in the original legal graph classification network are inconsistent with the legal entities or legal attributes in the category entity attribute set of the corresponding legal field.

[0138] Furthermore, the target category entity attribute set refers to a category entity attribute set belonging to the same legal field as the original legal graph classification network. The overlap degree refers to the overlap degree between the category entity attribute set and the legal entities or legal attributes in the original legal graph classification network.

[0139] In the embodiment of the present invention, extracting the target category entity attribute set with the largest overlap with the original legal graph classification network from the multiple category entity attribute sets includes:

[0140] Sequentially extracting category entity attribute sets from the multiple category entity attribute sets;

[0141] Extracting an original entity attribute set in the original legal graph classification network;

[0142] Identify the number of entity attributes that are the same in the category entity attribute set and the original entity attribute set and the number of entity attributes in the category entity attribute set;

[0143] Using a pre-constructed coincidence formula, the coincidence of the category entity attribute set is calculated according to the number of the same entity attributes and the number of entity attributes in the category entity attribute set to obtain a coincidence set;

[0144] A target category entity attribute set corresponding to the maximum overlap is extracted from the overlap set.

[0145] In the embodiment of the present invention, the formula for the degree of overlap is as follows:

[0146]

[0147] Among them, c ij represents the overlap between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, x ij represents the number of identical entity attributes between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, l i Represents the number of entity attributes in the i-th category entity attribute set among multiple category entity attribute sets.

[0148] S8. Using the target category entity attribute set, according to the original legal graph network, the entity attributes of the original legal graph classification network are completed to obtain a target legal graph classification network set.

[0149] It can be explained that the original legal graph classification network is segmented by a clustering algorithm. Therefore, there may be legal entities or legal attributes in the original legal graph classification network that do not belong to the target category entity attribute set, and there must be a phenomenon of missing relevant legal entities or legal attributes in the target category entity attribute set. Therefore, it is necessary to complete the entity attributes of the original legal graph classification network.

[0150] In the embodiment of the present invention, the target category entity attribute set is used to complete the entity attribute of the original legal graph classification network according to the original legal graph network to obtain the target legal graph classification network set, including:

[0151] Determine whether there are heterogeneous original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network;

[0152] If there are out-of-cluster original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network, the out-of-cluster original entity attributes are removed to obtain a legal graph classification network to be completed;

[0153] If there is no heterogeneous original entity attribute that does not belong to the target category entity attribute set in the original legal graph classification network, the original legal graph classification network is used as the legal graph classification network to be completed;

[0154] Remove the original entity attribute set in the to-be-completed legal graph classification network from the target category entity attribute set to obtain the to-be-completed entity attribute set;

[0155] In the original legal graph network, the entity attributes to be completed in the entity attribute set to be completed are sequentially connected with the original legal graph classification network through relationship paths to obtain a target legal graph classification network;

[0156] The target legal graph classification networks of all the original legal graph classification networks in the original legal graph classification network set are aggregated to obtain the target legal graph classification network set.

[0157] It can be explained that the heterogeneous original entity attributes refer to legal entities or legal attributes that exist in the original legal graph classification network but do not exist in the target category entity attribute set.

[0158] It can be understood that the original legal graph network records the correlation between each legal entity or legal attribute in the entity attribute set to be completed and each legal entity or legal attribute in the original legal graph classification network. Therefore, the original legal graph network can be used to connect the entity attributes to be completed in the entity attribute set to be completed with the original legal graph classification network in sequence through relationship paths to obtain the target legal graph classification network for the corresponding legal field.

[0159] S9. Perform data sharding storage on the target legal graph classification network set to complete the construction of a legal graph library based on data sharding.

[0160] It should be understood that the data sharding storage is to divide the data in the original legal map network stored in the original server into many data shards (i.e., the target legal map classification network) according to different legal fields, and then store these data shards in different servers respectively to reduce the data access pressure of the original server, thereby improving the performance of the entire database system.

[0161] Compared with the background technology: the current legal knowledge graph creation process has the phenomenon of low creation efficiency and poor flexibility. In the process of data sharding and storing the original legal graph network, the embodiment of the present invention needs to first obtain a target legal graph classification network set that can be stored in shards. Therefore, the original legal graph network needs to be classified. In the classification process, the original legal graph network needs to be clustered to facilitate classification. In order to achieve the clustering purpose, the original legal graph network is clustered by adjusting the target path length of the associated entity attribute pairs. The specific method is to first extract the initial relationship paths in the original legal graph network in sequence, and then identify the associated entity attribute pairs connected by the initial relationship paths. At this time, by identifying the first relationship path number and the second relationship path number of the associated entity attribute pairs, the purpose of calculating the target path length of the initial relationship path according to the first relationship path number and the second relationship path number using the pre-constructed path length formula is achieved. After the target path length is obtained, the target legal graph network can be clustered. The legal graph clustering network is obtained by analysis, and then the legal graph clustering network is clustered to obtain the original legal graph classification network set. Since the original legal graph classification network set is obtained by clustering the target legal graph network, it is necessary to complete the entity attributes of the original legal graph classification network. When completing the entity attributes, the original legal graph classification network can be extracted in sequence in the original legal graph classification network set to obtain multiple category entity attribute sets, and then the target category entity attribute set with the largest overlap with the original legal graph classification network is extracted from the multiple category entity attribute sets. Then, the target category entity attribute set is used. Since the original legal graph network has the category entity attributes that need to be completed in the original legal graph classification network, the original legal graph classification network can be completed according to the original legal graph network to obtain the target legal graph classification network set. At this time, the target legal graph classification network set can be stored in data shards, thereby completing the construction of the legal graph library based on data shards. Therefore, the method, device, electronic device and computer-readable storage medium for constructing a legal graph library based on data sharding proposed in the present invention can solve the problems of low creation efficiency and poor flexibility in the current legal knowledge graph creation process.

[0162] Embodiment 2:

[0163] like Figure 2 The figure shows a functional module diagram of a legal atlas library construction device based on data sharding provided by an embodiment of the present invention.

[0164] The legal graph library construction device 100 based on data sharding of the present invention can be installed in an electronic device. According to the functions to be implemented, the legal graph library construction device 100 based on data sharding can include an initial relationship path extraction module 101, an initial relationship path adjustment module 102, a legal graph clustering network segmentation module 103, an original legal graph classification network completion module 104 and a data sharding storage module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0165] The initial relationship path extraction module 101 is used to obtain an original legal graph network and sequentially extract initial relationship paths in the original legal graph network;

[0166] The initial relationship path adjustment module 102 is used to identify the associated entity attribute pairs connected by the initial relationship path, identify the first relationship path number and the second relationship path number of the associated entity attribute pairs; and calculate the target path length of the initial relationship path using a pre-constructed path length formula according to the first relationship path number and the second relationship path number, wherein the path length formula is as follows:

[0167]

[0168] Wherein, l represents the target path length, k1 represents the first relationship ratio coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship ratio coefficient, and s2 represents the number of second relationship paths; the length of the initial relationship path is adjusted according to the target path length to obtain the target legal graph network;

[0169] The legal graph clustering network segmentation module 103 is used to perform cluster analysis on the target legal graph network to obtain the legal graph clustering network, and to perform cluster segmentation on the legal graph clustering network to obtain the original legal graph classification network set;

[0170] The original legal graph classification network completion module 104 is used to sequentially extract the original legal graph classification networks in the original legal graph classification network set to obtain multiple category entity attribute sets; extract the target category entity attribute set with the largest overlap with the original legal graph classification network from the multiple category entity attribute sets; and use the target category entity attribute set to complete the entity attribute of the original legal graph classification network according to the original legal graph network to obtain the target legal graph classification network set;

[0171] The data sharding storage module 105 is used to perform data sharding storage on the target legal graph classification network set.

[0172] In detail, each module in the legal graph library construction device 100 based on data sharding in the embodiment of the present invention is used in the same manner as described above. Figure 1 The same technical means are used as the method for constructing a legal graph library based on data sharding described in the text, and can produce the same technical effects, so I will not go into details here.

[0173] Embodiment 3:

[0174] like Figure 3 The figure is a schematic diagram of the structure of an electronic device for implementing a method for constructing a legal atlas library based on data sharding provided by an embodiment of the present invention.

[0175] The electronic device 1 may include a processor 10, a memory 11, a bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a program for constructing a legal atlas library based on data sharding.

[0176] The memory 11 includes at least one type of readable storage medium, including flash memory, mobile hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the legal atlas library construction program based on data slicing, but also be used to temporarily store data that has been output or is to be output.

[0177] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as a program for building a legal atlas library based on data sharding, etc.), and calls data stored in the memory 11, so as to execute various functions of the electronic device 1 and process data.

[0178] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0179] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0180] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0181] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0182] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0183] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0184] The data sharding-based legal atlas library construction program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0185] Obtaining an original legal graph network, and sequentially extracting initial relationship paths in the original legal graph network;

[0186] Identify the associated entity attribute pairs connected by the initial relationship path, and identify the first relationship path number and the second relationship path number of the associated entity attribute pairs;

[0187] According to the first relationship path number and the second relationship path number, a target path length of the initial relationship path is calculated using a pre-constructed path length formula, wherein the path length formula is as follows:

[0188]

[0189] Wherein, l represents the target path length, k1 represents the first relationship proportional coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship proportional coefficient, and s2 represents the number of second relationship paths;

[0190] Adjust the length of the initial relationship path according to the target path length to obtain a target legal graph network;

[0191] Perform cluster analysis on the target legal graph network to obtain a legal graph cluster network, perform cluster segmentation on the legal graph cluster network to obtain an original legal graph classification network set;

[0192] Extracting original legal graph classification networks in the original legal graph classification network set in turn to obtain multiple category entity attribute sets;

[0193] Extracting a target category entity attribute set with the largest overlap with the original legal graph classification network from multiple category entity attribute sets;

[0194] Using the target category entity attribute set, the original legal graph classification network is supplemented with entity attributes according to the original legal graph network to obtain a target legal graph classification network set;

[0195] The target legal graph classification network set is stored in data shards to complete the construction of a legal graph library based on data shards.

[0196] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figure 1 to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0197] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0198] The present invention further 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 of an electronic device, the computer program can implement:

[0199] Obtaining an original legal graph network, and sequentially extracting initial relationship paths in the original legal graph network;

[0200] Identify the associated entity attribute pairs connected by the initial relationship path, and identify the first relationship path number and the second relationship path number of the associated entity attribute pairs;

[0201] According to the first relationship path number and the second relationship path number, a target path length of the initial relationship path is calculated using a pre-constructed path length formula, wherein the path length formula is as follows:

[0202]

[0203] Wherein, l represents the target path length, k1 represents the first relationship proportional coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship proportional coefficient, and s2 represents the number of second relationship paths;

[0204] Adjust the length of the initial relationship path according to the target path length to obtain a target legal graph network;

[0205] Perform cluster analysis on the target legal graph network to obtain a legal graph cluster network, perform cluster segmentation on the legal graph cluster network to obtain an original legal graph classification network set;

[0206] Extracting original legal graph classification networks in the original legal graph classification network set in turn to obtain multiple category entity attribute sets;

[0207] Extracting a target category entity attribute set with the largest overlap with the original legal graph classification network from multiple category entity attribute sets;

[0208] Using the target category entity attribute set, the original legal graph classification network is supplemented with entity attributes according to the original legal graph network to obtain a target legal graph classification network set;

[0209] The target legal graph classification network set is stored in data shards to complete the construction of a legal graph library based on data shards.

[0210] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0211] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0212] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, 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 hardware plus software functional modules.

[0213] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0214] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for constructing a legal atlas library based on data sharding, characterized in that: The method comprises: Obtaining an original legal graph network, and sequentially extracting initial relationship paths in the original legal graph network; Identify the associated entity attribute pairs connected by the initial relationship path, and identify the first relationship path number and the second relationship path number of the associated entity attribute pairs; According to the first relationship path number and the second relationship path number, a target path length of the initial relationship path is calculated using a pre-constructed path length formula, wherein the path length formula is as follows: Wherein, l represents the target path length, k1 represents the first relationship proportional coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship proportional coefficient, and s2 represents the number of second relationship paths; Adjust the length of the initial relationship path according to the target path length to obtain a target legal graph network; Perform cluster analysis on the target legal graph network to obtain a legal graph cluster network, perform cluster segmentation on the legal graph cluster network to obtain an original legal graph classification network set; Extracting original legal graph classification networks in the original legal graph classification network set in turn to obtain multiple category entity attribute sets; Extracting a target category entity attribute set with the largest overlap with the original legal graph classification network from multiple category entity attribute sets; Using the target category entity attribute set, the original legal graph classification network is supplemented with entity attributes according to the original legal graph network to obtain a target legal graph classification network set; The target legal graph classification network set is stored in data shards to complete the construction of a legal graph library based on data shards.

2. The method for constructing a legal atlas library based on data sharding according to claim 1, characterized in that: The first relationship path number and the second relationship path number of the identification-related entity attribute pair include: Respectively identifying the number of relationship paths of two associated entity attributes in the associated entity attribute pair to obtain a pair of relationship path numbers; Compare the two relationship path numbers in the relationship path number pair to obtain the first relationship path number and the second relationship path number, wherein the first relationship path number is greater than the second relationship path number.

3. The method for constructing a legal atlas library based on data sharding according to claim 1, characterized in that: The cluster analysis of the target legal graph network is performed to obtain a legal graph cluster network, including: Randomly selecting a calibrated entity attribute node in the target legal graph network; According to a preset batch extraction method, the distances between other entity attribute nodes and the calibrated entity attribute node are sequentially extracted in the target legal graph network to obtain an entity attribute distance sequence; Draw an entity attribute distance line graph according to the entity attribute distance sequence; Identify the inflection point entity attribute distance in the entity attribute distance line graph, and use the inflection point entity attribute distance as the domain radius; According to the preset minimum number of domain nodes and the domain radius, the target legal graph network is clustered using a pre-constructed density clustering algorithm to obtain a legal graph clustering network.

4. The method for constructing a legal atlas library based on data sharding according to claim 3 is characterized in that: The method of clustering the target legal graph network using a pre-built density clustering algorithm according to the preset minimum number of nodes in the field and the field radius to obtain a legal graph clustering network includes: A core entity attribute node is randomly selected in the target legal graph network according to the minimum number of domain nodes and the domain radius; Determine the entity attribute node set including the core entity attribute node according to the domain radius; Classify the node set containing entity attributes according to the minimum number of nodes in the field and the field radius to obtain an edge entity attribute node set and a core entity attribute node set; Delineating iterative node clustering clusters in the target legal graph network according to the edge entity attribute node set, the core entity attribute node set and the domain radius; Extracting core entity attribute nodes in the core entity attribute node set in sequence, returning to the step of determining the entity attribute node set including the core entity attribute node according to the domain radius, until there are no core entity attribute nodes in the iterative node clustering cluster, and obtaining a target node clustering cluster; Removing the target node cluster in the target legal graph network to obtain a legal graph network to be clustered; A core entity attribute node is randomly selected in the legal graph network to be clustered according to the minimum number of domain nodes and the domain radius, and the step of determining the entity attribute node set including the core entity attribute node according to the domain radius is returned to the above step until there is no target node clustering cluster in the legal graph network to be clustered, thereby obtaining a legal graph clustering network.

5. The method for constructing a legal atlas library based on data sharding according to claim 4, characterized in that: The node classification of the node set containing entity attributes is performed according to the minimum number of nodes in the field and the field radius to obtain the edge entity attribute node set and the core entity attribute node set, including: Sequentially extracting nodes containing entity attributes from the set of nodes containing entity attributes; Defining the density direct reach domain of the entity attribute nodes according to the domain radius; Determine whether the number of entity attribute nodes in the density direct access field is greater than or equal to the minimum number of nodes in the field; If the number of entity attribute nodes in the density-reaching domain is greater than or equal to the minimum number of nodes in the domain, the included entity attribute node is used as a core entity attribute node; If the number of entity attribute nodes in the density-reaching domain is not greater than or equal to the minimum number of nodes in the domain, the entity attribute node is used as an edge entity attribute node; All edge entity attribute nodes and core entity attribute nodes in the entity attribute node set are aggregated to obtain an edge entity attribute node set and a core entity attribute node set.

6. The method for constructing a legal atlas library based on data sharding according to claim 4, characterized in that: The clustering of the legal graph clustering network is performed to obtain an original legal graph classification network set, including: sequentially identifying a set of out-cluster relationship paths of each target node cluster in the legal graph cluster network; The legal graph clustering network is segmented from each external cluster relationship path in the external cluster relationship path set to obtain an original legal graph classification network set.

7. The method for constructing a legal atlas library based on data sharding according to claim 1, characterized in that: The step of extracting a target category entity attribute set with the largest overlap with the original legal graph classification network from multiple category entity attribute sets includes: Sequentially extracting category entity attribute sets from the multiple category entity attribute sets; Extracting an original entity attribute set in the original legal graph classification network; Identify the number of entity attributes that are the same in the category entity attribute set and the original entity attribute set and the number of entity attributes in the category entity attribute set; Using a pre-constructed coincidence formula, the coincidence of the category entity attribute set is calculated according to the number of the same entity attributes and the number of entity attributes in the category entity attribute set to obtain a coincidence set; A target category entity attribute set corresponding to the maximum overlap is extracted from the overlap set.

8. The method for constructing a legal atlas library based on data sharding according to claim 7, characterized in that: The coincidence formula is as follows: Among them, c ij represents the overlap between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, x ij represents the number of identical entity attributes between the i-th category entity attribute set in the plurality of category entity attribute sets and the j-th original legal graph classification network in the original legal graph classification network set, l i Represents the number of entity attributes in the i-th category entity attribute set among multiple category entity attribute sets.

9. The method for constructing a legal atlas library based on data sharding according to claim 7, characterized in that: The method of using the target category entity attribute set to complete the entity attributes of the original legal graph classification network according to the original legal graph network to obtain a target legal graph classification network set includes: Determine whether there are heterogeneous original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network; If there are out-of-cluster original entity attributes that do not belong to the target category entity attribute set in the original legal graph classification network, the out-of-cluster original entity attributes are removed to obtain a legal graph classification network to be completed; If there is no heterogeneous original entity attribute that does not belong to the target category entity attribute set in the original legal graph classification network, the original legal graph classification network is used as the legal graph classification network to be completed; The original entity attribute set in the to-be-completed legal graph classification network is removed from the target category entity attribute set to obtain the to-be-completed entity attribute set; In the original legal graph network, the entity attributes to be completed in the entity attribute set to be completed are sequentially connected with the original legal graph classification network through relationship paths to obtain a target legal graph classification network; The target legal graph classification networks of all the original legal graph classification networks in the original legal graph classification network set are aggregated to obtain the target legal graph classification network set.

10. A device for constructing a legal atlas library based on data sharding, characterized in that: The device comprises: An initial relationship path extraction module is used to obtain an original legal graph network and sequentially extract initial relationship paths in the original legal graph network; The initial relationship path adjustment module is used to identify the associated entity attribute pairs connected by the initial relationship path, identify the first relationship path number and the second relationship path number of the associated entity attribute pairs; and calculate the target path length of the initial relationship path using a pre-built path length formula according to the first relationship path number and the second relationship path number, wherein the path length formula is as follows: Wherein, l represents the target path length, k1 represents the first relationship ratio coefficient, s1 represents the number of first relationship paths, k2 represents the second relationship ratio coefficient, and s2 represents the number of second relationship paths; the length of the initial relationship path is adjusted according to the target path length to obtain the target legal graph network; The legal graph clustering network segmentation module is used to perform cluster analysis on the target legal graph network to obtain the legal graph clustering network, perform cluster segmentation on the legal graph clustering network, and obtain the original legal graph classification network set; The original legal graph classification network completion module is used to sequentially extract the original legal graph classification networks in the original legal graph classification network set to obtain multiple category entity attribute sets; extract the target category entity attribute set with the largest overlap with the original legal graph classification network from the multiple category entity attribute sets; and use the target category entity attribute set to complete the entity attributes of the original legal graph classification network according to the original legal graph network to obtain the target legal graph classification network set; A data sharding storage module is used to perform data sharding storage on the target legal graph classification network set.