Forensic medical case data analysis model training method and case data analysis method

By training the forensic case data analysis model and utilizing model fine-tuning strategies and professional data processing, we solved the accuracy and efficiency issues of forensic case data analysis and achieved efficient and stable intelligent analysis.

CN120705569AActive Publication Date: 2025-09-26ACADEMY OF FORENSIC SCIENCE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510608628.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2025-09-26
Estimated Expiration
2045-05-13

AI Technical Summary

Technical Problem

Existing technologies for forensic case data analysis lack a specialized knowledge base and are unable to accurately process complex information such as cause of death identification, injury severity and type diagnosis. Traditional manual analysis is inefficient and highly subjective.

Method used

Through the model fine-tuning strategy based on sample forensic information, the forensic case data analysis model is trained, including the construction of forensic-specific word vectors, the introduction of the BERT model and the ChatGLM-6B model, the use of supervised fine-tuning, self-supervised learning and contrastive learning strategies, and the combination of knowledge graphs and graph neural networks to build a causal reasoning chain, enhancing the model's understanding of forensic professional terminology and legal norms.

Benefits of technology

It improves the accuracy and efficiency of forensic case data analysis, reduces manual analysis time and conclusion deviation, and provides an efficient and stable intelligent analysis tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705569A_ABST
    Figure CN120705569A_ABST
Patent Text Reader

Abstract

The invention provides a forensic case data analysis model training method and a case data analysis method, and the training method comprises the steps: obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data; training the preset large language model based on the model fine tuning strategies corresponding to each group of sample forensic medical information and each type of included sub-sample forensic medical information, so as to obtain the forensic medical case data analysis model; wherein the forensic case data analysis model is used for performing reasoning analysis based on input target forensic case data to obtain a corresponding target reasoning analysis result. The forensic medicine case data analysis model obtained through the training method can obtain corresponding case analysis results according to different input conditions, and the case analysis efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of model training technology, and in particular to a forensic case data analysis model training method and a case data analysis method. Background Art

[0002] In recent years, advances in deep learning technology have greatly promoted the development of natural language processing (NLP). In particular, the emergence of large-scale pre-trained language models (LLMs) has enabled machines to achieve breakthroughs in complex semantic understanding and reasoning capabilities, and has demonstrated huge application potential in many professional fields such as medicine and law.

[0003] Forensic medicine is a highly specialized discipline that involves a large amount of complex medical, legal and other case data and information. Traditional manual analysis methods face many challenges such as low efficiency, strong subjectivity, and slow knowledge updating and iteration.

[0004] Currently, case data processing in the field of forensic medicine primarily relies on accumulated manual experience and traditional data processing methods. While some statistical tools based on rules or statistical methods have been developed, these tools are often limited to specific diseases or case data, lacking the ability to comprehensively analyze and reason about entire cases and complex information. Furthermore, within the specific field of forensic medicine, existing large language models are still in their infancy, often lacking specialized knowledge bases and unable to accurately process semantic information related to forensic-related tasks such as cause of death identification or inference, diagnosis of injury severity and type, clinical identification, and other forensic reasoning. Summary of the Invention

[0005] The technical problem to be solved by the present disclosure is to overcome the defects of the existing forensic medicine technology in that it is impossible to accurately analyze the relevant cause of death inference, injury or disability degree and type diagnosis manually, and to provide a forensic case data analysis model training method and case data analysis method.

[0006] The present disclosure solves the above technical problems through the following technical solutions:

[0007] According to a first aspect of the present disclosure, a method for training a forensic case data analysis model is provided, the training method comprising:

[0008] Acquire several groups of sample forensic information based on several sample forensic case data;

[0009] Each group of the sample forensic information includes several types of sub-sample forensic information, and each type of the sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model;

[0010] Training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model;

[0011] The forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

[0012] Optionally, the training method further includes:

[0013] Construct several forensic word vectors;

[0014] The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes:

[0015] Based on the model fine-tuning strategies corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included, the preset large language model is trained, and the forensic-specific word vector is trained for word embedding using the first preset model to obtain the forensic case data analysis model.

[0016] Optionally, the first preset model includes a BERT model (a pre-trained language representation model based on the Transformer architecture);

[0017] and / or,

[0018] The preset large language model includes the ChatGLM-6B model (an open source conversational language model that supports both Chinese and English).

[0019] Optionally, the subsample forensic information is question-answer pair data that has been labeled in the forensic case data, and the corresponding model fine-tuning strategy is a supervised fine-tuning strategy;

[0020] The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes:

[0021] Splitting the question-answer pair data into input data and output data according to the question and the corresponding answer;

[0022] Based on the input data and the output data, and corresponding to the supervised fine-tuning strategy, the preset large language model is trained to obtain the forensic case data analysis model;

[0023] and / or,

[0024] The subsample forensic information is unlabeled forensic data in the forensic case data, and the corresponding model fine-tuning strategy is a self-supervised learning strategy;

[0025] The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes:

[0026] Converting the unlabeled forensic data into a plurality of token vectors (word element vectors or tag vectors, which convert words, phrases or other language units in text data into numerical vectors) using a preset processing method;

[0027] Based on the plurality of token vectors and the corresponding self-supervised learning strategy, the preset large language model is trained to obtain the forensic case data analysis model;

[0028] and / or,

[0029] The subsample forensic information is forensic case data association information, and the corresponding model fine-tuning strategy is a comparative learning strategy;

[0030] The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes:

[0031] Obtaining correlation score information between any two pieces of forensic case data correlation information;

[0032] Based on the forensic case data association information and the association score information, and the corresponding comparative learning strategy, the preset large language model is trained to obtain the forensic case data analysis model.

[0033] Optionally, before the step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, the training method further comprises:

[0034] Storing the different sample forensic case data in a structured manner in a preset forensic data information database;

[0035] The step of obtaining several groups of sample forensic information based on several sample forensic case data includes:

[0036] Acquiring a plurality of sample forensic case data from the preset forensic data information database to obtain a plurality of groups of sample forensic information;

[0037] and / or,

[0038] After the step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, the training method further comprises:

[0039] Preprocessing the sample forensic case data to obtain the sample forensic information;

[0040] The preprocessing includes at least one of format conversion processing, deduplication processing and anonymization processing.

[0041] Optionally, the preprocessing further includes:

[0042] Performing data enhancement on the sample forensic information based on a generative model to obtain new sample forensic information;

[0043] The forensic case data analysis model is trained based on the new sample forensic information;

[0044] The new sample forensic information is information that meets the preset natural language processing requirements.

[0045] Optionally, the training method further includes:

[0046] Embedding a preset hybrid search strategy into the preset large language model for model training to obtain the forensic case data analysis model;

[0047] The preset hybrid search strategy includes the best match 25 algorithm and dense vector search;

[0048] and / or,

[0049] The training method further comprises:

[0050] Construct a forensic causal reasoning chain based on knowledge graphs and graph neural network models;

[0051] Embedding the forensic causal reasoning chain into the preset large language model for model training to obtain the forensic case data analysis model;

[0052] and / or,

