Training methods for forensic case data analysis models and case data analysis methods

By training a forensic case data analysis model and combining various fine-tuning strategies and knowledge graphs, the accuracy issues of cause-of-death deduction and injury diagnosis in forensic medicine have been resolved, achieving efficient and intelligent forensic case analysis.

CN120705569BActive Publication Date: 2026-01-06ACADEMY OF FORENSIC SCIENCE
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies in forensic medicine cannot accurately analyze the inference of cause of death, the degree and type of injury, and lack a professional knowledge base, resulting in low analysis efficiency, strong subjectivity, slow knowledge updates and iterations, and a lack of comprehensive analysis and reasoning ability for complex information.

Method used

By employing a model fine-tuning strategy based on sample forensic information, a forensic case data analysis model is trained. Using the BERT model and the ChatGLM-6B model, combined with supervised fine-tuning, self-supervised learning, and comparative learning, forensic-specific word vectors are constructed and embedded into knowledge graphs and causal reasoning chains for forensic case data analysis.

Benefits of technology

It significantly enhances the model's ability to understand forensic terminology and legal norms, improves the accuracy and efficiency of analysis results, reduces the time and bias of manual analysis, and provides an efficient and stable intelligent analysis tool.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705569B_ABST
    Figure CN120705569B_ABST
Patent Text Reader

Abstract

The present disclosure provides a forensic case data analysis model training method and a case data analysis method, wherein the training method comprises: obtaining a plurality of sets of sample forensic information based on a plurality of sample forensic case data; training the preset large language model based on each set of sample forensic information and the model fine-tuning strategy corresponding to each type of sub-sample forensic information included in the sample forensic information, to obtain the forensic case data analysis model; wherein the forensic case data analysis model is used to infer and analyze the corresponding target inference analysis result based on the input target forensic case data. The forensic case data analysis model obtained by the above training method can obtain corresponding case analysis results for different input conditions, improving the case analysis efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In recent years, advancements 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 shown great application potential in many professional fields such as medicine and law.

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

[0004] Currently, case data processing in the field of forensic medicine mainly relies on the accumulation of human experience and traditional data processing methods. Although 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 the entire case and complex information. Furthermore, in 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 matters such as cause of death determination or inference, diagnosis of injury degree and type, clinical assessment, and other legal reasoning. Summary of the Invention

[0005] The technical problem to be solved by this disclosure is to overcome the shortcomings of existing forensic medicine in which it is impossible to accurately analyze the relevant cause of death, degree of injury or disability and type of diagnosis through manual means, and to provide a training method for a forensic case data analysis model and a case data analysis method.

[0006] This disclosure solves the above-mentioned technical problems through the following technical solution:

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

[0008] Several sets of sample forensic information were obtained based on data from several sample forensic cases.

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

[0010] Based on the model fine-tuning strategy corresponding to each group of sample forensic information and each type of sub-sample forensic information, the preset large language model is trained 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.

[0012] Optionally, the training method further includes:

[0013] Construct several forensic-specific word vectors;

[0014] The step of training 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 to obtain the forensic case data analysis model includes:

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

[0016] Optionally, the first preset model includes the 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 dialogue language model that supports both Chinese and English).

[0019] Optionally, the subsample forensic information is the 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 sample forensic information and each type of sub-sample forensic information to obtain the forensic case data analysis model includes:

[0021] The question-and-answer pair data is split 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 the corresponding 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 refers to the 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 sample forensic information and each type of sub-sample forensic information to obtain the forensic case data analysis model includes:

[0026] The unlabeled forensic data is converted into several token vectors (word vectors or token vectors, which convert words, phrases or other language units in the text data into numerical vectors) using the preset processing method.

[0027] Based on several of the aforementioned token vectors and the corresponding self-supervised learning strategies, 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 contrastive learning strategy.

[0030] The step of training 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 to obtain the forensic case data analysis model includes:

[0031] Obtain the correlation score between any two of the aforementioned forensic case data;

[0032] Based on the forensic case data association information, 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 several sets of sample forensic information based on several sample forensic case data, the training method further includes:

[0034] The different sample forensic case data are stored in a structured manner in a pre-set forensic data information database;

[0035] The steps for obtaining several sets of sample forensic information based on several sample forensic case data include:

[0036] Several sample forensic case data are obtained from the preset forensic data information database to obtain several sets of sample forensic information;

[0037] And / or,

[0038] After the step of obtaining several sets of sample forensic information based on several sample forensic case data, the training method further includes:

[0039] The sample forensic case data is preprocessed 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] Data augmentation of the sample forensic information is performed based on a generative model to obtain new sample forensic information;

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

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

[0045] Optionally, the training method further includes:

