Prison risk early warning method and system based on dynamic knowledge graph and behavior vector analysis
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANFU JIANGXI LAB
- Filing Date
- 2026-04-09
- Publication Date
- 2026-08-07
AI Technical Summary
(1)隐性关系识别盲区:依赖人工监控的狱内通信(如暗语、探监密语)和非结构化行为数据(监控视频片段)无法有效关联,导致潜在同伙网络漏检;
(1)隐性关系识别率提升:通过大模型暗语检测+图嵌入聚类,狱内隐蔽同伙网络识别准确率从传统方法的42%提升至89%;
Smart Images

Figure CN122529441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a method and system for early warning of prison risks based on dynamic knowledge graphs and behavioral vector analysis. Background Technology
[0002] The current prison management system has three major flaws: (1) Blind spots in identifying implicit relationships: Prison communications that rely on manual monitoring (such as code words and secret messages during prison visits) and unstructured behavioral data (monitoring video clips) cannot be effectively linked, leading to the failure to detect potential accomplice networks; (2) Inefficient cross-case analysis: Similar modus operandi (such as tool selection and time pattern) scattered in different prisons / regions lacks digital alignment methods, and manual connection of cases is time-consuming and has a high omission rate; (3) Static assessment bias: The recidivism prediction model based on historical crime types cannot dynamically integrate behavioral trajectories during imprisonment (such as violation records and psychological fluctuations), resulting in delayed risk warnings. Summary of the Invention
[0003] To address the problems existing in the current technology, a method and system for early warning of prison risks based on dynamic knowledge graphs and behavioral vector analysis are provided. This method breaks through the bottleneck of mining implicit relationships in unstructured prison data and realizes automated vector matching of cross-case crime patterns. A recidivism risk assessment model that integrates dynamic behavioral trajectories is also constructed.
[0004] The first aspect of this invention proposes a prison risk early warning method based on dynamic knowledge graphs and behavioral vector analysis, comprising the following steps: Multimodal graph construction: By analyzing unstructured text in prison visit recordings and prison letters using a large model, a four-dimensional knowledge graph composed of "personnel-behavior-event-location" is constructed. At the same time, the potential related edges of the four-dimensional knowledge graph are dynamically updated by extracting the semantics of coded messages. Case association: Encode criminals' social network data into low-dimensional vectors, and calculate the cosine similarity of historical case modus operandi through a vector engine to output cross-prison case association suggestions; Dynamic risk assessment: Input the temporal behavior during imprisonment into the LSTM network, combine it with the causal paths in the knowledge graph to generate personalized risk scores and intervention plans.
[0005] In one embodiment of this application, the large model is a language model based on the Transformer architecture, and the large model is pre-trained for domain-adaptive purposes in the context of prison management; wherein the data for the large model pre-training includes at least legal documents, prison conversation records, and criminal psychology reports.
[0006] In one embodiment of this application, the dynamic updating of the potential association edges of the four-dimensional knowledge graph specifically includes: When the large model identifies a new code word or event, it abstracts the event into a temporary node and calculates its association strength with existing entities in the graph. If the association strength exceeds the threshold, it creates a new relation edge in the four-dimensional knowledge graph composed of "person-behavior-event-location" and initializes the weights.
[0007] In one embodiment of this application, the specific process of case association includes: Node2Vec or Graph Attention Network (GAT) is used to encode social network data into low-dimensional vectors while preserving the structural similarity between nodes; The crime method vector is extracted from the characteristics of the crime method using a spatiotemporal trajectory encoder. The Milvus vector engine is used to perform an approximate nearest neighbor search on the crime method vectors. The results are sorted by cosine similarity, and case suggestions with similarity greater than a preset threshold are output.
[0008] In one embodiment of this application, the specific process of the dynamic risk assessment includes: The temporal behavior during imprisonment is fused with causal path features through an LSTM network, and then input into a fully connected layer to output a risk score; the temporal behavior is represented in vector form. If the temporal behavior vector matches a high-risk causal path with a degree exceeding a threshold, the score is improved; if the score exceeds a preset threshold, a high-risk warning is triggered, and the personalized intervention plan corresponding to the path is automatically associated; the personalized intervention plan includes restricting contact with specific prison visitors, increasing the frequency of psychological counseling, and linking with community correction institutions for follow-up.
[0009] In one embodiment of this application, the causal path is automatically mined using a random walk algorithm and includes at least a chain relationship of "crime inducement-behavior-recidivism" to guide the generation of intervention plans.
[0010] The second aspect of this invention proposes an in-prison risk early warning system based on dynamic knowledge graphs and behavioral vector analysis, comprising: The data layer is used to collect and store multi-source heterogeneous data in the prison setting, wherein the multi-source heterogeneous data includes at least: Structured data: inmate files and violation records in the prison management database; semi-structured data: psychological assessment reports; unstructured data: text content of prison visit recordings and in-prison correspondence, and spatiotemporal behavioral fragments in surveillance video logs; The analysis layer, which communicates with the data layer, further includes: The system comprises the following modules: a large-scale model semantic parsing module for identifying coded messages and performing causal reasoning on the multi-source heterogeneous data, outputting semantic parsing results; a dynamic knowledge graph module for storing entities and relationships in a four-dimensional knowledge graph composed of "person-behavior-event-location", and adjusting the edge weights of relationships in real time based on the semantic parsing results; a behavior vector modeling module for encoding the spatiotemporal behavior segments into behavior time-series vectors and mapping criminal social network data into graph embedding vectors; a vector retrieval engine for calculating the cosine similarity of different crime methods in the graph embedding vector space and outputting cross-case concatenation suggestions; and an LSTM risk prediction module for fusing behavior time-series vectors during imprisonment with causal paths in the knowledge graph to generate personalized recidivism risk scores. The application layer is used to provide regulatory personnel with early warnings of accomplice relationships, suggestions for cross-case linkage, and recidivism probability scores based on the output of the analysis layer, and to output personalized intervention plans.
[0011] In one embodiment of this application, the large model semantic parsing module is implemented using a pre-trained language model based on the Transformer architecture, and domain-adaptive pre-training is performed for the special context of prison management; wherein, the training data includes at least a large number of legal documents, prison conversation records, and criminal psychology reports.
[0012] In one embodiment of this application, the calculation process of the cosine similarity includes: encoding social network data into low-dimensional vectors using Node2Vec or graph attention networks to preserve the structural similarity between nodes; extracting the modus operandi vectors from the modus operandi features using a spatiotemporal trajectory encoder; performing an approximate nearest neighbor search on the modus operandi vectors using the Milvus vector engine; and outputting similar case suggestions by ranking them by cosine similarity.
[0013] In one embodiment of this application, the LSTM risk prediction module fuses the temporal vector of behavior during imprisonment with causal path features through an LSTM network, and then inputs it into a fully connected layer to output a risk score. If the temporal behavior vector matches a high-risk causal path with a degree exceeding a threshold, the score is increased. If the score exceeds a preset threshold, a high-risk warning is triggered, and the personalized intervention plan corresponding to the path is automatically associated. The personalized intervention plan includes restricting contact with specific visitors, increasing the frequency of psychological counseling, and linking with community correction institutions for follow-up.
[0014] Compared with existing technologies, the beneficial effects of adopting the above technical solution are as follows: (1) Improved recognition rate of implicit relationships: By using large-scale model code word detection and graph embedding clustering, the accuracy of identifying hidden accomplice networks in prison was increased from 42% to 89% by traditional methods; (2) Efficiency optimization of cross-case analysis: The vector retrieval engine improves the matching speed of similar crime patterns by 20 times (3 days for manual analysis → 2 hours for system analysis), and increases the number of cases discovered by 150%; (3) Accuracy of dynamic risk assessment: The LSTM model that integrates behavioral time-series vectors improves the recidivism prediction score from 0.61 to 0.83, and advances the warning window to 6 months before release from prison. Attached Figure Description
[0015] Figure 1 This is a flowchart of the prison risk early warning method based on dynamic knowledge graph and behavior vector analysis according to an embodiment of this application.
[0016] Figure 2 This is a schematic diagram of an in-prison risk early warning system based on dynamic knowledge graph and behavior vector analysis, according to an embodiment of this application.
[0017] Figure 3 This is a schematic diagram of an electronic device according to an embodiment of this application.
[0018] Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing the embodiments of this application. Detailed Implementation
[0019] The embodiments of this application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar modules or modules having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. Rather, the embodiments of this application include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0020] Example 1 To address the problems of existing prison management systems, this application proposes an in-prison risk early warning method based on dynamic knowledge graphs and behavioral vector analysis. Please refer to [link / reference]. Figure 1 Specifically, it includes the following steps: S101, Construction of multimodal maps.
[0021] Acquire multi-source heterogeneous data in prison settings, wherein the multi-source heterogeneous data includes at least: structured data: inmate files and violation records in the prison management database; semi-structured data: psychological assessment reports; and unstructured data: text content of prison visit recordings and in-prison correspondence, and spatiotemporal behavioral fragments in surveillance video logs. In this embodiment, a large model is used to parse multi-source heterogeneous data and construct a four-dimensional knowledge graph consisting of "people-behavior-event-location". At the same time, the potential related edges of the four-dimensional knowledge graph are dynamically updated by extracting coded semantics.
[0022] In this embodiment, the large model is a pre-trained language model based on the Transformer architecture (JurisBERT), which has been pre-trained in a domain-adaptive manner for the specific context of prison management.
[0023] Specifically, the training data includes massive amounts of texts from fields such as legal documents, prison conversation records, and criminal psychology reports, enabling the large model to grasp the semantics of specific expressions such as "code words" and "slang".
[0024] The large model performs coded language recognition and causal reasoning on multi-source heterogeneous data, outputting semantic parsing results. Entities and relationships are stored in a four-dimensional knowledge graph, and the weights of relationship edges are adjusted in real time based on the semantic parsing results.
[0025] Meanwhile, the large model analyzes the event sequence in the text (such as "A asks B for an item → B violates the rules the next day"), identifies potential "inducement-behavior" causal chains, and outputs them in a structured form as the basis for constructing causal relationship edges in the knowledge graph.
[0026] The dynamic knowledge graph employs an event-triggered incremental update mechanism. The specific process is as follows: When the large model identifies a new coded message or causal event (such as "criminal A mentions 'tools are ready' in a letter"), it abstracts the event into a temporary node and calculates its association strength with existing entities in the graph (such as criminal A and visitor C).
[0027] In this embodiment, the association strength is calculated by a graph neural network (GNN). If the strength exceeds the threshold, a new relation edge (such as "A-Preparation Tool-Event X-Factory") is created in the four-dimensional knowledge graph composed of "person-behavior-event-location" and the weight is initialized.
[0028] It should be noted that in this embodiment, the weights of the relational edges are dynamically adjusted based on the frequency of event occurrence, temporal proximity, and cross-validation of multi-source evidence (such as surveillance video synchronously recording A's journey to the factory). The weight adjustment algorithm employs a time-decay-based reinforcement learning strategy to ensure that recently highly correlated events have higher weights.
[0029] S102, Case Relatedness.
[0030] In this embodiment, graph embedding algorithms or Node2Vec / GAT are used to encode criminal social network data (overlap of visitors, flow of funds) into low-dimensional vectors. The cosine similarity of historical case modus operandi (such as the frequency of use of theft tools) is calculated through the Milvus vector engine, and cross-prison case linkage suggestions are output.
[0031] Specifically, in this embodiment, the criminal social network data comes from structured records in the prison management system, including: ① Visitor overlap: the frequency of visitors that multiple criminals have contact with; ② Fund flow: the flow of funds between criminals is analyzed through prison account transaction records; ③ Spatiotemporal co-occurrence: the frequency of contact between criminals at specific times and places is analyzed through surveillance video logs.
[0032] Furthermore, the calculation process for cosine similarity includes: 1. Use Node2Vec or Graph Attention Network (GAT) to encode social network data into low-dimensional vectors while preserving the structural similarity between nodes.
[0033] 2. Extract the crime method vector from the crime method features (such as the frequency of tool use and the pattern of crime time) through the spatiotemporal trajectory encoder (based on CNN+LSTM).
[0034] 3. Use the Milvus vector engine to perform an approximate nearest neighbor (ANN) search on the crime method vectors, and output Top-K similar case suggestions by ranking them by cosine similarity. In practical applications, a similarity threshold (e.g., 70%) can be set to output only high-confidence concatenation suggestions.
[0035] S103, Dynamic Risk Assessment.
[0036] In this embodiment, the temporal behavior during imprisonment (weekly number of fights, fluctuations in psychological test scores) is input into the LSTM network and combined with the causal paths in the knowledge graph to generate personalized risk scores and intervention plans.
[0037] Specifically, causal paths in the knowledge graph are automatically mined using a random walk algorithm. For example, starting from the "drug use history" node, the algorithm traverses connected "behavior" nodes (such as "illegally obtaining drugs") and "outcome" nodes (such as "re-offending") in the graph to generate a typical path of "drug use history → illegal behavior → re-offending". The path confidence is determined by the frequency of occurrence in historical cases.
[0038] The temporal behavior and causal path features during imprisonment are fused using an LSTM network, and then input into a fully connected layer to output a risk score (0-1 points). It should be noted that the temporal behavior is represented in vector form.
[0039] This embodiment provides specific scoring rules. If the matching degree between the behavior vector and a certain high-risk causal path exceeds a threshold, the score is significantly improved; if the score exceeds 0.7, a high-risk warning is triggered, and the personalized intervention plan corresponding to that path is automatically associated. In one embodiment, the personalized intervention plan includes restricting contact with specific visitors, increasing the frequency of psychological counseling, and coordinating with community correction institutions for follow-up.
[0040] In practical applications, a rule engine can be configured to match a predefined library of intervention strategies based on the type of risk. For example, if the path includes "psychological fluctuations → violent tendencies", then "increase the frequency of psychological counseling" will be triggered; if the path involves "social relationship risks after release from prison", then "link up with community correction institutions for follow-up" will be triggered.
[0041] The method of this invention breaks through the bottleneck of implicit relationship mining in unstructured prison data, realizes automated vector matching of cross-case crime patterns, and constructs a recidivism risk assessment model that integrates dynamic behavioral trajectories.
[0042] Example 2 Please refer to Figure 2 This embodiment proposes an in-prison risk early warning system 200 based on dynamic knowledge graph and behavior vector analysis, including a data layer 201, an analysis layer 202 and an application layer 203.
[0043] Specifically, data layer 201 is used to collect and store multi-source heterogeneous data in the prison setting.
[0044] The multi-source heterogeneous data includes at least: structured data: inmate files and violation records in the prison management database; semi-structured data: psychological assessment reports; and unstructured data: the text content of prison visit recordings and in-prison correspondence, and spatiotemporal behavioral fragments in surveillance video logs. Analysis layer 202, which communicates with the data layer, and further includes: The large-scale model semantic parsing module is used to perform code word recognition and causal inference on the multi-source heterogeneous data, and output semantic parsing results. In this embodiment, the large-scale model semantic parsing module is implemented using a pre-trained language model (JurisBERT) based on the Transformer architecture, and also performs domain-adaptive pre-training for the special context of prison management. The training data includes massive amounts of texts from legal documents, prison conversation records, criminal psychology reports, etc., enabling the large-scale model to master the semantics of specific expressions such as "code words" and "slang".
[0045] The dynamic knowledge graph module stores entities and relationships in a four-dimensional knowledge graph of "person-behavior-event-location" and adjusts the weights of relation edges in real time based on the semantic parsing results. Specifically, when the large model identifies a new coded message or causal event (such as "criminal A mentions 'tools are ready' in a letter"), it abstracts the event as a temporary node and calculates its association strength with existing entities in the graph (such as criminal A and visitor C). In this embodiment, the association strength is calculated using a graph neural network (GNN). If the strength exceeds a threshold, a new relation edge is created in the four-dimensional knowledge graph composed of "person-behavior-event-location" (such as "A-preparing tools-event X-factory"), and the weights are initialized.
[0046] The behavior vector modeling module is used to encode the spatiotemporal behavior segments into behavior time-series vectors and map the criminal social network data into graph embedding vectors. The criminal social network data originates from structured records in the prison management system, including: ① Visitor overlap: statistically analyzing the frequency of visitors shared by multiple inmates; ② Fund flow: analyzing fund transfers between inmates through prison account transaction records; ③ Spatiotemporal co-occurrence: analyzing the frequency of contact between inmates at specific times and locations through surveillance video logs.
[0047] A vector retrieval engine is used to calculate the cosine similarity of different crime methods in the graph embedding vector space and output cross-case concatenation suggestions. The cosine similarity calculation process includes: 1. Encoding social network data into low-dimensional vectors using Node2Vec or Graph Attention Network (GAT) to preserve the structural similarity between nodes. 2. Extracting crime method vectors from crime method features (such as tool usage frequency and crime time patterns) using a spatiotemporal trajectory encoder (based on CNN+LSTM). 3. Performing an approximate nearest neighbor (ANN) search on the crime method vectors using the Milvus vector engine, ranking them by cosine similarity, and outputting Top-K similar case suggestions. In practical applications, a similarity threshold (e.g., 70%) can be set to output only high-confidence concatenation suggestions.
[0048] The LSTM risk prediction module integrates temporal vectors of behavior during imprisonment with the "crime trigger-behavior-recidivism" causal path in a knowledge graph to generate a personalized recidivism risk score. The LSTM network fuses the temporal vectors of behavior during imprisonment with causal path features, then inputs them into a fully connected layer to output a risk score (0-1). If the matching degree between the behavior vector and a high-risk causal path exceeds a threshold, the score is significantly improved; if the score exceeds 0.7, a high-risk warning is triggered, and the corresponding personalized intervention plan is automatically associated. In one embodiment, the personalized intervention plan includes restricting contact with specific visitors, increasing the frequency of psychological counseling, and coordinating with community corrections agencies for follow-up.
[0049] Application layer 203 is used to provide regulatory personnel with warnings of accomplice relationships, suggestions for cross-case linkage, and recidivism probability scores based on the output results of the analysis layer, and to output personalized intervention plans.
[0050] To verify the effectiveness of the present invention, a pilot program was deployed in a provincial prison administration bureau, collecting data from 5,000 inmates from 2019 to 2023 for testing. (1) Identification and verification of implicit relationships: Traditional manual audits uncovered 42 cases of hidden accomplice networks (baseline). Using this invention, 78 cases of gang networks were automatically identified. After review by prison guards, 69 of these cases were confirmed to be valid, increasing the accuracy rate to 89% (69 / 78).
[0051] Key data: The system discovered a cross-prison drug trafficking network involving five inmates from three prisons by identifying code words (such as "clean" referring to drugs) and analyzing fund flows.
[0052] (2) Validation of cross-case analysis efficiency: The average time to manually connect similar cases was 3 days per case, and a total of 15 connected cases were discovered. This invention uses a vector engine to complete similarity calculations for all historical cases (100,000 cases) within 2 hours, outputting 38 connection suggestions, of which 29 were confirmed to be effective, improving efficiency by 20 times and increasing the number of discoveries by 150%.
[0053] (3) Dynamic risk assessment verification: Using ROC curve comparison tests: the traditional model (based on crime type) has an F1 score of 0.61; The LSTM model of this invention achieves an F1 score of 0.83 on the test set, and the warning window is advanced to 6 months before release. For example, if a criminal exhibits abnormal behavior 4 months before release (e.g., a 300% increase in weekly borrowing of violent books), the system provides an early warning of the risk of "retaliatory violence," and after intervention, recidivism is successfully avoided.
[0054] Please refer to Figure 3An electronic device 300 according to an embodiment of this application includes a memory 301 and a processor 302. The memory 301 stores a computer program that can be loaded by the processor 302 and executed corresponding to the aforementioned prison risk warning method based on dynamic knowledge graph and behavior vector analysis. It should be noted that the electronic device also has a display screen for displaying a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen is a touch screen, it also has the ability to collect touch signals on or above the surface of the display screen. The touch signals can be input to the processor as control signals for processing. In this case, the display screen can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, the display screen can be a single screen, the front panel of the electronic device; in other embodiments, there can be at least two screens, respectively disposed on different surfaces of the electronic device or in a folded design; in still other embodiments, the display screen can be a flexible screen, disposed on a curved surface or folded surface of the electronic device. Furthermore, the display screen can also be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. The display screen can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0055] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0056] It should be noted that, Figure 4 The computer system 400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0057] like Figure 4 As shown, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 402 or programs loaded from storage portion 408 into Random Access Memory (RAM) 403, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 403. The CPU 401, ROM 402, and RAM 403 are interconnected via bus 404. An Input / Output (I / O) interface 405 is also connected to bus 404.
[0058] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0059] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs various functions defined in the system of this application.
[0060] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0061] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0062] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0063] In another aspect, this application also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the prison risk warning method based on dynamic knowledge graph and behavior vector analysis described in the above embodiments.
[0064] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to implement the prison risk warning method based on dynamic knowledge graph and behavior vector analysis described in the above embodiments.
[0065] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0066] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.
[0067] For those skilled in the art, the specific meanings of the above terms in this invention can be understood according to the specific circumstances; the accompanying drawings in the embodiments are used to clearly and completely describe the technical solutions in the embodiments of this invention. Obviously, the described embodiments are some embodiments of this invention, but not all embodiments. Generally, the components of the embodiments of this invention described and shown in the accompanying drawings can be arranged and designed in various different configurations.
[0068] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis, characterized in that, Includes the following steps: Multimodal graph construction: By analyzing unstructured text in prison visit recordings and prison letters using a large model, a four-dimensional knowledge graph composed of people, behaviors, events, and locations is constructed. At the same time, the potential association edges of the four-dimensional knowledge graph are dynamically updated by extracting the semantics of coded messages. Case association: Encode criminals' social network data into low-dimensional vectors, and calculate the cosine similarity of historical case modus operandi through a vector engine to output cross-prison case association suggestions; Dynamic risk assessment: Input the temporal behavior during imprisonment into the LSTM network, combine it with the causal paths in the knowledge graph to generate personalized risk scores and intervention plans.
2. The prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis according to claim 1, characterized in that, The large model is a language model based on the Transformer architecture. The large model is pre-trained for domain-adaptive purposes in the context of prison management. The pre-training data for the large model includes at least legal documents, prison conversation records, and criminal psychology reports.
3. The prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis according to claim 1 or 2, characterized in that, The dynamic updating of the potential association edges of the four-dimensional knowledge graph specifically includes: When the large model identifies a new code word or event, it abstracts the event into a temporary node and calculates its association strength with existing entities in the graph. If the association strength exceeds the threshold, it creates a new relation edge in the four-dimensional knowledge graph composed of people, behaviors, events, and locations, and initializes the weights.
4. The prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis according to claim 1, characterized in that, The specific process of linking the cases includes: Node2Vec or graph attention networks are used to encode social network data into low-dimensional vectors while preserving the structural similarity between nodes; The crime method vector is extracted from the characteristics of the crime method using a spatiotemporal trajectory encoder. The Milvus vector engine is used to perform an approximate nearest neighbor search on the crime method vectors. The results are sorted by cosine similarity, and case suggestions with similarity greater than a preset threshold are output.
5. The prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis according to claim 1, characterized in that, The specific process of the dynamic risk assessment includes: The temporal behavior during imprisonment is fused with causal path features through an LSTM network, and then input into a fully connected layer to output a risk score; the temporal behavior is represented in vector form. If the temporal behavior vector matches a high-risk causal path with a degree exceeding a threshold, the score is improved; if the score exceeds a preset threshold, a high-risk warning is triggered, and the personalized intervention plan corresponding to the path is automatically associated; the personalized intervention plan includes restricting contact with prison visitors, increasing the frequency of psychological counseling, and linking with community correction institutions for follow-up.
6. The prison risk early warning method based on dynamic knowledge graph and behavioral vector analysis according to claim 5, characterized in that, The causal path is automatically mined using a random walk algorithm and includes at least a chain relationship of "crime inducement - behavior - recidivism" to guide the generation of intervention plans.
7. A prison risk early warning system based on dynamic knowledge graph and behavioral vector analysis, characterized in that, include: The data layer is used to collect and store multi-source heterogeneous data in the prison setting, wherein the multi-source heterogeneous data includes at least: Structured data: inmate files and violation records in the prison management database; semi-structured data: psychological assessment reports; unstructured data: text content of prison visit recordings and in-prison correspondence, and spatiotemporal behavioral fragments in surveillance video logs; The analysis layer, which communicates with the data layer, further includes: The system includes a large-scale model semantic parsing module for identifying coded messages and performing causal reasoning on the multi-source heterogeneous data, outputting semantic parsing results; a dynamic knowledge graph module for storing entities and relationships in a four-dimensional knowledge graph composed of people, behaviors, events, and locations, and adjusting the edge weights of relationships in real time based on the semantic parsing results; a behavior vector modeling module for encoding the spatiotemporal behavior segments into behavior time-series vectors and mapping criminal social network data into graph embedding vectors; a vector retrieval engine for calculating the cosine similarity of different crime methods in the graph embedding vector space and outputting cross-case concatenation suggestions; and an LSTM risk prediction module for fusing behavior time-series vectors during imprisonment with causal paths in the knowledge graph to generate personalized recidivism risk scores. The application layer is used to provide regulatory personnel with early warnings of accomplice relationships, suggestions for cross-case linkage, and recidivism probability scores based on the output of the analysis layer, and to output personalized intervention plans.
8. The prison risk early warning system based on dynamic knowledge graph and behavioral vector analysis according to claim 7, characterized in that, The large model semantic parsing module is implemented using a pre-trained language model based on the Transformer architecture, and domain-adaptive pre-training is performed for the special context of prison management; the training data includes at least a large number of legal documents, prison conversation records, and criminal psychology reports.
9. The prison risk early warning system based on dynamic knowledge graph and behavioral vector analysis according to claim 7, characterized in that, The calculation process of cosine similarity includes: encoding social network data into low-dimensional vectors using Node2Vec or graph attention networks to preserve the structural similarity between nodes; extracting crime method vectors from crime method features using a spatiotemporal trajectory encoder; performing an approximate nearest neighbor search on the crime method vectors using the Milvus vector engine; and outputting similar case suggestions by ranking them by cosine similarity.
10. The prison risk early warning system based on dynamic knowledge graph and behavioral vector analysis according to claim 7, characterized in that, In the LSTM risk prediction module, the temporal vector of behavior during imprisonment is fused with causal path features through the LSTM network, and then input into the fully connected layer to output a risk score. If the temporal behavior vector matches a high-risk causal path with a degree exceeding a threshold, the score is improved; If the score exceeds the preset threshold, a high-risk warning is triggered, and the corresponding personalized intervention plan is automatically associated with the path. The personalized intervention plan includes restricting contact with prison visitors, increasing the frequency of psychological counseling, and linking with community correction institutions for follow-up.