[0053] The training method further comprises:

[0054] Embedding a preset attention mechanism into the preset large language model for model training to obtain the forensic case data analysis model;

[0055] Among them, the preset attention mechanism is a self-attention mechanism based on the Transformer structure.

[0056] According to a second aspect of the present disclosure, a method for analyzing forensic case data is provided, the method comprising:

[0057] Obtaining target forensic case data;

[0058] Inputting target forensic information corresponding to the target forensic case data into a forensic case data analysis model to output a target reasoning analysis result corresponding to the target forensic case data;

[0059] Among them, the forensic case data analysis model is obtained using the training method described in the first aspect of this disclosure.

[0060] According to a third aspect of the present disclosure, a training system for a forensic case data analysis model is provided, the training system comprising:

[0061] A sample information acquisition module, used to acquire several groups of sample forensic information based on several sample forensic case data;

[0062] Each group of the sample forensic information includes several types of sub-sample forensic information, and each type of the sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model;

[0063] a model training module, configured to train the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein, so as to obtain the forensic case data analysis model;

[0064] The forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

[0065] Optionally, the training system further includes: a word vector construction module;

[0066] The word vector construction module is used to construct a number of forensic medicine-specific word vectors;

[0067] The model training module is also used to train the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included, and to use the first preset model to perform word embedding training on the forensic-specific word vector to obtain the forensic case data analysis model.

[0068] Optionally, the first preset model includes a BERT model;

[0069] and / or,

[0070] The preset large language model includes the ChatGLM-6B model.

[0071] Optionally, the subsample forensic information is question-answer pair data that has been labeled in the forensic case data, and the corresponding model fine-tuning strategy is a supervised fine-tuning strategy;

[0072] The model training module is further configured to split the question-answer pair data into input data and output data according to questions and corresponding answers;

[0073] Based on the input data and the output data, and corresponding to the supervised fine-tuning strategy, the preset large language model is trained to obtain the forensic case data analysis model;

[0074] and / or,

[0075] The subsample forensic information is unlabeled forensic data in the forensic case data, and the corresponding model fine-tuning strategy is a self-supervised learning strategy;

[0076] The model training module is further used to convert the unlabeled forensic data into a plurality of token vectors in a preset processing manner;

[0077] Based on the plurality of token vectors and the corresponding self-supervised learning strategy, the preset large language model is trained to obtain the forensic case data analysis model;

[0078] and / or,

[0079] The subsample forensic information is forensic case data association information, and the corresponding model fine-tuning strategy is a comparative learning strategy;

[0080] The model training module is further used to obtain correlation score information between any two pieces of forensic case data correlation information;

[0081] Based on the forensic case data association information and the association score information, and the corresponding comparative learning strategy, the preset large language model is trained to obtain the forensic case data analysis model.

[0082] Optionally, the training system further comprises a data storage module, the data storage module being configured to store different sample forensic case data in a structured manner into a preset forensic data information database before obtaining a plurality of groups of sample forensic information based on the plurality of sample forensic case data;

[0083] The sample information acquisition module is used to acquire a number of sample forensic case data from the preset forensic data information database to obtain a number of groups of sample forensic information;

[0084] and / or,

[0085] The training system further includes a data preprocessing module, which is configured to preprocess the sample forensic case data to obtain the sample forensic information after obtaining the sample forensic information based on the sample forensic case data;

[0086] The preprocessing includes at least one of format conversion processing, deduplication processing and anonymization processing.

[0087] Optionally, the data preprocessing module is further configured to perform data enhancement on the sample forensic information based on a generative model to obtain new sample forensic information;

[0088] The forensic case data analysis model is trained based on the new sample forensic information;

[0089] The new sample forensic information is information that meets the preset natural language processing requirements.

[0090] Optionally, the training system further includes a hybrid search strategy module, which is used to embed a preset hybrid search strategy into the preset large language model for model training to obtain the forensic case data analysis model;

[0091] The preset hybrid search strategy includes the best match 25 algorithm and dense vector search;

[0092] and / or,

[0093] The training system also includes a causal chain construction module, which is used to construct a forensic causal reasoning chain based on a knowledge graph and a graph neural network model;

[0094] Embedding the forensic causal reasoning chain into the preset large language model for model training to obtain the forensic case data analysis model;

[0095] and / or,

[0096] The training system further includes an attention mechanism module, which is used to embed a preset attention mechanism into the preset large language model for model training to obtain the forensic case data analysis model;

[0097] Among them, the preset attention mechanism is a self-attention mechanism based on the Transformer structure.

[0098] According to a fourth aspect of the present disclosure, a forensic medicine case data analysis system is provided, the forensic medicine case data analysis system comprising:

[0099] Target information acquisition module, used to obtain target forensic case data information;

[0100] An analysis result reasoning module, configured to input the target forensic case data information into a forensic case data analysis model to obtain a target reasoning analysis result corresponding to the target forensic case data information;

[0101] The forensic medicine case data analysis model is obtained by using the forensic medicine case data analysis model training system as described in the third aspect of the present disclosure.

[0102] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the training method of the forensic case data analysis model described in the first aspect of the present disclosure and / or the forensic case data analysis method described in the second aspect of the present disclosure is implemented.

[0103] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the training method of the forensic case data analysis model described in the first aspect of the present disclosure, and / or the forensic case data analysis method described in the second aspect of the present disclosure.

[0104] According to the seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the training method of the forensic case data analysis model described in the first aspect of the present disclosure, and / or the forensic case data analysis method described in the second aspect of the present disclosure.

[0105] On the basis of conforming to the common sense in this field, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0106] The positive progress of this disclosure is:

[0107] The training method of the forensic case data analysis model and the case data analysis method provided by the present disclosure focus on in-depth training of forensic data. Among them, the training method of the forensic case data analysis model significantly enhances the model's ability to understand forensic professional terminology, case logic and legal norms, so that the analysis results output by the model are more in line with the needs of forensic practice, and effectively avoids the erroneous reasoning caused by insufficient domain knowledge of general large language models; the case data analysis method provided by the present disclosure can greatly reduce the time for manual review of cases and reference to materials, and at the same time can reduce the conclusion deviation caused by differences in manual experience, improve the intelligence level of forensic evidence analysis, provide forensic practitioners with efficient and stable tools, and can also identify the manpower and time costs of judicial appraisal institutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0108] Figure 1 This is a flow chart of the training method for the forensic medicine case data analysis model provided in Example 1;

[0109] Figure 2 This is a flowchart of training when the model fine-tuning strategy provided in Example 1 is a supervised fine-tuning strategy;

[0110] Figure 3 This is a schematic diagram of the training process when the model fine-tuning strategy provided in Example 1 is a self-supervised learning strategy;

[0111] Figure 4 This is a flowchart of training when the model fine-tuning strategy provided in Example 1 is a comparative learning strategy;

[0112] Figure 5 Schematic diagram of the process of the forensic case data analysis method provided in Example 2;

[0113] Figure 6 Schematic diagram of the structure of the training system of the forensic case data analysis model provided in Example 3;