[0046] The preset hybrid search strategy is embedded 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 matching 25 algorithm and dense vector retrieval;

[0048] And / or,

[0049] The training method also includes:

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

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

[0052] And / or,

[0053] The training method also includes:

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

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

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

[0057] Obtain data from the target forensic cases;

[0058] The target forensic information corresponding to the target forensic case data is input into the forensic case data analysis model to output the target reasoning analysis results corresponding to the target forensic case data;

[0059] 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 this disclosure, a training system for a forensic case data analysis model is provided, the training system comprising:

[0061] The sample information acquisition module is used to acquire several sets of sample forensic information based on several sample forensic case data.

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

[0063] The model training module is 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, 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.

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

[0066] The word vector construction module is used to construct several 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 sample forensic information and each type of sub-sample forensic information, and to perform word embedding training on the forensic-specific word vectors using the first preset model to obtain the forensic case data analysis model.

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

[0069] And / or,

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

[0071] Optionally, the subsample forensic information is the 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 also used to split the question-answer pair data into input data and output data according to the question and the corresponding answer;

[0073] Based on the input data and the output data, and the corresponding 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 refers to the 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 also used to convert the unlabeled forensic data into several token vectors using a preset processing method;

[0077] Based on several of the aforementioned token vectors and the corresponding self-supervised learning strategies, 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 contrastive learning strategy.

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

[0081] Based on the forensic case data association information, 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 includes a data storage module, which is used to store different sample forensic case data in a structured manner into a preset forensic data information database before obtaining several sets of sample forensic information based on several sample forensic case data.

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

[0084] And / or,

[0085] The training system also includes a data preprocessing module, which is used to preprocess the sample forensic case data after obtaining several sets of sample forensic information based on several sample forensic case data, so as to obtain the sample forensic information.

