Judicial evidence atlas construction and contradiction detection method based on graph neural network
By constructing a judicial evidence graph through standardized preprocessing and graph neural networks, the problems of multimodal evidence integration and contradiction detection are solved, and efficient and accurate evidence chain construction and contradiction identification are achieved.
Patent Information
- Application Number
- CN202511871476.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2045-12-12
AI Technical Summary
Existing technologies cannot effectively integrate and analyze multimodal judicial evidence, resulting in inefficient evidence chain construction, insufficient standardization, and a high rate of omission of contradictory points, making it difficult to meet the needs of efficient and accurate review of judicial cases.
The standardized preprocessing module transforms multimodal evidence into a unified format, and a judicial evidence graph is constructed using a graph neural network to automatically extract evidence entities and their relationships. In addition, explicit and implicit contradiction detection mechanisms are designed to optimize the graph structure.
It achieves unified integration and automated analysis of multimodal evidence, improves the efficiency of evidence map construction and the accuracy of contradiction detection, reduces the proportion of manual intervention, and increases the identification rate of implicit contradictions.
Smart Images

Figure CN121301487A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information processing, in particular to a judicial evidence graph construction and contradiction detection method based on a graph neural network. BACKGROUND
[0002] The number of judicial cases is increasing year by year, and the forms of evidence are multi-modal characteristics such as text, image OCR (optical character recognition), audio transcription text, etc., but the current manual review mode has obvious shortcomings: the average time-consuming of single-case evidence review is long, and the efficiency is low; evidence chain construction depends on manual subjective operation, and is not standardized; the omission rate of contradiction points is high, which is difficult to meet the demand of efficient and accurate review of judicial cases.
[0003] In recent years, natural language processing (NLP) large models (such as BERT, GPT series) have gradually landed in the field of judicial text entity extraction and semantic understanding, and can realize the structured processing of judicial text; at the same time, graph neural network (GNN) has unique advantages in knowledge graph optimization and correlation analysis, and can efficiently mine the potential correlation between data. The development of these two types of technologies provides a core technical foundation for the intelligent processing of judicial evidence (such as multi-modal evidence integration and evidence correlation analysis).
[0004] However, the current processing scheme does not support the unified integration and analysis of multi-modal evidence such as image OCR, audio transcription text, etc.; and due to the heterogeneous formats of multi-modal evidence and the lack of standardized preprocessing architecture in existing technologies, the key information in non-text evidence cannot be included in the overall evidence chain analysis, resulting in missing evidence dimensions. SUMMARY
[0005] The purpose of the present application is to overcome the shortcomings of the prior art and provide a judicial evidence graph construction and contradiction detection method based on a graph neural network. First, the standardized preprocessing module converts multi-modal evidence such as text, image OCR, audio transcription text, etc. into a unified format and filters noise, realizes the integration of multi-modal evidence, and can effectively identify explicit and implicit contradictions.
[0006] The purpose of the present application is achieved by the following technical scheme: a judicial evidence graph construction and contradiction detection method based on a graph neural network, comprising the following steps: Step S1. Import multi-modal evidence through a judicial personnel terminal, and add labels and then transmit to a background server; The step S1 comprises: S101. Import multi-modal evidence through a judicial personnel terminal, wherein the multi-modal evidence contains multiple different types of evidence, and according to the different types of evidence, it is divided into text evidence, image evidence and audio evidence; S102. For each piece of evidence imported through the judicial personnel terminal, the judicial personnel terminal automatically generates a uniquely identified label in the format "evidence ID + case number + evidence type"; S103. The judicial personnel terminal uploads the evidence with the added label to the background server.
[0007] Step S2. Store and standardize the multi-modal evidence uploaded by the judicial personnel terminal through the background server to obtain a standardized evidence text set; The step S2 includes: S201. The background server receives the evidence uploaded by the judicial personnel terminal, stores the evidence using a distributed file system, sets three data copies for each piece of evidence to ensure data security and recoverability, and avoids evidence loss due to single point failure; S202. The background server performs standardization preprocessing on the stored evidence: (1) Obtain the corresponding text content according to each piece of stored evidence: For each piece of image evidence, correct the image tilt based on the Hough transform algorithm, remove image noise using the Gaussian filter algorithm, and convert the text in the image to a piece of text content using the Tesseract OCR engine; For each piece of audio evidence, set a silence segment filtering threshold, automatically remove audio evidence with a single silence duration exceeding the filtering threshold, and convert the audio evidence to a piece of text content using the Whisper-large speech transcription model; For each piece of text evidence, directly use the text information it contains as a piece of text content; (2) Clean and optimize the text content: For each piece of text content, perform the following operations to obtain the standardized text content: Remove redundant content using a special stopword list in the judicial field, which includes meaningless function words and non-evidence expressions; the meaningless function words include "of", "in", "about", and the non-evidence expressions include "the court believes" and "as mentioned above"; Correct errors in the text content; (3) Generate a standardized evidence text set: According to the standardized text content obtained from each piece of text content, construct data in the standardized evidence text set, each piece of data including evidence ID, standardized text content, and confidence score; Wherein, the cleaning confidence score is composed of three parts: confidence score = basic conversion score + cleaning optimization score - abnormal item deduction score; (3.1) Set basic conversion scores for image evidence, audio evidence and text evidence respectively, and obtain the corresponding basic conversion scores according to the type of evidence; (3.2) The cleaning and optimization score includes the stop word removal score and the error correction score, which are achieved through manual inspection: When calculating the stop word removal score, if no key information is mistakenly deleted and no stop words are missed, then the total word removal score is obtained. If no key information is mistakenly deleted, but stop words are missed, the set score will be deducted for each missed stop word. If key information is mistakenly deleted, the word removal score will be 0. When calculating error correction scores, based on the upper limit of error correction scores, for each typo correction error and semantic error correction, the corresponding score is deducted, with a minimum of 0 points; (3.3) When calculating abnormal deduction items, deduction items are set for missing core information, logical contradictions and non-standard format. If core information is missing, logical contradictions and non-standard format occur, the corresponding points are deducted. An upper limit is set for abnormal deduction items. When the deduction points exceed the set upper limit, the abnormal deduction items take the set upper limit. Step S3. Extract evidence entities from each piece of data in the standardized evidence text set to obtain an entity list; Step S3 includes: S301. For each piece of data in the standardized evidence text set, perform the following operation: The entity recognition head of the judicial BERT model (such as iFlytek's Spark Legal Big Model V1.0 and V1.5 versions) is used to identify the main entities in the text and mark them as "PER" type; the main entities include parties and witnesses; Identify evidence entities in the text and mark them as type "EVI". The evidence entities include physical evidence and documentary evidence. S302. Generate an entity list: In the entity list, the record format for each piece of information is: {Evidence ID: ID number, Entity: [Entity name, Entity type, Confidence level]}.
[0008] Step S4. Perform relationship prediction on the entities in the entity list to generate an entity-relationship pair list; Step S4 includes: S401. Using the relation extraction head of the judicial BERT model, predict the relationships between entity pairs in the entity list and output the confidence score for each relationship; S402. Set a confidence threshold for relationships, and remove relationships with confidence scores below the threshold to obtain an entity-relationship pair list. The record format for each entry in the entity-relationship pair list is as follows: {Evidence ID: ID number, Entity 1: [Entity name, Entity type], Relationship: Relationship type, Entity 2: [Entity name, Entity type], Confidence: Relationship confidence}.
[0009] Step S5. Construct an initial judicial evidence map based on the entity-relationship pair list; Step S5 includes: Node creation: Entities in the entity-relationship pair list are used as graph nodes. Each node contains 5 attributes: entity ID, entity name, entity type, association evidence ID, and entity confidence. Among them, the entity ID is the unique identifier of the entity, and the format is defined by "ENT + auto-incrementing sequence number". Edge creation: The relationships in the entity-relationship pair list are used as graph edges. Each edge contains 4 attributes: edge ID, relationship type, relationship confidence, and creation time. Among them, the edge ID is a unique identifier for the edge, and the format is defined by "EDGE + auto-incrementing sequence number". Based on the node creation and edge creation results, an initial judicial evidence graph is generated in the Neo4j database. The graph is an undirected graph structure.
[0010] Step S6. Based on the graph neural network and the judicial evidence ontology library, optimize the initial judicial evidence graph to obtain the optimized judicial evidence graph; Step S6 includes: using the GraphSAGE graph neural network model, which is divided into 3 layers: input layer, hidden layer, and output layer; All nodes and their attributes in the initial judicial evidence graph are compiled into node feature vectors using One-Hot encoding, and all edges and their attributes in the initial judicial evidence graph are compiled into edge feature vectors using One-Hot encoding. Input layer: Loads the node feature vectors and edge feature vectors of the initial judicial evidence graph; Hidden layer: The mean aggregation function is used to aggregate the features of the neighboring nodes of each node, and the aggregation weights are adjusted in combination with the edge features. The ReLU activation function is used to enhance the non-linear fitting ability of the model and avoid gradient vanishing. Output layer: Outputs node embedding vectors, containing the association information between nodes and their neighbors. It also optimizes the initial judicial evidence graph structure by removing edges with a relationship confidence of <0.5 and filling in the missing edges in the initial judicial evidence graph. Output: Generates an optimized judicial evidence graph, including node embedding vectors.
[0011] Step S7. Based on the optimized judicial evidence map, detect explicit and implicit contradictions.
[0012] In step S7, explicit contradiction refers to a conflict in the attribute descriptions of the same entity in different pieces of evidence. The detection process includes: Based on the node relationships in the optimized judicial evidence graph, the text describing the same entity in different pieces of evidence is filtered using Cypher query statements; Input different textual representations of the same entity into the judicial BERT model; The semantic similarity of semantic vectors corresponding to any two different expressions of the same entity is calculated using the cosine similarity formula. If the semantic similarity is less than the set threshold for judging explicit contradictions, it is judged as a potential explicit contradiction.
[0013] In step S7, implicit contradictions refer to logical conflicts between related entities, and the detection process includes: Based on the node relationships in the optimized judicial evidence graph, the neighbor node query function of the GraphSAGE model is used to filter entity pairs that match the implicit contradiction scenario category, forming a mapping table of associated entity pairs - associated evidence - case domain; The node embedding vectors of related entity pairs are retrieved from the optimized judicial evidence graph, and the vector similarity is calculated using the cosine similarity formula. If the semantic similarity is less than the set threshold for judging implicit contradictions, it is judged as a potential implicit contradiction.
[0014] The beneficial effects of this invention are as follows: First, this invention transforms multimodal evidence such as text, image OCR, and audio-transcribed text into a unified format and filters noise through a standardized preprocessing module, thus solving the deficiency of existing technologies in integrating multimodal evidence. Second, it utilizes a large-scale model finely tuned in the judicial field to automatically extract entities and relationships in the evidence. Combined with GraphSAGE graph neural network and judicial evidence ontology library to optimize the graph structure, the automation rate of graph construction is effectively improved, overcoming the problem of high manual intervention in existing technologies. At the same time, a dual-layer detection mechanism for explicit contradictions and implicit contradictions is designed, effectively improving the recognition rate of implicit contradictions. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the following description.
[0017] like Figure 1 As shown, it includes the following steps: Step S1. Import multimodal evidence through the judicial personnel's terminal, add tags, and then transmit it to the backend server; 1. Implementing Entity Terminals for judicial personnel (such as computers used by the procuratorate for handling cases, and mobile case-handling terminals). 2. Technical details and data flow Terminal interface functions: Supports drag-and-drop uploading of evidence in various formats, including text (.doc, .txt format, such as victim statements, court records), images (.jpg, .png format, such as crime scene photos, physical evidence photos), and audio (.wav format, such as suspect confession recordings, witness testimony recordings). Data Tag Generation: When evidence is uploaded, the terminal automatically generates a unique identifier tag for each piece of evidence, in the format of "Evidence ID + Case Number + Evidence Type", such as "EV2025001+CAS20250123+Image OCR", where "EV2025001" is the evidence ID, "CAS20250123" is the case number, and "Image OCR" is the evidence type; Data transmission and storage: The terminal transmits the original evidence data with a unique identifier to the backend server. The server uses a distributed file system (HDFS) to store the data and sets up three data copies to ensure data security and recoverability, and to avoid evidence loss due to a single point of failure.
[0018] 3. Application Scenario Example (Criminal Case: Theft) Judicial officers uploaded three types of core evidence for a theft case through their case-handling terminals: ① a written statement from the victim (.doc format, recording the stolen items, time, and location); ② a screenshot from surveillance footage of the crime scene (.jpg format, showing the suspect's physical characteristics); and ③ an audio recording of the suspect's first confession (.wav format, 15 minutes long, containing the suspect's statement about the time of the incident).
[0019] Step S2. The multimodal evidence uploaded by judicial personnel's terminals is stored and standardized preprocessed through the backend server to obtain a standardized evidence text set; 1. Implementing Entity Backend server (equipped with GPU acceleration capabilities, supporting large-scale parallel data processing) 2. Technical details and data flow Standardized formatting: Image-based evidence: Perform image preprocessing operations—correct image tilt based on Hough transform algorithm (solve the text offset problem caused by shooting angle), use Gaussian filtering algorithm to remove image noise (such as shadows and light spots in the photo), and ensure OCR recognition accuracy ≥98%; then call Tesseract OCR engine to convert the text in the image into text. Audio evidence: The audio is converted into text through the Whisper-large speech transcription model, and the silent segment filtering threshold is set (any single silent segment exceeding 3 seconds will be automatically removed) to avoid meaningless blank content in the transcribed text; Text cleaning and optimization: The special stop word list in the judicial field (including meaningless function words such as "of", "in", "about", etc., and non-evidentiary expressions such as "the court holds that", "in summary", etc.) is used to remove redundant content, and at the same time, spelling mistakes and semantic errors in the text content are corrected; for example, standardize "2025.1.1" to "January 1, 2025", and correct "fruit to" to "fruit knife"; another example is the correction of "owe qi" → "owe money" (the handwritten "money" and "qi" are confused in a connected stroke), "proof positive" → "certificate", "transfer inflation" → "transfer" etc.; Output result: Generate a "standardized evidence text set", and each text contains three core fields: evidence ID, standardized text content, and confidence level. Among them, the cleaning confidence level consists of three parts: Confidence level = basic conversion score + cleaning optimization score - abnormal item deduction; (3.1) The basic conversion scores for image evidence, audio evidence, and text evidence are set separately, and the corresponding basic conversion scores are obtained according to the evidence type; for example, the basic conversion score for text evidence is 0.5, the basic conversion score for image evidence is 0.4, and the basic conversion score for audio evidence is 0.3; (3.2) The cleaning optimization score includes the stop word removal score and the error correction score, which are achieved through manual detection: When calculating the stop word removal score, if there is no deletion of key information (the key information of the evidence is not deleted, such as the parties, amount, date), and there is no omission of stop words (all the stop words to be removed are removed), then the score for all word deletions is obtained (for example, 0.2 points); If there is no deletion of key information, but there are omissions of stop words, for example, omission of meaningless function words, omission of non-evidentiary expressions (such as "the court holds that"), then based on the word deletion score of 2 points, a set score (such as 0.1 points or 0.05 points) is deducted for each omitted stop word; If there is a deletion of key information (such as deleting "12,000 yuan" in "borrowing 12,000 yuan" by mistake), then the word deletion score is 0 points; When calculating the error correction score, based on the upper limit of the error correction score (0.3), for each spelling mistake correction and semantic error correction, the corresponding score is deducted, with a minimum of 0 points; (3.3) When calculating abnormal deduction items, manual inspection is required; deduction items are set for missing core information, logical contradictions and non-standard format. If core information is missing, logical contradictions and non-standard format occur, the corresponding points are deducted; an upper limit (0.2) is set for abnormal deduction items. When the deduction points exceed the set upper limit, the abnormal deduction items take the set upper limit. For example, core information is missing: Evidence ID, key elements (amount, date, parties involved, legal provisions, etc.) are not fully preserved (0.1 points will be deducted for each missing item); Logical contradiction: The standardized text contains semantic conflicts (e.g., "borrowed in 2023 → repaid in 2022", deduct 0.1 points for each missing item). Non-standard format: Not standardized according to the requirements of judicial text (e.g., the date is still "2023.8.5" instead of "August 5, 2023"). 0.05 points will be deducted for each non-standard item.
[0020] Text with a confidence level of ≥0.95 is considered qualified and can proceed to the next processing stage; text with a confidence level of <0.95 will be returned to the terminal, prompting the case handlers to manually verify it.
[0021] 3. Application Scenario Example (Criminal Case: Theft) The server processes the OCR text of the crime scene photos and converts it into standardized data. For example, "2025.1.2" is corrected to "January 2, 2025".
[0022] Step S3. Extract evidence entities from each piece of data in the standardized evidence text set to obtain an entity list; 1. Implementing Entity Backend server 2. Technical details and data flow Input data: The "Standardized Evidence Text Set" output in step 2 and the "Judicial BERT Model" generated in step 3; Entity extraction logic: Subject entity extraction: Using the entity recognition head of the judicial BERT model (such as iFlytek's Spark Legal Big Model V1.0 and V1.5), the subject entities such as parties and witnesses in the text are identified and marked as "PER" type. For example, "Zhang San (PER)" is extracted from "Zhang San admits to entering XX community on January 2, 2025". At the same time, the entity confidence score is output (based on the model's predicted probability calculation). Evidence entity extraction: Identify physical evidence, documentary evidence, and other evidence entities in the text and mark them as "EVI" type. For example, extract "fruit knife (EVI)" from "a fruit knife was extracted from the scene with a blade length of 15 cm". Attribute entity extraction: Identify attribute entities such as time and location in the text and mark them as "TIME" and "LOC" types respectively. For example, extract "XX Community (LOC)" from "The crime scene is Building 3 of XX Community" and extract "8 PM on January 2, 2025 (TIME)" from "The crime scene is 8 PM on January 2, 2025". Output: Generate an "Entity List", with each record in the format "{Evidence ID: EV2025001, Entity: [Entity Name, Entity Type, Confidence]}", for example "{Evidence ID: EV2025001, Entity: [Zhang San, PER, 0.98]}".
[0023] 3. Application Scenario Example (Criminal Case: Theft) The server extracts entities from the standardized text of the victim's statement in the theft case, ultimately obtaining entities such as "Zhang San (PER, confidence 0.98)," "Fruit knife (EVI, confidence 0.96)," "8 PM on January 2, 2025 (TIME, confidence 0.99)," and "Building 3, XX Community (LOC, confidence 0.97)," forming an entity list corresponding to the statement.
[0024] Step S4. Perform relationship prediction on the entities in the entity list to generate an entity-relationship pair list; 1. Implementing Entity Backend server 2. Technical details and data flow Input data: The entity list output in step S3, and the preset judicial evidence relationship rule base (containing common entity relationship rules in the judicial field, such as "Party-Possession-Physical Evidence", "Physical Evidence-Association-Location of Crime", and "Behavior-Occurrence-Time"). Relationship extraction logic: Relationship confidence calculation: Using the relationship extraction head of the judicial BERT model, the relationship prediction is performed on the entity pairs in the entity list, and the confidence of each possible relationship is output. For example, the confidence of the "holding" relationship of "Zhang San (PER) - Fruit Knife (EVI)" is 0.85, and the confidence of the "association" relationship is 0.12. Relationship filtering: Set a confidence threshold of 0.7, retain relationships with a confidence level ≥ 0.7, and remove irrelevant relationships with a confidence level < 0.7. For example, the "association" relationship "Zhang San (PER) - XX Hospital (LOC)" has a confidence level of 0.5 and is therefore removed. Output: Generate a list of entity-relation pairs. Each record is formatted as "{Evidence ID: EV2025001, Entity 1: [Entity Name, Entity Type], Relation: Relation Type, Entity 2: [Entity Name, Entity Type], Confidence: Relation Confidence}", for example, "{Evidence ID: EV2025001, Entity 1: [Zhang San, PER], Relation: Holder, Entity 2: [Fruit Knife, EVI], Confidence: 0.85}".
[0025] 3. Application Scenario Example (Criminal Case: Theft) The server extracts relationships from the entity list of theft cases, retaining relationships such as "Zhang San (PER) - Possession - Fruit Knife (EVI)" (confidence 0.85), "Fruit Knife (EVI) - Associated - Building 3, XX Community (LOC)" (confidence 0.82), and "Theft (ACT) - Occurred - January 2, 2025, 8 PM (TIME)" (confidence 0.91), while removing irrelevant relationships such as "Zhang San (PER) - Associated - XX Hospital (LOC)" (confidence 0.5), thus forming a list of entity-relationship pairs.
[0026] Step S5. Construct an initial judicial evidence map based on the entity-relationship pair list; 1. Implementing Entity Backend server 2. Technical details and data flow Input data: The entity-relationship pair list output from step 4, and Neo4j graph database (a database designed specifically for graph structure data, supporting efficient node and edge queries); Graph construction logic: Node creation: Entities in the entity-relationship pair list are used as graph nodes. Each node contains 5 attributes: Entity ID (unique identifier, in the format "ENT + auto-incrementing sequence number", such as "ENT2025001"), Entity name (such as "Zhang San"), Entity type (such as "PER"), Associated evidence ID (corresponding to the ID of the original evidence, such as "EV2025001"), and Entity confidence (obtained from the entity list in step 4). Edge creation: The relationships in the entity-relationship pair list are used as graph edges. Each edge contains 4 attributes: edge ID (unique identifier, in the format of "EDGE + auto-incrementing sequence number", such as "EDGE2025001"), relationship type (such as "holding"), relationship confidence (obtained from the entity-relationship pair list in step 5), and creation time (server system time, in the format of "YYYY-MM-DD HH:MM:SS"). Output: Generates an initial judicial evidence graph in the Neo4j database. The graph is an undirected graph structure, such as "Zhang San (node ENT2025001) - Holding (edge EDGE2025001) - Fruit knife (node ENT2025002)". It supports querying the relationship between nodes and edges by conditions such as node ID and entity name.
[0027] 3. Application Scenario Example (Criminal Case: Theft) The server constructs an initial evidence graph of the theft case in the Neo4j database, including nodes such as "Zhang San (ENT2025001, PER)", "Fruit Knife (ENT2025002, EVI)", "Building 3, XX Community (ENT2025003, LOC)", "8 PM on January 2, 2025 (ENT2025004, TIME)", and "Theft (ENT2025005, ACT)", as well as edges such as "Possession (EDGE2025001, Confidence 0.85)", "Association (EDGE2025002, Confidence 0.82)", and "Occurred at (EDGE2025003, Confidence 0.91)", forming a preliminary evidence association network.
[0028] Step S6. Based on the graph neural network and the judicial evidence ontology library, optimize the initial judicial evidence graph to obtain the optimized judicial evidence graph; 1. Implementing Entity Backend server 2. Technical details and data flow Input data: The initial judicial evidence map output from step 5, and the preset judicial evidence ontology (containing the core logical rules of judicial evidence, such as "the crime must be associated with physical evidence", "the temporal entity must be associated with the behavioral entity", and "the statements of the same party must be consistent"). Graph optimization logic: Model architecture: The model adopts the GraphSAGE (Graph Sample and Aggregate) graph neural network model, which consists of three layers: input layer, hidden layer, and output layer. Input layer: Loads the node feature vectors and edge feature vectors of the initial graph (node feature vectors are generated by fusing entity attribute One-Hot encoding and semantic embedding, and edge feature vectors are generated by One-Hot encoding of relation types). Hidden layer: The mean aggregator is used to aggregate the features of each node's neighboring nodes, and the aggregation weights are adjusted in combination with edge features. The ReLU activation function is used to enhance the model's non-linear fitting ability and avoid gradient vanishing. Output layer: Outputs node embedding vectors (containing association information between nodes and their neighbors), and optimizes the graph structure by removing edges with a relationship confidence of <0.5 (e.g., the edge "Zhang San - associated - XX Hospital" with a relationship confidence of 0.5, which is removed), and filling in missing edges (e.g., the edge "Zhang San - committed - theft" is missing in the initial graph, which is automatically filled in according to the rule "the party concerned needs to be associated with the crime" with a relationship confidence of 0.8). Output: Generates an optimized judicial evidence graph, including the embedding vectors of the graph nodes, making the edge structure more complete (no redundant edges, no key missing edges), supporting accurate calculation of subsequent contradiction detection.
[0029] 3. Application Scenario Example (Criminal Case: Theft) The server optimizes the initial graph of the theft case: it removes the edge "Zhang San (ENT2025001) - associated - XX Hospital (LOC)" (relationship confidence 0.5); according to the rule "the party involved must be associated with the crime", it completes the edge "Zhang San (ENT2025001) - committed - theft (ENT2025005)" (relationship confidence 0.8); at the same time, it updates the embedding vectors of all nodes. For example, the embedding vector of "fruit knife (ENT2025002)" incorporates neighbor information such as "associated with Building 3 of XX Community" and "held by Zhang San", providing more accurate feature support for subsequent conflict detection.
[0030] Step S7. Based on the optimized judicial evidence map, detect explicit and implicit contradictions.
[0031] S701. Detection of explicit contradictions: I. Implementing Entity The backend server (equipped with GPU acceleration capabilities, supports parallel computation of semantic similarity, ensures efficiency and accuracy when multiple cases are processed concurrently, and controls the time for detecting explicit contradictions in a single case to within 3-5 minutes) II. Technical Details and Data Flow (a) Input data Basic input data: The optimized judicial evidence graph output in step S6 (including core information such as node entity attributes, associated evidence IDs, and evidence type tags, supporting cross-evidence association queries for entities). The Judicial BERT model (pre-trained on 100,000+ judicial case files, with semantic optimization for judicial scenarios such as "ambiguity in time expression" and "consistency in location aliases," achieving a semantic encoding accuracy of ≥96%). (II) Core Algorithm Logic 1. First stage: Extraction of cross-evidence representations for the same entity (basic data preparation) Technical means: Based on the node association relationship of the optimized judicial evidence map, the Cypher query statement (Neo4j database dedicated query language) is used to filter the description text of the same entity in different evidence to form a "entity-multiple descriptions-related evidence information" mapping table.
[0032] 2. Second order: Semantic similarity calculation Technical approach: A combination of "judicial BERT model + cosine similarity" is adopted, and the specific process is as follows: Input different textual representations of the same entity into the BERT model, and output the semantic vector from the last layer of the model; The semantic similarity (s1) of pairwise statements is calculated using the cosine similarity formula. The value of s1 ranges from 0 to 1. (s1 < 0.3) is marked as a potential explicit contradiction, and (s1 ≥ 0.3) is directly judged as no contradiction. Output: List of potential explicit contradictions (including statement pairs, semantic similarity, and related evidence information) S702. Latent contradiction detection: I. Implementing Entity The backend server (equipped with GPU acceleration capabilities, supports parallel computation of node feature similarity in the GraphSAGE model, and controls the time for detecting implicit contradictions in a single case to within 5-8 minutes, ensuring processing efficiency in multimodal evidence scenarios) II. Technical Details and Data Flow (a) Input data Basic input data: Optimized judicial evidence graph (including node embedding vectors, entity relationships, evidence type labels, and supports feature query of related nodes); The Judicial BERT model (pre-trained on 100,000+ judicial case files, with semantic optimization for judicial scenarios such as "ambiguity in time expression" and "consistency in location aliases," achieving a semantic encoding accuracy of ≥96%). (II) Core Algorithm Logic 1. First stage: Extraction of related entity pairs (identifying objects for implicit contradiction detection) Technical means: Based on the node association relationship of the optimized judicial evidence graph, the neighbor node query function of the GraphSAGE model is used to filter entity pairs that meet the implicit contradiction scenario category, forming a mapping table of associated entity pairs - associated evidence - case domain.
[0033] 2. Second order: Node feature similarity calculation Technical objective: To determine whether there are potential implicit contradictions by quantifying the feature similarity of related entity pairs. The specific steps are as follows: Feature vector extraction: Extract the node embedding vectors of related entity pairs from the optimized judicial evidence graph (this vector has integrated entity attributes and neighbor association information, such as the "fruit knife" vector containing features such as "sharp instrument" and "single-edged", and the "blunt injury" vector containing features such as "no sharp instrument scratches" and "impact marks"). Similarity calculation: Based on the node embedding vectors of the associated entity pairs, the vector similarity (s2) is calculated using the cosine similarity formula. The value of s2 ranges from 0 to 1. (s2 < 0.6) is marked as a potential latent contradiction, and (s2 ≥ 0.6) is directly determined as having no latent contradiction. In the embodiments of this application, s2 can be modified in conjunction with the evidence credibility score. If the credibility of all related evidence is ≥0.85, s2 is retained at its original value; if there is evidence with credibility <0.7 (such as low credibility witness testimony), s2 is increased by 0.05 (to avoid misjudgment due to low credibility of evidence). Output: List of potential hidden contradictions (including entity pairs, revised s2, and related evidence information); In the embodiments of the application, after identifying explicit and implicit contradictions, the contradiction level can be determined for each contradiction point (explicit or implicit contradiction): Based on the degree of impact of the conflict on the case's characterization, the conflict levels are divided into high (conflicts that directly affect the case's characterization, such as in drunk driving cases where blood alcohol concentration directly affects whether a crime has been committed, and the conflict level for blood alcohol concentration is high), medium (conflicts related to sentencing or handling of violations, such as whether a person surrendered themselves or caused damage after drunk driving, and the conflict level for blood alcohol concentration is medium), and low (conflicts related to the identity of the parties involved in local work requirements, such as the conflict level for the identity of the driver after drunk driving is low). In the embodiments of this application, after identifying the contradiction, the confidence levels of the evidence, entities, and entity relationships involved in the contradiction can also be displayed to the investigators for their reliability reference.
[0034] The foregoing description illustrates and describes a preferred embodiment of the present invention. However, as previously stated, it should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept described herein through the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.
Claims
1. A method for constructing a judicial evidence graph and detecting contradictions based on graph neural networks, characterized in that: It includes the following steps: Step S1. Import multimodal evidence through the judicial personnel terminal, add tags, and then transmit it to the background server; Step S2. Store and preprocess the multimodal evidence uploaded by the judicial personnel terminal through the background server to obtain a standardized evidence text set; Step S3. Extract evidence entities from each piece of data in the standardized evidence text set to obtain an entity list; Step S4. Predict the relationships of the entities in the entity list to generate an entity-relationship pair list; Step S5. Construct an initial judicial evidence graph based on the entity-relationship pair list; Step S6. Optimize the initial judicial evidence graph based on the graph neural network and the judicial evidence ontology library to obtain an optimized judicial evidence graph; Step S7. Detect explicit and implicit contradictions based on the optimized judicial evidence graph.
2. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 1, characterized in that: The said Step S1 includes: S101. Import multimodal evidence through the judicial personnel terminal. The multimodal evidence contains multiple pieces of evidence of different types. According to the different evidence types, it is divided into text evidence, image evidence, and audio evidence; S102. For each piece of evidence imported through the judicial personnel terminal, the judicial personnel terminal automatically generates a uniquely identified tag, and the tag format is "evidence ID + case number + evidence type"; S103. The judicial personnel terminal uploads the evidence with tags added to the background server.
3. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 2, characterized in that: The said Step S2 includes: S201. The background server receives the evidence uploaded by the judicial personnel terminal, stores the evidence using a distributed file system, and sets 3 data copies for each piece of evidence to ensure data security and recoverability, avoiding evidence loss caused by a single-point failure; S202. The background server performs standardized preprocessing on the stored evidence: (1) Obtain the corresponding text content according to each piece of evidence stored: For each piece of image evidence, correct the image tilt based on the Hough transform algorithm, remove image noise using the Gaussian filter algorithm, and then call the Tesseract OCR engine to convert the text in the image into a piece of text content; For each piece of audio evidence, set a silent segment filtering threshold, automatically剔除 the single-segment silent duration in the audio evidence that exceeds the filtering threshold, and convert the audio evidence into a piece of text content through the Whisper-large speech transcription model; For each piece of text evidence, directly use the text information it contains as a piece of text content; (2) Clean and optimize the text content: For each piece of text content, perform the following operations respectively to obtain standardized text content: Use a special stop word list in the judicial field to剔除 redundant content. The special stop word list in the judicial field includes meaningless function words and non-evidence expressions; the meaningless function words include "of", "in", "about", and the non-evidence expressions include "the court holds that", "in summary"; Correct the spelling mistakes and semantic errors in the text content; (3) Generate a standardized evidence text set: Based on the standardized text content obtained from each text, data in the standardized evidence text set is constructed. Each data entry includes three core fields: evidence ID, standardized text content, and confidence level. The confidence score consists of three parts: Confidence Score = Basic Transformation Score + Cleaning and Optimization Score - Outlier Deduction; (3.1) Set basic conversion scores for image evidence, audio evidence and text evidence respectively, and obtain the corresponding basic conversion scores according to the type of evidence; (3.2) The cleaning and optimization score includes the stop word removal score and the error correction score, which are achieved through manual inspection: When calculating the stop word removal score, if no key information is mistakenly deleted and no stop words are missed, then the total word removal score is obtained. If no key information is mistakenly deleted, but stop words are missed, the set score will be deducted for each missed stop word. If key information is mistakenly deleted, the word removal score will be 0. When calculating error correction scores, based on the upper limit of error correction scores, for each typo correction error and semantic error correction, the corresponding score is deducted, with a minimum of 0 points; (3.3) When calculating the abnormal deduction items, deduction items are set for missing core information, logical contradictions and non-standard format. If core information is missing, logical contradictions and non-standard format occur, the corresponding points are deducted. An upper limit is set for abnormal deduction items. When the deduction points exceed the set upper limit, the abnormal deduction items take the set upper limit.
4. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 3, characterized in that: Step S3 includes: S301. For each piece of data in the standardized evidence text set, perform the following operation: The entity recognition head of the judicial BERT model identifies the main entities in the text and outputs the confidence level of each entity, marking the entity type as "PER"; the main entities include parties and witnesses; The entity recognition head of the judicial BERT model identifies evidence entities in the text and outputs the confidence level of each evidence entity, marking the entity type as "EVI". The evidence entities include physical evidence and documentary evidence. S302. Generate an entity list: In the entity list, the record format for each piece of information is: {Evidence ID: ID number, Entity: [Entity name, Entity type, Confidence level]}.
5. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 4, characterized in that: Step S4 includes: S401. Using the relation extraction head of the judicial BERT model, predict the relationships between entity pairs in the entity list and output the confidence score for each relationship; S402. Set a confidence threshold for relationships, and remove relationships with confidence scores below the threshold to obtain an entity-relationship pair list. The record format for each entry in the entity-relationship pair list is as follows: {Evidence ID: ID number, Entity 1: [Entity name, Entity type], Relationship: Relationship type, Entity 2: [Entity name, Entity type], Confidence: Relationship confidence}.
6. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 5, characterized in that: Step S5 includes: Node creation: Entities in the entity-relationship pair list are used as graph nodes. Each node contains 5 attributes: entity ID, entity name, entity type, association evidence ID, and entity confidence. Among them, the entity ID is the unique identifier of the entity, and the format is defined by "ENT + auto-incrementing sequence number". Edge creation: The relationships in the entity-relationship pair list are used as graph edges. Each edge contains 4 attributes: edge ID, relationship type, relationship confidence, and creation time. Among them, the edge ID is a unique identifier for the edge, and the format is defined by "EDGE + auto-incrementing sequence number". Based on the node creation and edge creation results, an initial judicial evidence graph is generated in the Neo4j database. The graph is an undirected graph structure.
7. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 6, characterized in that: Step S6 includes: using the GraphSAGE graph neural network model, which is divided into 3 layers: input layer, hidden layer, and output layer; All nodes and their attributes in the initial judicial evidence graph are compiled into node feature vectors using One-Hot encoding, and all edges and their attributes in the initial judicial evidence graph are compiled into edge feature vectors using One-Hot encoding. Input layer: Loads the node feature vectors and edge feature vectors of the initial judicial evidence graph; Hidden layer: The mean aggregation function is used to aggregate the features of the neighboring nodes of each node, and the aggregation weights are adjusted in combination with the edge features. The ReLU activation function is used to enhance the non-linear fitting ability of the model and avoid gradient vanishing. Output layer: Outputs node embedding vectors, containing the association information between nodes and their neighbors. It also optimizes the initial judicial evidence graph structure by removing edges with a relationship confidence of <0.5 and filling in the missing edges in the initial judicial evidence graph. Output: Generates an optimized judicial evidence graph, including node embedding vectors.
8. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 7, characterized in that: In step S7, explicit contradiction refers to a conflict in the attribute descriptions of the same entity in different pieces of evidence. The detection process includes: Based on the node relationships in the optimized judicial evidence graph, the text describing the same entity in different pieces of evidence is filtered using Cypher query statements; Input different textual representations of the same entity into the judicial BERT model; The semantic similarity of semantic vectors corresponding to any two different expressions of the same entity is calculated using the cosine similarity formula. If the semantic similarity is less than the set threshold for judging explicit contradictions, it is judged as a potential explicit contradiction.
9. The method for constructing a judicial evidence graph and detecting contradictions based on a graph neural network according to claim 7, characterized in that: In step S7, implicit contradictions refer to logical conflicts between related entities, and the detection process includes: Based on the node relationships in the optimized judicial evidence graph, the neighbor node query function of the GraphSAGE model is used to filter entity pairs that match the implicit contradiction scenario category, forming a mapping table of associated entity pairs - associated evidence - case domain; The node embedding vectors of related entity pairs are retrieved from the optimized judicial evidence graph, and the vector similarity is calculated using the cosine similarity formula. If the semantic similarity is less than the set threshold for judging implicit contradictions, it is judged as a potential implicit contradiction.
Citation Information
Patent Citations
Evidence and fact association graph construction method and device, equipment and medium
CN118627609A
Report generation system and method based on legal knowledge graph
CN120471061A
Knowledge base construction method in preschool education field by fusing knowledge graph and large language model
CN120822590A
Judicial scene-oriented multi-modal data fusion method and system
CN120892985A
Cited By
Rental state monitoring method and equipment for operational assets, and medium
CN122089446A
A method, apparatus, and medium for lease status monitoring of operational assets
CN122089446B