[0114] Figure 7 This is a schematic diagram of the structure of the forensic case data analysis system provided in Example 4;

[0115] Figure 8 This is a schematic diagram of the structure of the electronic device provided in Example 5. DETAILED DESCRIPTION

[0116] The present disclosure is further illustrated below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0117] In the embodiments of the present disclosure, prefixes such as "first" and "second" are used only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. In the embodiments of the present disclosure, the use of prefixes such as ordinal numbers to distinguish description objects does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitations should be constituted due to the use of such prefixes. In addition, in the description of this embodiment, unless otherwise specified, the meaning of "plurality" is two or more.

[0118] Currently, in forensic-related inference of cause of death, it is difficult to quickly train a new generation of forensic experts through standardized methods because the field of forensic medicine is highly dependent on the experience of senior experts. In addition, knowledge in the field of forensic medicine is updated rapidly, and traditional models rely on static training data sets, making it difficult to update and integrate the latest research results and case information. Manual retrieval and comparison of similar cases is time-consuming and easily influenced by subjective judgment. The existing judicial appraisal system lacks intelligent analysis methods, cannot perform semantic analysis and reasoning on historical cases, and lacks the ability to comprehensively reason about case backgrounds, legal requirements, etc.

[0119] In view of this, the present invention provides a training method for a forensic case data analysis model and a case data analysis method to effectively integrate and analyze forensic case information and provide accurate and efficient analysis and reasoning results.

[0120] Example 1

[0121] like Figure 1 As shown, in this embodiment, a training method for a forensic case data analysis model is provided, and the training method includes:

[0122] S11: Acquire several groups of sample forensic information based on several sample forensic case data; wherein each group of sample forensic information includes several types of sub-sample forensic information, and each type of sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model.

[0123] The sample forensic information in this embodiment is obtained from judicial appraisal institutions, medical databases, and public case libraries to ensure that the sample data is as comprehensive as possible; and updated data can be obtained from these channels regularly or irregularly and used as new sample data for model training.

[0124] Specifically, for example, autopsy reports, test reports, physical examination records, forensic journal research papers, etc. are obtained from judicial appraisal institutions, and forensic-related data are collected on this basis. After collecting the relevant forensic data, the data is formatted, deduplicated, standardized, anonymized, and other operations are performed to obtain sample forensic information. Among them, synthetic data can also be generated through generative models to expand the sample forensic information, thereby increasing the diversity of the data and enhancing the generalization ability of the model.

[0125] S12: Based on the model fine-tuning strategy corresponding to each group of sample forensic information and each type of sub-sample forensic information included, the preset large language model is trained to obtain a forensic case data analysis model; wherein the forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

[0126] The hybrid fine-tuning strategy in this embodiment includes: supervised fine-tuning, self-supervised learning, and contrastive learning;

[0127] Among them, supervised fine-tuning refers to fine-tuning the model using labeled forensic case data, and then training the model to complete tasks such as cause of death inference, injury classification, and injury mode;

[0128] Self-supervised learning refers to the use of unlabeled forensic data to design self-supervised tasks (such as masked language modeling and sentence order prediction) to enhance the model's understanding of forensic knowledge.

[0129] Contrastive learning refers to the ability to train the model to better understand the semantic relationships between different cases by comparing similar cases with dissimilar cases.

[0130] In addition, this embodiment will use expert-labeled judicial questions and answers to fine-tune the model's instructions, and embed knowledge graphs or rule bases in the field of forensic medicine into the model to ensure that the model complies with forensic medicine standards during the reasoning process. At the same time, the model in this embodiment also introduces continuous learning technology (such as Elastic Weight Consolidation, EWC for short), so that the model can continuously absorb new forensic knowledge without forgetting old knowledge, thereby improving the accuracy of the model.

[0131] The preset large language model in this embodiment is based on the general LLM (Large Language Model). It uses public literature, textbooks, and historical case data in the field of forensic medicine for secondary pre-training to construct forensic-specific word vectors (such as forensic BERT model embeddings). The model's generalization ability is improved through a multi-task learning framework, so that the final forensic case data analysis model has the ability to understand forensic professional terminology, case logic, and legal norms.

[0132] The training method of the forensic case data analysis model and the case data analysis method provided by the present disclosure focus on in-depth training of forensic data. In particular, the training method of the forensic case data analysis model significantly enhances the model's ability to understand forensic professional terminology, case logic, and legal norms, making the analysis results output by the model more in line with the needs of forensic practice and effectively avoiding the erroneous reasoning caused by insufficient domain knowledge of general large language models.

[0133] In one feasible solution, the training method further includes: constructing a number of forensic medicine-specific word vectors.

[0134] The steps of training a preset large language model based on the model fine-tuning strategy corresponding to each set of sample forensic information and each type of sub-sample forensic information included therein to obtain a forensic case data analysis model include:

[0135] Based on the model fine-tuning strategy corresponding to each group of sample forensic information and each type of sub-sample forensic information included, the preset large language model is trained, and the forensic-specific word vectors are trained for word embedding using the first preset model to obtain a forensic case data analysis model.

[0136] In this embodiment, the first preset model includes the BERT model; the preset large language model includes the ChatGLM-6B model.

[0137] Of course, the specific types of the above models are only examples, and the present disclosure is not limited to the specific types of models. Any model that can achieve the above functions is within the scope of protection of the present disclosure.

[0138] The specific method of constructing several forensic medicine-specific word vectors and embedding them into the model is as follows: collecting professional text data in the field of forensic medicine, including textbooks, documents, historical case reports, etc.; performing preprocessing operations such as cleaning and word segmentation on the professional text data; using the preprocessed forensic medicine text data to fine-tune the BERT model; during the fine-tuning process, the BERT model will learn the professional terminology and semantic relationships in the field of forensic medicine; after fine-tuning, the word vector of each word is extracted from the BERT model; these word vectors are forensic medicine-specific word vectors.

[0139] The specific steps of embedding the forensic medicine-specific word vector into the first preset model are as follows: replace the original general word vector in the ChatGLM-6B model with the forensic medicine-specific word vector.

[0140] By using forensic-specific word vectors, the ChatGLM-6B model can better understand text in the forensic field, thereby performing more accurately and professionally in forensic-related tasks (such as case analysis and evidence evaluation).

[0141] In one feasible solution, when the subsample forensic information is question-answer pair data that has been labeled in forensic case data, the corresponding model fine-tuning strategy is a supervised fine-tuning strategy.

[0142] Among them, forensic case data can be labeled by forensic experts to obtain a number of question-answer pair data.

[0143] Of course, the present disclosure is not limited to the method of labeling forensic case data, and other methods of labeling forensic case data are within the scope of protection of the present disclosure.

[0144] like Figure 2 As shown, based on the model fine-tuning strategy corresponding to each set of sample forensic information and each type of sub-sample forensic information included, the steps of training the preset large language model to obtain the forensic case data analysis model include:

[0145] S21: Split the question-answer pair data into input data and output data according to the question and the corresponding answer;

[0146] The question-answer pair data is split into input data and output data according to the question and the corresponding answer.