[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 augmentation 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 forensic information from the sample.

[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 matching 25 algorithm and dense vector retrieval;

[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 knowledge graphs and graph neural network models;

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

[0095] And / or,

[0096] The training system also 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] The preset attention mechanism is a self-attention mechanism based on the Transformer structure.

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

[0099] The target information acquisition module is used to acquire target forensic case data.

[0100] The analysis result reasoning module is used to input the target forensic case data information into the forensic case data analysis model to obtain the target reasoning analysis result corresponding to the target forensic case data information;

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

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

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

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

[0105] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.

[0106] The positive and progressive effects of this disclosure are as follows:

[0107] The training method for the forensic case data analysis model and the case data analysis method provided in this disclosure, through in-depth training focused on forensic data, significantly enhance the model's understanding of forensic terminology, case logic, and legal norms. This makes the model's output analysis results more aligned with the needs of forensic practice, effectively avoiding erroneous reasoning caused by insufficient domain knowledge in general-purpose models. The case data analysis method provided in this disclosure greatly reduces the time spent manually reviewing cases and consulting materials, while also reducing conclusion biases caused by differences in human experience. This improves the intelligence level of forensic evidence analysis, providing forensic practitioners with an efficient and stable tool, and also helps to reduce the human and time costs of judicial appraisal institutions. Attached Figure Description

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

[0109] Figure 2 This is a schematic diagram of the training process 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 schematic diagram of the training process when the model fine-tuning strategy provided in Example 1 is a contrastive learning strategy;

[0112] Figure 5 This is a flowchart illustrating the forensic case data analysis method provided in Example 2;

[0113] Figure 6 This is a schematic diagram of the training system for the forensic case data analysis model provided in Example 3;

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

[0115] Figure 8 This is a schematic diagram of the electronic device provided in Example 5. Detailed Implementation

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

[0117] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not be construed as an unnecessary limitation. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.

[0118] Currently, in forensic cause-of-death deductions, the field relies heavily on the experience of senior experts, making it difficult to quickly train a new generation of forensic experts through standardized methods. Furthermore, knowledge in the field of forensic medicine is rapidly updated, and traditional models, which depend on static training datasets, struggle to update and integrate the latest research findings and case information. Manually searching and comparing similar cases is time-consuming and easily influenced by subjective judgments. Existing judicial appraisal systems lack intelligent analysis tools, are unable to perform semantic analysis and reasoning on historical cases, and lack the ability to comprehensively reason about case background, legal requirements, and other factors.

[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 medical case data analysis model is provided. The training method includes:

[0122] S11: Obtain several sets of sample forensic information based on several sample forensic case data; wherein, 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.

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

[0124] Specifically, this involves obtaining autopsy reports, test reports, physical examination records, and research papers from forensic journals from judicial appraisal institutions, and then collecting relevant forensic data based on these. After collecting the relevant forensic data, the data undergoes format conversion, deduplication, standardization, and anonymization to obtain sample forensic information. Furthermore, generative models can be used to generate synthetic data 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, the preset large language model is trained to obtain the forensic case data analysis model; wherein, the forensic case data analysis model is used to obtain the 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 using labeled forensic case data to fine-tune the model, thereby training the model to complete tasks such as cause of death inference, injury classification, and manner of injury;

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

[0129] Contrastive learning refers to training a model to better understand the semantic relationships between different cases by comparing similar and dissimilar cases.

[0130] Furthermore, this embodiment also uses expert-annotated judicial Q&A to fine-tune the model, and embeds knowledge graphs or rule bases in the field of forensic medicine into the model to ensure that the model conforms to forensic standards during the reasoning process. At the same time, the model in this embodiment also introduces continuous learning technology (such as Elastic Weight Consolidation, or EWC) so that the model can continuously absorb new forensic knowledge without forgetting old knowledge, thereby improving the accuracy of the model.

[0131] The pre-set large language model in this embodiment is based on the general LLM (Large Language Model). It is pre-trained using publicly available literature, textbooks, and historical case data in the field of forensic medicine to construct forensic-specific word vectors (such as forensic BERT model embedding). 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 for the forensic case data analysis model and the case data analysis method provided in this disclosure, through in-depth training focused on forensic data, significantly enhance the model's ability to understand forensic terminology, case logic, and legal norms. This makes the model's output analysis results more aligned with the needs of forensic practice and effectively avoids erroneous reasoning caused by insufficient domain knowledge in general-purpose language models.

[0133] In one feasible approach, the training method also includes: constructing several forensic-specific word vectors.

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

[0135] Based on the model fine-tuning strategies corresponding to each group of sample forensic information and each type of sub-sample forensic information, a pre-set large language model is trained, and a first pre-set model is used to train forensic-specific word vectors for word embedding training, so as 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 models mentioned above are merely illustrative examples. This disclosure does not limit the specific types of models. Any model that can achieve the above functions is within the protection scope of this disclosure.

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

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

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

[0141] In one feasible approach, when the forensic information of the subsample is question-answer pairs already labeled in the forensic case data, the corresponding model fine-tuning strategy is a supervised fine-tuning strategy.

[0142] Among these methods, forensic case data can be annotated by experts in the field of forensic medicine, thereby obtaining a number of question-and-answer pairs.

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

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

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

[0146] Specifically, 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 and output data, and the corresponding supervised fine-tuning strategy, the preset large language model is trained to obtain a forensic case data analysis model.

[0148] By setting up a supervised fine-tuning strategy, the model's understanding of knowledge in the field of forensic medicine was enhanced.

[0149] In a feasible scheme, when the forensic information of the subsample is forensic data that is not labeled in the forensic case data, the corresponding model fine-tuning strategy is a self-supervised learning strategy.

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

[0151] S31: Convert unlabeled forensic data into several token vectors using a preset processing method;

[0152] The default processing method is based on a masked language model, which transforms unlabeled forensic data to obtain several token vectors.

[0153] Of course, this 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 also within the scope of protection of this disclosure.

[0154] S32: Based on several token vectors and the corresponding self-supervised learning strategy, a pre-set 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 knowledge in the field of forensic medicine was further enhanced.

[0156] In a feasible solution, when the forensic information of the subsample is related to the data of forensic cases, the corresponding model fine-tuning strategy is a contrastive learning strategy.

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

[0158] S41: Obtain the correlation score between any two forensic case data;

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

[0160] Of course, this disclosure is not limited to obtaining correlation scores between any two forensic case data; other methods may also be used to obtain correlation scores between any two cases.

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

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

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

[0164] During the monitoring and fine-tuning phase, 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, validation and test sets in an 8:1:1 ratio. The classification task is trained using BERT+ classification head, and the F1-score target value is set to be no less than 0.92 to ensure classification accuracy.

[0166] In the self-supervised learning phase, a masked language modeling task was carried out using 1,000 unlabeled identification reports. 15% of the text was randomly masked, and the model was required to predict the masked content in order to improve the model's semantic understanding ability on unlabeled data.

[0167] To further enhance the semantic differentiation ability between cases, a contrastive learning model is introduced to distinguish between similar and dissimilar cases. The SimCSE (Simple Contrastive Sentence Embeddings) framework is used to calculate the 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 irrelevant cases, thereby improving the accuracy of retrieval and inference.

[0168] In one feasible approach, prior to the step of obtaining several sets of sample forensic information based on several sample forensic case data, the training method further includes:

[0169] Different sample forensic case data are stored in a structured manner in a pre-designed forensic data information database;

[0170] The steps for obtaining several sets of sample forensic information based on several sample forensic case data include:

[0171] Several sample forensic case data are obtained from a pre-set forensic data database to obtain several sets of sample forensic information.

[0172] By storing forensic case data from different samples in a structured manner in a data repository, the accuracy and completeness of the data are improved. Furthermore, by defining clear data types and formats, data input errors are reduced, data quality is improved, and thus the accuracy of the model is enhanced.

[0173] Because the forensic data collected comes from historical judicial appraisal reports (including judicial appraisal opinions and judicial inspection reports), and the document formats include .doc, .docx, and .pdf electronic document formats. Judicial appraisal reports contain information such as basic information on the judicial appraisal, case summary, medical history summary, examination process, toxicological analysis, imaging examinations, unconventional examinations, forensic pathological diagnosis, analytical explanations, and appraisal opinions. Following the steps of obtaining several sets of sample forensic information based on several sample forensic case data, the training method also includes:

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

[0175] Preprocessing includes format conversion, deduplication, and anonymization.

[0176] Preprocessing sample forensic case data can significantly improve data quality, thereby enhancing model performance and the accuracy of analysis results.

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

[0178] In one implementation, publicly available tools 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 documents 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 efficiency of data processing can be effectively improved.

[0180] Deduplication refers to removing duplicate data information.

[0181] In one implementation, text similarity is calculated using TF-IDF (Term Frequency-Inverse Document Frequency) and approximate deduplication is performed by combining MinHash+LSH (Local Sensitive Hash), thereby removing redundant cases and standardizing terminology formats (such as damage types, toxicology terms, etc.).

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

[0183] Anonymization refers to the process of anonymizing pre-defined sensitive information within data.

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

[0185] By anonymizing data, 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 approach, preprocessing also includes: data augmentation of the sample forensic information based on a generative model to obtain new sample forensic information;

[0187] Among them, the forensic case data analysis model was 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) combined with EDA (Exploratory Data Analysis) are used to rewrite the data in a variety of ways, generating synthetic forensic data and expanding the training dataset. For example, the original forensic opinion text, "The patient's cause of death may be acute poisoning, and a high concentration of toxin was detected in the blood sample," becomes "The victim's cause of death may be related to poisoning, and blood tests revealed an abnormally high concentration of chemical substances," thus enriching the natural language data.

[0190] Generative models are used to augment sample forensic information, thereby increasing the richness of natural language data, improving data readability, and enhancing model interactivity.

[0191] In a feasible approach, the training method also includes:

[0192] A pre-defined hybrid search strategy is embedded into a pre-defined large language model for model training to obtain a forensic case data analysis model.

[0193] The preset hybrid search strategy includes the best matching 25 algorithm and dense vector retrieval.

[0194] In one embodiment, regarding semantic indexing, this disclosure employs dense vector retrieval technology and combines it with forensic vector databases (FAISS and Chroma DB, both tools for efficient similarity search and vector database management) to construct 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 to quickly locate the most relevant cases during queries. During vectorization, the text is mapped to a high-dimensional embedding space. The model uses the IndexIVFFlat index structure (an inverted file-based index structure) for efficient clustering and searching, setting 100 cluster centers to ensure a balance between retrieval speed and accuracy. Simultaneously, to improve retrieval robustness, a hybrid search strategy combining BM25 (Best Match 25 algorithm) and DenseRetrieval (dense vector retrieval) is employed, enabling the model to consider both term matching and semantic matching, thereby 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 to dynamically obtain relevant information from an external forensic case database, thereby generating answers that are more in line with professional logic and improving the model's accuracy and interpretability.

[0197] In forensic case analysis, traditional large language models often face limitations in knowledge and reasoning ability when dealing with highly specialized and knowledge-intensive tasks. Therefore, in a feasible solution, training methods also include:

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

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

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

[0201] For example, it can deduce a causal chain such as "poison ingestion → liver damage → acute poisoning," improving the scientific rigor and logic of forensic case analysis. GNN uses the GraphSAGE model with a 3-layer structure and 256 hidden layer dimensions to enhance the hierarchical expressiveness of the model's reasoning and improve the accuracy of its predictions.

[0202] In a feasible approach, the training method also includes:

[0203] A pre-defined attention mechanism is embedded into a pre-defined large language model for model training to obtain a forensic case data analysis model;

[0204] The default attention mechanism is a self-attention mechanism based on the Transformer structure.

[0205] An attention mechanism is introduced to dynamically calculate the importance of each part of the input text during the reasoning process and visualize the key case information that the model focuses on. For text input, the model uses a Transformer-based Self-Attention mechanism, highlighting important words through an Attention Heatmap (a visualization tool used to show the distribution of the model's attention when processing input data), enabling forensic experts to intuitively understand the model's focus. For example, in the cause-of-death deduction task, the attention mechanism can highlight high-impact words such as "cyanide poisoning" or "mechanical asphyxiation" for quick expert review, while also improving the model's interpretability.

[0206] The following examples illustrate the implementation principle of the training method for the forensic case data analysis model disclosed in this paper:

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

[0208] 1. Regarding data acquisition and preprocessing

[0209] Data collection is conducted based on historical forensic reports (including forensic opinions and forensic inspection reports) from forensic institutions, medical databases, and publicly available case databases. The documents are in electronic formats including .doc, .docx, and .pdf.

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

[0211] The specific preprocessing steps can be found in the section above on the steps for preprocessing sample forensic case data, and will not be repeated here.

[0212] 2. Pre-training and Domain Adaptation

[0213] First, in the pre-training phase, ChatGLM-6B was selected as the base model. Secondary pre-training was conducted using publicly available literature and historical case data in the field of forensic medicine to improve its adaptability in forensic case analysis. The pre-training data consisted of pre-processed standardized forensic identification reports to ensure the model possessed the necessary professional knowledge background.

[0214] Specifically, the pre-training framework uses Transformers (a deep learning architecture) for model loading and fine-tuning, selecting AdamW 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 term of 0.01. Model training was performed on four Nvidia A100 GPUs (high-performance computing and AI accelerators designed for data centers). The data used included 201,940 structured data points.

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

[0216] The corpus sources included forensic reports, forensic textbooks, and case datasets. During training, the model performed Masked Language Modeling (MLM) and Sentence Relationship Prediction (NSP) tasks to improve text understanding capabilities. The MLM task masked 15% of the text, enabling the model to learn to fill in the missing information, while the NSP task was used to identify the logical relationships in the case text, thereby improving the model's contextual reasoning ability.

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

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

[0219] In the self-supervised learning phase, a masked language modeling (MLM) task was performed using 1000 unlabeled identification reports. 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 semantic differentiation ability between cases, contrastive learning is introduced to train the model to distinguish between similar and dissimilar cases. The SimCSE (Simple Contrastive Sentence Embeddings) framework is used to calculate the semantic similarity between cases, with a temperature parameter set to 0.05, and optimization is performed using contrastive loss. During training, the model learns to maximize the vector distance between semantically similar cases while minimizing the vector distance between irrelevant cases, thereby improving the accuracy of retrieval and inference.

[0221] 3. Enhanced search generation

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

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

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

[0225] Compared to traditional end-to-end generation models, the RAG method allows models to utilize external knowledge bases, improving the reliability and traceability of responses. To ensure the scientific rigor of the generated results, the system employs a controlled text generation method to constrain the output content, ensuring it conforms to forensic terminology standards. It also utilizes a knowledge graph (Neo4j) for factual consistency checks, guaranteeing that the generated conclusions have a sound forensic basis. Furthermore, the system provides a tracing mechanism; each generated response includes the cited case number, source literature, and specific content snippets, ensuring that experts and judicial institutions can trace the source of information, thereby enhancing the credibility of the generated content and its forensic application value.

[0226] The training method for the autopsy injury identification model provided in this disclosure focuses on in-depth training of forensic data. The training method significantly enhances the model's understanding of forensic terminology, case logic, and legal norms, making the model's output analysis results more in line with the needs of forensic practice. It can effectively avoid erroneous reasoning caused by insufficient domain knowledge in general-purpose language models.

[0227] 4. Case Analysis and Reasoning

[0228] The key to analyzing and reasoning in forensic cases lies in semantic understanding based on natural language input from users, combined with retrieval results of case information, to perform causal reasoning and determine the cause of death. This specifically includes the following steps:

[0229] 4.1 Case Semantic Understanding and Information Extraction

[0230] This disclosure employs semantic parsing technology based on forensic-specific word vectors to extract key data from forensic pathology cases. The model uses BERT embeddings for semantic understanding and combines it with SpaCy or Stanford NLP for natural language processing to identify key information such as cause of death, injury type, injury severity, and toxicological data. The pre-trained NER model ensures high-precision information extraction, with an F1-score of 0.92, enabling stable recognition of key medical terms in the text. After processing, the input unstructured forensic report text can extract core content such as "acute poisoning," "liver injury," 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 constructs a knowledge graph using Neo4j to provide a more intuitive display of relationships. JSON data fields include case_id, cause_of_death, injury_type, and toxicology_data, while the knowledge graph models case, injury type, cause of death, and other content as nodes, constructing a complete forensic knowledge network through logical connections. This makes the data not only easy to store but also efficiently retrieved and used for reasoning.

[0232] 4.2 Case Search and Similarity Analysis

[0233] To address the search needs of forensic cases, this disclosure employs dense retrieval technology, combined with the FAISS vector database, to achieve efficient case matching.

[0234] First, the case texts are vectorized using the BERT model to generate 768-dimensional vector features, which are then stored in the FAISS index structure using the IndexIVFFlat index type and 100 cluster centers to improve retrieval efficiency. During queries, the top-10 cases with a similarity greater than 0.85 are selected through cosine similarity calculation to provide a reference for forensic experts.

[0235] Using domain-specific word vectors and semantic parsing techniques, key information in cases (such as cause of death, type (degree) of injury, toxicological data, imaging diagnosis, etc.) is extracted, and unstructured case texts are transformed into structured data (such as JSON or knowledge graphs). By using dense retrieval techniques combined with forensic vector databases (such as FAISS, Chroma DB), efficient case retrieval is achieved, and semantic similarity between cases is calculated through contrastive learning or graph neural networks (GNN).

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

[0237] 4.3 Causal Reasoning and Cause of Death Prediction in the Case

[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 simulate the causal relationship between poison intake, injury type, and cause of death. For example, the invention can deduce a causal chain such as "poison intake → liver damage → acute poisoning," improving the scientific rigor and logic of forensic case analysis. The GNN uses the GraphSAGE model with a 3-layer structure and 256 hidden layer dimensions to enhance the hierarchical expressive power of the 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 part uses the BERT model (outputting a 768-dimensional vector), and the image part uses ResNet-50 (outputting a 2048-dimensional vector). Finally, a Transformer-based fusion model is used for joint reasoning to comprehensively assess the cause of death, such as "acute poisoning, severity of liver damage: severe." This technology ensures that the model can combine data from different modalities for more accurate cause-of-death analysis, thereby improving the intelligence level of forensic analysis.

[0239] 4.4 Addressing the needs of complex case analysis

[0240] A scenario simulation technique based on historical case data is introduced, utilizing GPT-3 to generate cause-of-death scenarios under different poison dosages and injury mechanisms. For example, given a set of historical case data, the model can simulate mild liver damage caused by low-dose poison intake and further infer its possible judicial conclusion. The GPT-3 model uses text-davinci-003, sets the temperature parameter to 0.7, and generates a length of 200 tokens to ensure the diversity and rationality of the generated content.

[0241] To verify the reliability of the simulation results, the invention employs a comparative analysis method, matching the simulation results with real 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 "low-dose poisoning leads to non-fatal poisoning" and generate a hypothesis verification report to support the judgment of forensic experts. Through this mechanism, forensic scenario simulation not only enhances the scientific rigor of case analysis but also provides data support and reference for future case research.

[0242] 5. Model Output Processing

[0243] To enhance the interpretability of the model, this disclosure introduces an attention mechanism that dynamically calculates the importance of each part of the input text during the reasoning process and visualizes the key case information that the model focuses on. For text input, the model uses a Transformer-based self-attention mechanism, highlighting important words through an attention heatmap, enabling forensic experts to intuitively understand the model's focus. For example, in a cause-of-death deduction task, the attention mechanism can highlight high-impact words such as "cyanide poisoning" or "mechanical asphyxiation" for quick expert review.

[0244] In addition, this disclosure provides reasoning path tracing, which combines knowledge graph (Neo4j) or graph neural network (GNN) to construct a causal reasoning chain for a case, making the causal relationship of the model reasoning visible, thereby 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 the reasoning to enhance the transparency of judicial decisions. Regarding enhanced transparency, this disclosure can automatically generate detailed reasoning reports, recording each step of the reasoning logic, including case input data, relevant cases retrieved by the model, the reasoning chain, attention distribution, and the confidence score of the final decision.

[0246] The training method for the forensic case data analysis model and the case data analysis method provided in this disclosure, through in-depth training focused on forensic data, significantly enhance the model's ability to understand forensic terminology, case logic, and legal norms. This makes the analysis results output by the model more in line with the needs of forensic practice and effectively avoids erroneous reasoning caused by insufficient domain knowledge in general-purpose language models.

[0247] Example 2

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

[0249] S51: Obtain data from the target forensic case;

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

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

[0252] The case data analysis method provided in this disclosure can greatly reduce the time spent manually reviewing cases and consulting materials, while also reducing the deviation in conclusions caused by differences in human experience. It can improve the level of intelligence in forensic evidence analysis, provide forensic practitioners with an efficient and stable tool, and also assess the human 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. The training system includes:

[0255] The sample information acquisition module 601 is used to acquire several sets 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 pre-set large language model.

[0257] The model training module 602 is 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, so as to obtain the forensic case data analysis model.

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

[0259] In one feasible implementation, the training system also includes: a word vector construction module 603;

[0260] The word vector construction module 603 is used to construct several forensic-specific word vectors;

[0261] The model training module 602 is also used to train a 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, and to train forensic-specific word vectors using the first preset model to obtain a forensic case data analysis model.

[0262] In a feasible solution, the first pre-defined model includes the BERT model;

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

[0264] In a feasible scheme, the subsample forensic information is the question-answer pair data that has been labeled 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 pair data into input data and output data according to the question and the corresponding answer;

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

[0267] The subsample forensic information consists of unlabeled forensic data from forensic case data, and the corresponding model fine-tuning strategy is a self-supervised learning strategy.

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

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

[0270] The subsample forensic information is the data association information of forensic cases, 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 forensic case data.

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

[0273] In one feasible solution, the training system also includes a data storage module 604, which is used to store different sample forensic case data in a structured manner into a preset forensic data information database before obtaining several sets of sample forensic information based on several sample forensic case data.

[0274] The sample information acquisition module 604 is used to acquire several sample forensic case data from a preset forensic data information database to obtain several sets of sample forensic information.

[0275] The training system also includes a data preprocessing module 605, which is used to preprocess the sample forensic case data after obtaining several sets of sample forensic information based on several sample forensic case data, so as to obtain sample forensic information.

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

[0277] In one feasible embodiment, the data preprocessing module 605 is also used to perform data augmentation on the sample forensic information based on a generative model to obtain new sample forensic information.

[0278] Among them, the forensic case data analysis model was 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 feasible solution, the training system also 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] The preset hybrid search strategy includes the best matching 25 algorithm and dense vector retrieval;

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

[0283] The forensic causal reasoning chain is embedded into a pre-set large language model for model training to obtain a forensic case data analysis model.

[0284] In one feasible solution, the training system also 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] The default attention mechanism is a self-attention mechanism based on the Transformer structure.

[0286] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0287] Example 4

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

[0289] The target information acquisition module 701 is used to acquire target forensic case data information;

[0290] The analysis result reasoning module 702 is used to input the target forensic case data information into the forensic case data analysis model in order to obtain the target reasoning analysis results corresponding to the target forensic case data information;

[0291] The forensic case data analysis model is obtained using the training system of the forensic case data analysis model as described in the third aspect of this disclosure.

[0292] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs.

[0293] The case data analysis system provided in this disclosure can greatly reduce the time spent manually reviewing cases and consulting materials, while also reducing the deviation in conclusions caused by differences in human experience. It can improve the level of intelligence in forensic evidence analysis, provide forensic practitioners with an efficient and stable tool, and also assess the human 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 according to Embodiment 5 of this 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, it implements the methods described in the above embodiments. Figure 8 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

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

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

[0298] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include 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, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

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

[0301] Electronic device 30 can also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, the model-generating device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 36. Figure 8As shown, network adapter 36 communicates with other modules of the model-generated device 30 via bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can 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 (disk array) 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 have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this 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] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the training method for the forensic case data analysis model provided in Embodiment 1 above and / or the forensic case data analysis method provided in Embodiment 2 above.

[0305] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0306] Example 7

[0307] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the training method for the forensic case data analysis model provided in Embodiment 1 above and / or the forensic case data analysis method provided in Embodiment 2 above.

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

[0309] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.

Claims

1. A method for training a forensic case data analysis model, characterized in that, The training method comprises: obtaining a plurality of sets of sample forensic information based on a plurality of sample forensic case data; wherein each set of the sample forensic information comprises a plurality of 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 pre-set large language model; training the pre-set large language model based on each set of the sample forensic information and the model fine-tuning strategy corresponding to each type of the sub-sample forensic information included in the set, to obtain the forensic case data analysis model; wherein the forensic case data analysis model is used to infer and analyze a corresponding target inference analysis result based on input target forensic case data; the model fine-tuning strategy comprises a mixed strategy of a supervised fine-tuning strategy, a self-supervised learning strategy and a contrastive learning strategy; the sub-sample forensic information is the question and answer pair data in the forensic case data that has been labeled, and the corresponding model fine-tuning strategy is the supervised fine-tuning strategy; the step of training the pre-set large language model based on each set of the sample forensic information and the model fine-tuning strategy corresponding to each type of the sub-sample forensic information included in the set, to obtain the forensic case data analysis model, comprises: splitting the question and answer pair data into input data and output data according to the question and the corresponding answer; training the pre-set large language model based on the input data and the output data and the corresponding supervised fine-tuning strategy, to obtain the forensic case data analysis model; the sub-sample forensic information is the forensic data in the forensic case data that has not been labeled, and the corresponding model fine-tuning strategy is the self-supervised learning strategy; the step of training the pre-set large language model based on each set of the sample forensic information and the model fine-tuning strategy corresponding to each type of the sub-sample forensic information included in the set, to obtain the forensic case data analysis model, comprises: converting the unlabeled forensic data into a plurality of Token vectors in a pre-set processing manner; training the pre-set large language model based on a plurality of Token vectors and the corresponding self-supervised learning strategy, to obtain the forensic case data analysis model; the sub-sample forensic information is forensic case data association information, and the corresponding model fine-tuning strategy is a contrastive learning strategy; the step of training the pre-set large language model based on each set of the sample forensic information and the model fine-tuning strategy corresponding to each type of the sub-sample forensic information included in the set, to obtain the forensic case data analysis model, comprises: obtaining association score information between any two forensic case data association information; training the pre-set large language model based on the forensic case data association information and the association score information and the corresponding contrastive learning strategy, to obtain the forensic case data analysis model.