[0147] S22: Based on the input data and output data, as well as the corresponding supervised fine-tuning strategy, the preset large language model is trained to obtain a forensic case data analysis model.

[0148] By setting a supervised fine-tuning strategy, the model's understanding of forensic domain knowledge is enhanced.

[0149] In one feasible solution, when the subsample forensic information is unlabeled forensic data in the forensic case data, the corresponding model fine-tuning strategy is a self-supervised learning strategy;

[0150] like Figure 3 As shown, based on the model fine-tuning strategy corresponding to each set of sample forensic information and each type of sub-sample forensic information included, the steps of training the preset large language model to obtain the forensic case data analysis model include:

[0151] S31: converting the unlabeled forensic data into a number of token vectors using a preset processing method;

[0152] Among them, the preset processing method is based on a masked language model to transform unlabeled forensic data to obtain several Token vectors.

[0153] Of course, the present disclosure is limited to the method of converting forensic data into Token vectors. Other methods that can convert unlabeled forensic data into Token vectors are within the scope of protection of the present disclosure.

[0154] S32: Based on several token vectors and corresponding self-supervised learning strategies, the preset large language model is trained to obtain a forensic case data analysis model.

[0155] By setting a self-supervised learning strategy, the model's understanding of forensic domain knowledge is further enhanced.

[0156] In one feasible solution, when the subsample forensic information is forensic case data association information, the corresponding model fine-tuning strategy is a contrastive learning strategy;

[0157] like Figure 4 As shown, based on the model fine-tuning strategy corresponding to each set of sample forensic information and each type of sub-sample forensic information included, the steps of training the preset large language model to obtain the forensic case data analysis model include:

[0158] S41: Obtaining correlation score information between any two pieces of forensic case data correlation information;

[0159] Among them, the correlation score information between any two forensic case data can be obtained by calculating the cosine similarity between any two forensic case data.

[0160] Of course, the present disclosure is not limited to the method of obtaining the correlation score information between any two forensic case data. Other methods can obtain the correlation score information between any two forensic case data.

[0161] S42: Based on the forensic case data association information and association score information, and the corresponding comparative learning strategy, the preset large language model is trained to obtain a forensic case data analysis model.

[0162] By setting a contrastive learning strategy, the model's ability to understand the semantic relationships between different cases is further enhanced.

[0163] Preferably, in this embodiment, the fine-tuning of the model adopts a hybrid strategy combining supervised fine-tuning (SFT), self-supervised learning and contrastive learning to optimize the impact of different data sources on the model.

[0164] During the supervised fine-tuning stage, 500 manually annotated identification reports were used for training, mainly to optimize the task of inferring identification conclusions (cause of death).

[0165] Specifically, the identification report dataset is divided into training set, validation set and test set in a ratio of 8:1:1. The classification task is trained using the BERT+ classification head, and the F1-score target value is set to no less than 0.92 to ensure classification accuracy.

[0166] In the self-supervised learning stage, 1,000 unlabeled identification reports were used for the masked language modeling task. 15% of the text was randomly masked, and the model was required to predict the masked content to improve the model's semantic understanding ability on unlabeled data.

[0167] To further enhance the ability to semantically distinguish between cases, a contrastive learning model was introduced to distinguish similar from dissimilar cases. The semantic similarity between cases was calculated using SimCSE (Simple Contrastive Sentence Embeddings), a simple contrastive learning framework for generating advanced sentence embeddings. The temperature parameter was set to 0.05, and contrastive loss was used for optimization. During training, the model learns to maximize the vector distance between semantically similar cases while minimizing the vector distance between unrelated cases, thereby improving retrieval and reasoning accuracy.

[0168] In one feasible solution, before the step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, the training method further includes:

[0169] Storing different sample forensic case data in a structured manner in a pre-set forensic data information database;

[0170] The steps of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data include:

[0171] A number of sample forensic case data are obtained from a preset forensic data information database to obtain a number of groups of sample forensic information.

[0172] By storing different sample forensic case data in a structured manner in the data information database, the accuracy and completeness of the data are improved. By defining clear data types and formats, data input errors are reduced, data quality is improved, and the accuracy of the model is improved.

[0173] Since forensic data is collected from historical forensic appraisal reports (including forensic appraisal opinions and forensic inspection reports), the document formats include .doc, .docx, and .pdf electronic document formats. Forensic appraisal reports contain information such as basic forensic appraisal information, case summary, medical history summary, inspection process, toxicology analysis, imaging examination, unconventional examination, forensic pathology diagnosis, analysis instructions, and appraisal opinions. After obtaining several sets of sample forensic information based on several sample forensic case data, the training method also includes:

[0174] Preprocessing sample forensic case data to obtain sample forensic information;

[0175] Among them, preprocessing includes format conversion, deduplication and anonymization.

[0176] By preprocessing sample forensic case data, the quality of the data can be significantly improved, thereby improving the performance of the model and the accuracy of the analysis results.

[0177] Among them, format conversion processing refers to the format conversion of data information in different formats to convert it into basic case information with the same format.

[0178] In one implementation, publicly available pdfplumber (a tool for extracting text, tables, and other information from PDF files) and docx2txt (a tool for extracting text content from docx files) are used to convert unstructured data such as PDF and Word into plain text, with the encoding format uniformly set to utf-8 (a character encoding method).

[0179] By converting the format of data information, the data processing efficiency can be effectively improved.

[0180] Deduplication refers to the removal of duplicate data information.

[0181] In one implementation, TF-IDF (Term Frequency-Inverse Document Frequency) is used to calculate text similarity, combined with MinHash+LSH (Locality Sensitive Hashing) for approximate deduplication, thereby removing redundant cases and unifying term formats (such as injury types, toxicology terms, etc.).

[0182] By deduplicating data information, unnecessary calculations can be reduced and the speed and efficiency of data processing can be improved.

[0183] Anonymization refers to the anonymization of preset sensitive information in data information.

[0184] In one implementation, sensitive fields in the case information (such as the identity information of the person being identified, the relationship between the persons involved in the case, the location of the crime, etc.) are automatically masked or generalized (such as replacing the specific age "25 years old" with "20-30 years old").

[0185] By anonymizing data information, personal privacy can be effectively protected, data availability can be improved, legal risks can be reduced, and data security can be enhanced.

[0186] In one feasible solution, the preprocessing further includes: performing data enhancement on the sample forensic information based on the generative model to obtain new sample forensic information;

[0187] Among them, the forensic case data analysis model is trained based on new sample forensic information;

[0188] The new sample forensic information is information that meets the preset natural language processing requirements.

[0189] In one implementation, generative models (such as GPT-4o) are combined with EDA (Exploratory Data Analysis) for diversified rewriting to generate synthetic forensic data and expand the training dataset. For example, the original forensic opinion text data, such as "The patient's cause of death may be acute poisoning, and high concentrations of toxins were detected in the blood sample," can be transformed into "The victim's cause of death may be related to poisoning, and blood tests have found abnormally high concentrations of chemicals," thus enriching the natural language data.