2. The forensic case data analysis model training method according to claim 1, characterized by, The training method further comprises: constructing a plurality of forensic special word vectors; The step of training 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 in the sample forensic information, to obtain the forensic case data analysis model, comprises: Training 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 in the sample forensic information, and performing word embedding training on the forensic special word vector using a first preset model, to obtain the forensic case data analysis model.

3. The forensic case data analysis model training method according to claim 2, characterized by, The first preset model comprises a BERT model. And / or, The preset large language model comprises a ChatGLM-6B model.

4. The method of 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 comprises: Storing different sample forensic case data in a structured manner in a preset forensic data information library; The step of obtaining a plurality of groups of sample forensic information based on a plurality of sample forensic case data comprises: Obtaining a plurality of sample forensic case data from the preset forensic data information library 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 comprises at least one of format conversion processing, de-duplication processing, and anonymization processing.

5. The forensic case data analysis model training method according to claim 4, characterized by, The preprocessing further comprises: Performing data augmentation 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 a preset natural language processing requirement.

6. The method of training a forensic case data analysis model according to any one of claims 1-3, wherein, 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 comprises a best match 25 algorithm and a dense vector retrieval; And / or, The training method further comprises: Building a forensic causal reasoning chain based on a knowledge graph and a graph neural network model; 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; The preset attention mechanism is a self-attention mechanism based on a Transformer structure.

7. A method of forensic case data analysis, characterized by, The forensic 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. The forensic case data analysis model is obtained by using the training method in any one of claims 1-6.

8. A training system of a forensic case data analysis model, characterized by, The training system comprises: a sample information acquisition module configured to acquire a plurality of sets of sample forensic information based on a plurality of sample forensic case data; wherein each set of the sample forensic information comprises a plurality of 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; a model training module configured to train the preset large language model based on each set of the sample forensic information and the model fine-tuning strategy corresponding to each type of the sub-sample forensic information included in the sample forensic information, to obtain the forensic case data analysis model; wherein the forensic case data analysis model is configured to infer and analyze an input target forensic case data to obtain a corresponding target inference analysis result; the model fine-tuning strategy comprises a mixed strategy of a supervised fine-tuning strategy, a self-supervised learning strategy, and a contrastive learning strategy; the sub-sample forensic information is question and answer pair data in the forensic case data that has been labeled, and the corresponding model fine-tuning strategy is the supervised fine-tuning strategy; the model training module is further configured to split the question and answer pair data into input data and output data according to the question and the corresponding answer; the preset large language model is trained based on the input data and the output data and the corresponding supervised fine-tuning strategy, to obtain the forensic case data analysis model; the sub-sample forensic information is forensic data in the forensic case data that has not been labeled, and the corresponding model fine-tuning strategy is the self-supervised learning strategy; the model training module is further configured to convert the un-labeled forensic data into a plurality of Token vectors in a preset processing manner; the preset large language model is trained based on the plurality of Token vectors and the corresponding self-supervised learning strategy, to obtain the forensic case data analysis model; the sub-sample forensic information is forensic case data association information, and the corresponding model fine-tuning strategy is the contrastive learning strategy; the model training module is further configured to acquire association degree score information between any two pieces of the forensic case data association information; the preset large language model is trained based on the forensic case data association information and the association degree score information and the corresponding contrastive learning strategy, to obtain the forensic case data analysis model.

9. A forensic case data analysis system characterized by, The forensic case data analysis system comprises: a target information acquisition module configured to acquire target forensic case data information; an analysis result inference module configured to input the target forensic case data information into a forensic case data analysis model to obtain a target inference analysis result corresponding to the target forensic case data information; wherein the forensic case data analysis model is obtained by using the training system of the forensic case data analysis model in claim 8.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The computer program is executed by the processor to implement the training method of the forensic case data analysis model according to any one of claims 1-6, and / or the forensic case data analysis method according to claim 7.

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

12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the training method of the forensic case data analysis model according to any one of claims 1-6, and / or the forensic case data analysis method according to claim 7.

Citation Information

Patent Citations

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

    CN119668245A

  • Intent detection

    US20230136527A1