[0190] The generative model is used to enhance the sample forensic information, thereby increasing the richness of natural language data, improving the readability of the data, and enhancing the interactivity of the model.

[0191] In one feasible solution, the training method further includes:

[0192] Embed the preset hybrid search strategy into the preset large language model for model training to obtain a forensic case data analysis model;

[0193] Among them, the preset hybrid search strategy includes the best match 25 algorithm and dense vector retrieval.

[0194] In one embodiment, in terms of semantic indexing, the present disclosure adopts dense vector retrieval technology and combines it with forensic vector databases (FAISS and Chroma DB, both of which are tools for efficient similarity search and vector database management) to build an efficient forensic case retrieval system.

[0195] Specifically, the case text is first vectorized using BERT or Sentence-Transformer (a framework for generating high-quality sentence embeddings) and stored in a vector database, enabling rapid location of the most relevant cases during queries. During the vectorization process, the text is mapped into a high-dimensional embedding space. The model uses the IndexIVFFlat index structure (an inverted file-based index structure) for efficient clustering and search, with 100 cluster centers set to ensure a balance between retrieval speed and accuracy. Furthermore, to enhance retrieval robustness, a hybrid search strategy combining BM25 (Best Match 25 algorithm) and Dense Retrieval (Dense Vector Retrieval) is used, enabling the model to balance term matching and semantic matching, improving retrieval recall.

[0196] In this embodiment, a preset hybrid search strategy is introduced to combine semantic retrieval with a generative model. This allows the model to not only rely on its own parameterized knowledge when answering questions, but also dynamically obtain relevant information from an external forensic case library, thereby generating answers that are more in line with professional logic, thereby improving the accuracy and interpretability of the model.

[0197] In forensic case analysis, traditional large language models often face knowledge gaps and limited reasoning capabilities when handling highly specialized, knowledge-intensive tasks. Therefore, in one feasible solution, the training method also includes:

[0198] Construct a forensic causal reasoning chain based on knowledge graphs and graph neural network models;

[0199] The forensic causal reasoning chain is embedded into the preset large language model for model training to obtain a forensic case data analysis model.

[0200] In a real-time approach, the present disclosure combines knowledge graph (Neo4j) and graph neural network (GNN) to construct a forensic causal reasoning chain to simulate the causal relationship between poison ingestion, injury type and cause of death.

[0201] For example, it can infer a causal chain such as "poison ingestion → liver damage → acute poisoning," improving the scientific and logical analysis of forensic cases. GNN uses the GraphSAGE model, a three-layer structure with a hidden layer dimension of 256, to enhance the hierarchical expressiveness of model reasoning and improve the accuracy of model predictions.

[0202] In one feasible solution, the training method further includes:

[0203] Embed the preset attention mechanism into the preset large language model for model training to obtain a forensic case data analysis model;

[0204] Among them, the preset attention mechanism is the self-attention mechanism based on the Transformer structure.

[0205] The introduction of an attention mechanism dynamically calculates the importance of each part of the input text during inference and visually displays the key case information the model focuses on. For text input, the model uses a Transformer-based self-attention mechanism and an Attention Heatmap (a visualization tool that shows the distribution of the model's attention when processing input data), highlighting important terms. This allows forensic experts to intuitively understand the model's focus. For example, in a cause of death determination task, the attention mechanism can highlight high-impact terms such as "cyanide poisoning" or "mechanical asphyxiation," facilitating quick expert review and improving model interpretability.

[0206] The following examples illustrate the implementation principle of the training method of the forensic medicine case data analysis model disclosed in the present invention:

[0207] The training method of the forensic case data analysis model disclosed in the present invention includes: data collection and preprocessing, pre-training and domain adaptation, retrieval enhancement generation, case analysis reasoning and model output processing.

[0208] 1. About data collection and preprocessing

[0209] Data collection is based on historical judicial appraisal report documents (including judicial appraisal opinions and judicial inspection reports) and forensic medicine and other related data collected from judicial appraisal institutions, medical databases, and public case libraries. The document formats include .doc, .docx, and .pdf electronic document formats.

[0210] The collected data is preprocessed to convert it into a standard text format. The specific preprocessing methods include at least format conversion, deduplication and standardization, anonymization, data enhancement, etc.

[0211] The specific preprocessing steps can refer to the above description of the steps for preprocessing sample forensic case data, which will not be repeated here.

[0212] 2. Pre-training and domain adaptation

[0213] First, during the pre-training phase, ChatGLM-6B was selected as the base model. A second pre-training phase was conducted, combining public forensic literature and historical case data to enhance its adaptability in forensic case analysis. The pre-training data used pre-processed, standardized forensic identification reports to ensure the model possessed the necessary expertise.

[0214] Specifically, the pre-training framework uses Transformers (a deep learning architecture) for model loading and fine-tuning. AdamW is selected as the optimizer (an optimization algorithm primarily used for model training in deep learning), with a learning rate of 5e-5 and a weight decay of 0.01. The model is trained on four Nvidia A100 GPUs (a high-performance computing and AI accelerator designed for data centers). The data used includes 201,940 structured data items.

[0215] Secondly, in order to improve the model's semantic understanding ability in the field of forensic medicine, a forensic medicine-specific word vector was constructed, and BERT was used for word embedding training. The word vector dimension was set to 768 and the number of training steps was 500,000.

[0216] The corpus includes forensic reports, forensic textbooks, and case data sets. During training, the model performs Masked Language Modeling (MLM) and Sentence Relation Prediction (NSP) tasks to enhance text comprehension. The MLM task masks 15% of the text, enabling the model to fill in missing information, while the NSP task identifies logical relationships within the case text, thereby enhancing the model's contextual reasoning capabilities.

[0217] During the model fine-tuning training phase, the model was fine-tuned using a hybrid strategy combining supervised fine-tuning (SFT), self-supervised learning, and contrastive learning to optimize the impact of different data sources on the model. During the supervised fine-tuning phase, 500 manually annotated identification reports were used for training, primarily optimizing the identification conclusion (cause of death) inference task.

[0218] Specifically, the identification report dataset is divided into training set, validation set and test set in a ratio of 8:1:1. The classification task is trained using BERT+ classification head (Cross-Entropy Loss), and the F1-score target value is set to no less than 0.92 to ensure classification accuracy.

[0219] In the self-supervised learning stage, 1,000 unlabeled identification reports were used to perform the masked language modeling (MLM) task. 15% of the text was randomly masked, and the model was required to predict the masked content to improve the model's semantic understanding ability on unlabeled data.

[0220] To further enhance the ability to semantically distinguish between cases, we introduced contrastive learning to train the model to distinguish similar from dissimilar cases. The SimCSE (Simple Contrastive Sentence Embeddings) framework was used to calculate semantic similarity between cases, with a temperature parameter set to 0.05 and optimized using contrastive loss. During training, the model learns to maximize the vector distance between semantically similar cases while minimizing the vector distance between unrelated cases, thereby improving retrieval and reasoning accuracy.

[0221] 3. Retrieval Enhancement Generation

[0222] This paper introduces the Retrieval-Augmented Generation (RAG) method, which combines semantic retrieval with a generative model. This allows the model to not only rely on its own parameterized knowledge when answering questions, but also dynamically obtain relevant information from an external forensic case library, thereby generating answers that are more consistent with professional logic.

[0223] During the query process, the case description or question entered by the user is first encoded into a vector and the cosine similarity is calculated with the case vectors in the database. The top-K cases with the highest similarity are retrieved, along with basic case information, judicial appraisal report summaries, and other content for use in the subsequent generation stage.

[0224] During the retrieval-enhanced generation process, the model retrieves the most relevant cases from the database based on the case description or forensic question entered by the user, and uses a large language model (such as ChatGLM-6B) to combine the retrieved information to generate answers that conform to forensic logic.

[0225] Compared to traditional end-to-end generation models, the RAG approach allows the model to leverage external knowledge bases, improving the reliability and traceability of responses. To ensure the scientific nature of the generated results, the system employs a controllable text generation method to constrain the output content to ensure compliance with forensic terminology standards. It also incorporates a knowledge graph (Neo4j) for factual consistency checks to ensure that the generated conclusions have a sound forensic basis. Furthermore, the system provides a traceability mechanism. Each generated response is accompanied by a cited case number, source document, and specific content snippet. This ensures that experts and judicial institutions can trace the source of the information when using it, thereby enhancing the credibility of the generated content and its forensic application value.

[0226] The training method of the corpse injury identification model provided by the present disclosure focuses on in-depth training of forensic data. Among them, the training method of the corpse injury identification model significantly enhances the model's ability to understand forensic professional terminology, case logic and legal norms, making the analysis results output by the model more in line with the needs of legal practice, and can effectively avoid the erroneous reasoning caused by insufficient domain knowledge of general large language models.

[0227] 4. Case Analysis and Reasoning

[0228] The key to analyzing and reasoning in forensic cases lies in understanding the semantics of natural language input from users, and combining this with case information retrieval results to perform causal reasoning and determine the cause of death. This involves the following steps:

[0229] 4.1 Case Semantic Understanding and Information Extraction

[0230] This disclosure uses semantic parsing technology based on forensic medicine-specific word vectors to extract key data from forensic pathology cases. The model uses BERT embedding for semantic understanding and combines SpaCy or StanfordNLP for natural language processing to identify key information such as cause of death, injury type, injury extent, toxicology data, etc. The pre-trained NER model ensures high-precision information extraction, and its F1-score is set to 0.92, which can stably identify key medical terms in the text. After processing, the input unstructured identification report text can extract core content such as "acute poisoning", "liver damage" or "fracture" and convert it into structured data.

[0231] To further optimize case data management, the system uses JSON format to store key information or builds a knowledge graph using Neo4j to provide a more intuitive representation of relationships. JSON data fields include case_id, cause_of_death, injury_type, and toxicology_data. The knowledge graph models case information, injury type, cause of death, and other information as nodes, and through logical associations, constructs a complete forensic knowledge network, making data not only easy to store but also efficient to retrieve and reason about.

[0232] 4.2 Case Retrieval and Similarity Analysis

[0233] To meet the retrieval needs of forensic cases, this paper adopts dense retrieval technology and combines it with the FAISS vector database to achieve efficient case matching.

[0234] First, case text is vectorized using the BERT model, generating 768-dimensional vector features. These features are then stored in a FAISS index structure using the IndexIVFFlat index type and 100 cluster centers to improve retrieval efficiency. During queries, a cosine similarity calculation is performed to select the top 10 cases with a similarity greater than 0.85, providing a reference for forensic experts.

[0235] Domain-specific word vectors and semantic parsing techniques are used to extract key information from cases (such as cause of death, injury type (extent), toxicology data, imaging diagnosis, etc.), and unstructured case text is converted into structured data (such as JSON or knowledge graphs). By using dense retrieval technology and combining it with forensic vector databases (such as FAISS and Chroma DB), efficient case retrieval is achieved, and semantic similarity between cases is calculated through contrastive learning or graph neural networks (GNNs).

[0236] Furthermore, this disclosure employs contrastive learning and graph neural networks (GNNs) for similarity analysis to ensure the semantic accuracy of search results. Contrastive learning optimizes semantic representations using the SimCSE model and sets a temperature parameter of τ = 0.05 to cluster similar cases. GNNs analyze complex relationships between cases through a multi-layered nested structure and calculate a similarity matrix between cases in a semantic space, further optimizing case matching accuracy.

[0237] 4.3 Case Causal Reasoning and Cause of Death Inference

[0238] In terms of causal reasoning, this disclosure combines knowledge graphs (Neo4j) and graph neural networks (GNNs) to construct a forensic causal reasoning chain to model the causal relationship between poison ingestion, injury type, and cause of death. For example, this invention can infer a causal chain such as "poison ingestion → liver injury → acute poisoning," improving the scientific and logical nature of forensic case analysis. The GNN uses the GraphSAGE model, a three-layer structure with 256 hidden layer dimensions, to enhance the hierarchical expressiveness of reasoning. Furthermore, this disclosure integrates multimodal reasoning technology, combining textual information with pathological images to improve the accuracy of cause of death inference. The text analysis uses the BERT model (which outputs 768-dimensional vectors), and the image analysis uses ResNet-50 (which outputs 2048-dimensional vectors). Finally, a Transformer-based fusion model performs joint reasoning to comprehensively assess the cause of death, such as "acute poisoning, liver injury degree: severe." This technology ensures that the model can combine data from different modalities for more accurate cause of death analysis, thereby enhancing the intelligence of forensic analysis.

[0239] 4.4 Analyzing the needs of complex cases

[0240] We introduced scenario simulation technology based on historical case data, using GPT-3 to generate scenarios for inferring the cause of death based on different poison doses and injury mechanisms. For example, given a set of historical case data, the model can simulate mild liver damage caused by low-dose poison ingestion and further infer the possible judicial conclusion. The GPT-3 model uses text-davinci-003, with a temperature parameter of 0.7 and a generation length of 200 tokens to ensure the diversity and rationality of the generated content.

[0241] To verify the reliability of simulation results, the invention employs a comparative analysis method, matching simulation results with real-world case data and calculating the F1-score and accuracy. A hypothesis is considered valid only when the F1-score is greater than 0.9. For example, the invention can verify whether a low-dose poison ingestion results in non-fatal poisoning and generate a hypothesis verification report to support the judgment of forensic experts. Through this mechanism, forensic scenario simulations not only enhance the scientific nature of case analysis but also provide data support and reference for future case research.

[0242] 5. Model output processing

[0243] To improve the interpretability of the model, this paper introduces an attention mechanism that dynamically calculates the importance of each part of the input text during reasoning and visually displays the key case information that the model focuses on. For text input, the model uses a Transformer-based self-attention mechanism to highlight important words through attention heat maps, allowing forensic experts to intuitively understand the model's focus. For example, in the task of determining the cause of death, the attention mechanism can highlight high-impact words such as "cyanide poisoning" or "mechanical asphyxiation" to facilitate rapid review by experts.

[0244] In addition, the present disclosure provides reasoning path tracing, which combines knowledge graphs (Neo4j) or graph neural networks (GNN) to construct case causal reasoning chains, making the causal relationship of model reasoning visual and thus improving interpretability.

[0245] For example, when determining the cause of death in a case, this disclosure can generate a causal path and display the weighted scores of each step of reasoning to enhance the transparency of judicial decisions. To enhance transparency, this disclosure can automatically generate a detailed reasoning report that records each logical step of the reasoning, including the case input data, related cases retrieved by the model, the reasoning chain, attention distribution, and the confidence score of the final decision.

[0246] The training method of the forensic case data analysis model and the case data analysis method provided by the present disclosure focus on in-depth training of forensic data. Among them, the training method of the forensic case data analysis model significantly enhances the model's ability to understand forensic professional terminology, case logic and legal norms, making the analysis results output by the model more in line with the needs of forensic practice, and effectively avoiding the erroneous reasoning caused by insufficient domain knowledge of general large language models.

[0247] Example 2

[0248] like Figure 5 As shown, this embodiment provides a forensic case data analysis method, which includes:

[0249] S51: Obtain target forensic case data;

[0250] S52: inputting target forensic information corresponding to the target forensic case data into the forensic case data analysis model to output target reasoning analysis results corresponding to the target forensic case data;

[0251] The forensic case data analysis model is obtained by using the training method in Example 1.

[0252] The case data analysis method provided by the present invention can greatly reduce the time spent on manually reviewing cases and checking materials, while reducing the conclusion bias caused by differences in manual experience, improving the intelligence level of forensic evidence analysis, and providing forensic practitioners with efficient and stable tools. At the same time, it can also identify the manpower and time costs of judicial appraisal institutions.

[0253] Example 3

[0254] like Figure 6 As shown, this embodiment provides a training system for a forensic case data analysis model, and the training system includes:

[0255] The sample information acquisition module 601 is used to acquire several groups of sample forensic information based on several sample forensic case data;

[0256] Each set of sample forensic information includes several types of sub-sample forensic information, and each type of sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model;

[0257] A model training module 602 is configured to train a preset large language model based on a model fine-tuning strategy corresponding to each set of sample forensic information and each type of sub-sample forensic information included therein, to obtain a forensic case data analysis model;

[0258] Among them, the forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

[0259] In one practicable solution, the training system further includes: a word vector construction module 603;

[0260] The word vector construction module 603 is used to construct a number of forensic medicine-specific word vectors;

[0261] The model training module 602 is also used to train the preset large language model based on the model fine-tuning strategy corresponding to each group of sample forensic information and each type of sub-sample forensic information included, and to use the first preset model to perform word embedding training on the forensic-specific word vector to obtain a forensic case data analysis model.

[0262] In one feasible solution, the first preset model includes a BERT model;

[0263] The preset large language model includes the ChatGLM-6B model.

[0264] In one feasible solution, the subsample forensic information is the labeled question-answer pairs in the forensic case data, and the corresponding model fine-tuning strategy is the supervised fine-tuning strategy;

[0265] The model training module is also used to split the question-answer data into input data and output data according to the question and the corresponding answer;

[0266] Based on the input data and output data, as well as the corresponding supervised fine-tuning strategy, the preset large language model is trained to obtain a forensic case data analysis model;

[0267] The subsample forensic information is the unlabeled forensic data in the forensic case data, and the corresponding model fine-tuning strategy is the self-supervised learning strategy;

[0268] The model training module 602 is also used to convert the unlabeled forensic data into a plurality of token vectors according to the preset processing method;

[0269] Based on several token vectors and corresponding self-supervised learning strategies, the preset large language model is trained to obtain a forensic case data analysis model;

[0270] The subsample forensic information is the forensic case data association information, and the corresponding model fine-tuning strategy is the contrastive learning strategy;

[0271] The model training module 602 is also used to obtain correlation score information between any two pieces of forensic case data correlation information;

[0272] Based on the forensic case data association information and association score information, as well as the corresponding comparative learning strategy, the preset large language model is trained to obtain a forensic case data analysis model.

[0273] In one practicable solution, the training system further includes a data storage module 604, which is configured to store different sample forensic case data in a structured manner in a preset forensic data information database before obtaining a plurality of sets of sample forensic information based on the plurality of sample forensic case data;

[0274] The sample information acquisition module 604 is used to acquire a number of sample forensic case data from a preset forensic data information database to obtain a number of groups of sample forensic information;

[0275] The training system further includes a data preprocessing module 605 , which is configured to, after obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, preprocess the sample forensic case data to obtain the sample forensic information;

[0276] The preprocessing includes at least one of format conversion processing, deduplication processing and anonymization processing.

[0277] In one feasible solution, the data preprocessing module 605 is further configured to perform data enhancement on the sample forensic information based on the generative model to obtain new sample forensic information;

[0278] Among them, the forensic case data analysis model is trained based on new sample forensic information;

[0279] The new sample forensic information is information that meets the preset natural language processing requirements.

[0280] In one practicable solution, the training system further includes a hybrid search strategy module 606, which is used to embed a preset hybrid search strategy into a preset large language model for model training to obtain a forensic case data analysis model;

[0281] Among them, the preset hybrid search strategy includes the best matching 25 algorithm and dense vector retrieval;

[0282] In one feasible solution, the training system further includes a causal chain construction module 607 , which is used to construct a forensic causal reasoning chain based on the knowledge graph and the graph neural network model;

[0283] Embed the forensic causal reasoning chain into a preset large language model for model training to obtain a forensic case data analysis model;

[0284] In one feasible solution, the training system further includes an attention mechanism module 608, which is used to embed a preset attention mechanism into a preset large language model for model training to obtain a forensic case data analysis model;

[0285] Among them, the preset attention mechanism is the self-attention mechanism based on the Transformer structure.

[0286] Since the system embodiments generally correspond to the method embodiments, reference will be made to the description of the method embodiments for relevant details. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components of the units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the disclosed solution.

[0287] Example 4

[0288] like Figure 7 As shown, this embodiment provides a forensic case data analysis system, which includes:

[0289] Target information acquisition module 701, used to acquire target forensic case data information;

[0290] An analysis result reasoning module 702 is used to input the target forensic case data information into the forensic case data analysis model to obtain a target reasoning analysis result corresponding to the target forensic case data information;

[0291] The forensic medicine case data analysis model is obtained using the training system of the forensic medicine case data analysis model according to the third aspect of the present disclosure.

[0292] Since the system embodiments generally correspond to the method embodiments, reference will be made to the description of the method embodiments for relevant details. The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components of the units may or may not be physical units, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the disclosed solution.

[0293] The case data analysis system provided by the present invention can greatly reduce the time spent on manually reviewing cases and checking materials, while reducing the conclusion bias caused by differences in manual experience, improving the intelligence level of forensic evidence analysis, and providing forensic practitioners with efficient and stable tools. At the same time, it can also identify the manpower and time costs of judicial appraisal institutions.

[0294] Example 5

[0295] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method of the above embodiment is implemented. Figure 8 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0296] like Figure 8 As shown, the electronic device 30 may be a general-purpose computing device, such as a server device. Components of the electronic device 30 may include, but are not limited to, the at least one processor 31, the at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0297] The bus 33 includes a data bus, an address bus, and a control bus.

[0298] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0299] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0300] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the method in the above embodiments of the present disclosure.

[0301] The electronic device 30 may also communicate with one or more external devices 34 (e.g., a keyboard, a pointing device, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model generating device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. Figure 8As shown, the network adapter 36 communicates with the other modules of the model-generated device 30 via the bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0302] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0303] Example 6

[0304] The embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the training method of the forensic case data analysis model provided in the above embodiment 1 and / or the forensic case data analysis method provided in the above embodiment 2.

[0305] The readable storage medium may include, but is not limited to, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0306] Example 7

[0307] The presently disclosed embodiment also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the training method of the forensic case data analysis model provided in the above embodiment 1 and / or the forensic case data analysis method provided in the above embodiment 2.

[0308] The program code for executing the computer program product of the present disclosure may be written in any combination of one or more programming languages, and the program code may be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on the remote device.

[0309] While specific embodiments of the present disclosure have been described above, those skilled in the art will appreciate that these are merely illustrative and that the scope of protection of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, and such changes and modifications are intended to fall within the scope of protection of the present disclosure.

Claims

1. A method for training a forensic case data analysis model, characterized in that: The training method comprises: Acquire several groups of sample forensic information based on several sample forensic case data; Each group of sample forensic information includes several types of sub-sample forensic information, and each type of sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model; Training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model; The forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

2. The method for training a forensic case data analysis model according to claim 1, characterized in that: The training method further comprises: Construct several forensic word vectors; The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes: Based on the model fine-tuning strategies corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included, the preset large language model is trained, and the forensic-specific word vector is trained for word embedding using the first preset model to obtain the forensic case data analysis model.

3. The method for training a forensic case data analysis model according to claim 2, characterized in that: The first preset model includes a BERT model; and / or, The preset large language model includes the ChatGLM-6B model.

4. The method for training a forensic case data analysis model according to any one of claims 1 to 3, characterized in that: The subsample forensic information is the labeled question-answer pair data in the forensic case data, and the corresponding model fine-tuning strategy is a supervised fine-tuning strategy; The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes: Splitting the question-answer pair data into input data and output data according to the question and the corresponding answer; Based on the input data and the output data, and corresponding to the supervised fine-tuning strategy, the preset large language model is trained to obtain the forensic case data analysis model; and / or, The subsample forensic information is unlabeled forensic data in the forensic case data, and the corresponding model fine-tuning strategy is a self-supervised learning strategy; The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes: Convert the unlabeled forensic data into a plurality of token vectors using a preset processing method; Based on the plurality of token vectors and the corresponding self-supervised learning strategy, the preset large language model is trained to obtain the forensic case data analysis model; and / or, The subsample forensic information is forensic case data association information, and the corresponding model fine-tuning strategy is a comparative learning strategy; The step of training the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein to obtain the forensic case data analysis model includes: Obtaining correlation score information between any two pieces of forensic case data correlation information; Based on the forensic case data association information and the association score information, and the corresponding comparative learning strategy, the preset large language model is trained to obtain the forensic case data analysis model.

5. The method for training a forensic case data analysis model according to any one of claims 1 to 3, characterized in that: Before the step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, the training method further includes: Storing the different sample forensic case data in a structured manner in a preset forensic data information database; The step of obtaining several groups of sample forensic information based on several sample forensic case data includes: Acquiring a plurality of sample forensic case data from the preset forensic data information database to obtain a plurality of groups of sample forensic information; and / or, After the step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data, the training method further comprises: Preprocessing the sample forensic case data to obtain the sample forensic information; The preprocessing includes at least one of format conversion processing, deduplication processing and anonymization processing.

6. The method for training a forensic case data analysis model according to claim 5, characterized in that: The pre-processing further comprises: Performing data enhancement on the sample forensic information based on a generative model to obtain new sample forensic information; The forensic case data analysis model is trained based on the new sample forensic information; The new sample forensic information is information that meets the preset natural language processing requirements.

7. The method for training a forensic case data analysis model according to any one of claims 1 to 3, characterized in that: The training method further comprises: Embedding a preset hybrid search strategy into the preset large language model for model training to obtain the forensic case data analysis model; The preset hybrid search strategy includes the best match 25 algorithm and dense vector search; and / or, The training method further comprises: Construct a forensic causal reasoning chain based on knowledge graphs and graph neural network models; Embedding the forensic causal reasoning chain into the preset large language model for model training to obtain the forensic case data analysis model; and / or, The training method further comprises: Embedding a preset attention mechanism into the preset large language model for model training to obtain the forensic case data analysis model; Among them, the preset attention mechanism is a self-attention mechanism based on the Transformer structure.

8. A method for analyzing forensic case data, characterized in that: The forensic medicine case data analysis method comprises: Obtaining target forensic case data; Inputting target forensic information corresponding to the target forensic case data into a forensic case data analysis model to output a target reasoning analysis result corresponding to the target forensic case data; Wherein, the forensic case data analysis model is obtained by using the training method described in any one of claims 1-7.

9. A training system for a forensic case data analysis model, characterized in that: The training system comprises: A sample information acquisition module, configured to acquire a plurality of groups of sample forensic information based on a plurality of sample forensic case data; Each group of sample forensic information includes several types of sub-sample forensic information, and each type of sub-sample forensic information corresponds to a model fine-tuning strategy for training a preset large language model; a model training module, configured to train the preset large language model based on the model fine-tuning strategy corresponding to each group of the sample forensic information and each type of the sub-sample forensic information included therein, so as to obtain the forensic case data analysis model; The forensic case data analysis model is used to obtain corresponding target reasoning analysis results based on the input target forensic case data reasoning analysis.

10. A forensic case data analysis system, characterized in that: The forensic medicine case data analysis system includes: Target information acquisition module, used to obtain target forensic case data information; An analysis result reasoning module, configured to input the target forensic case data information into a forensic case data analysis model to obtain a target reasoning analysis result corresponding to the target forensic case data information; The forensic medicine case data analysis model is obtained by using the forensic medicine case data analysis model training system as claimed in claim 9.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, it implements the training method of the forensic case data analysis model described in any one of claims 1 to 7, and / or the forensic case data analysis method described in claim 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the training method of the forensic case data analysis model according to any one of claims 1 to 7, and / or the forensic case data analysis method according to claim 8.

13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the training method of the forensic case data analysis model according to any one of claims 1 to 7, and / or the forensic case data analysis method according to claim 8.

Citation Information

Patent Citations

  • Text representation model training method and device based on context

    CN116502640A

  • Petrochemical production process anomaly diagnosis and optimization method and system integrated with knowledge graph

    CN119668245A

  • Intent detection

    US20230136527A1

  • Text data processing method, text representation method, text clustering method, and device

    WO2025026068A1