Chat record crime element automatic labeling method based on natural language processing

By using natural language processing technology, combined with multilingual coding and hybrid reasoning, the system achieves efficient, accurate annotation and standardized export of criminal elements from chat logs, solving the problem of multi-format and multilingual data processing in existing technologies and improving the efficiency and accuracy of judicial applications.

CN121562604APending Publication Date: 2026-02-24SHANGHAI JUYIN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511654825.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-02-24

Smart Images

  • Figure CN121562604A_ABST
    Figure CN121562604A_ABST
Patent Text Reader

Abstract

The invention discloses a chat record crime element automatic labeling method based on natural language processing, and relates to the technical field of electronic data intelligent analysis, and the method comprises the following specific steps: sequentially carrying out data preprocessing to analyze multi-platform data and uniformly encode, carrying out semantic analysis to identify crime intentions and entities, and carrying out entity association reasoning on crime elements; and marking elements by using a structured label, and finally carrying out risk scoring and generating a judicial analysis report so as to form a complete crime element analysis process. According to the method, multi-language processing, dynamic weight and hybrid reasoning technologies are integrated, multi-platform data are compatible, the multi-language analysis problem is solved, the criminal entity recognition precision is improved, and the labeling efficiency and accuracy are greatly improved; meanwhile, a full-link judicial system is constructed, crime elements are standardized, electronic evidence export is supported, case mastering is assisted through risk scoring and multi-dimensional reports, a rule base is dynamically updated to adapt to new crimes, the working intensity of judicial personnel is reduced, and reliable support is provided for network crime attack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent analysis technology for electronic data, specifically a method for automatically labeling criminal elements in chat logs based on natural language processing. Background Technology

[0002] With the widespread use of instant messaging tools, chat logs have become crucial electronic evidence in cybercrime cases. The information they contain, such as identity, behavior, and conversation scripts, is key to identifying elements of a crime. Current mainstream instant messaging platforms use diverse data formats, including encrypted database files, binary logs, and text backups. Furthermore, the text content often contains monolingual, bilingual, or mixed languages, requiring technical analysis to extract core information. Meanwhile, advancements in natural language processing technology in entity recognition and semantic analysis have made automated chat log processing possible. However, how to integrate this with the judicial requirements for crime element annotation to achieve accurate and efficient element extraction and determination has become an important research direction in the current judicial technology field.

[0003] Traditional chat log crime element annotation relies heavily on manual work, which is not only time-consuming and labor-intensive but also susceptible to errors due to the varying levels of expertise among annotators, making it difficult to meet the processing needs of massive chat data. Some automated annotation methods only support single platforms or single-language text, failing to adapt to complex data scenarios involving multiple formats and languages. Furthermore, they often employ a single rule base or a single deep learning model. The former struggles to handle the flexible language used in new types of crimes, while the latter lacks the rigid constraints of judicial rules, resulting in low entity recognition accuracy and insufficient confidence in determining crime elements. In addition, the annotation results from traditional methods are often in non-standardized formats, requiring secondary processing to meet the requirements of judicial electronic evidence, further increasing the workload of judicial personnel. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide an automatic annotation method for criminal elements in chat logs based on natural language processing. This method analyzes multi-platform data through data preprocessing and unifies the encoding, accurately identifies criminal entities using dynamic weight formulas and dedicated entity recognition models, and determines the type of criminal elements by combining dependency parsing and hybrid reasoning. This method transforms elements into standardized labels, supports the export of electronic evidence, and generates risk scores and multi-dimensional judicial analysis reports. It integrates multi-language processing and hybrid reasoning technologies, is compatible with multi-format data, improves annotation efficiency and accuracy, and provides reliable technical support for combating cybercrime.

[0005] To solve the above-mentioned technical problems, this invention provides the following technical solution: an automatic annotation method for criminal elements in chat logs based on natural language processing, the specific steps of which are as follows: Data preprocessing: For chat data formats of mainstream instant messaging platforms, the text content, sending time, sender and recipient identifiers, and attachment association information are parsed and extracted; a multilingual pre-trained model is used to unify the encoding of monolingual, bilingual, or minority language text; meaningless symbols, redundant information, and system notifications are filtered out, and the core text is retained; Semantic parsing and entity recognition: Set a context window, parse the core text through a conversational pre-trained model, and identify criminal intent and confidence level; calculate weights using a dynamic weight formula for criminal elements, call a crime-specific named entity recognition model with entity-context crime association loss function, extract identity, behavior, and speech entities, and record their type, location, and confidence level; Entity association and element reasoning: The syntactic structure of text containing criminal entities is parsed using dependency parsing tools to identify grammatical relationships between entities and exclude non-criminal associations; combined with semantic intent and entity information, the criminal element reasoning rule base and deep learning reasoning model are invoked, and the criminal elements and types are determined through a hybrid reasoning confidence fusion formula; Structured tagging: Converts confirmed crime elements into standardized tags containing basic information, crime type, crime entity, and related relationships; tags are bound to core text through original text IDs, and can be exported as a standard format for judicial electronic evidence; Risk scoring and judicial analysis: Based on the dynamic weights of crime elements and the normalized values ​​of elements, a risk score is calculated using the crime risk scoring formula; combined with the score and standardized labels, a judicial analysis report is generated that includes a risk overview, distribution of crime types, a core entity relationship map, and high-risk text fragments.

[0006] Furthermore, the multi-platform data parsing process in the data preprocessing step includes: decrypting encrypted database files, binary log files, and text backup files generated by mainstream instant messaging platforms using decryption algorithms that conform to the technical specifications for electronic data recovery and verification; reading the data structure using corresponding format parsing tools; extracting text content, sending timestamps, sender and recipient identification, attachment storage path, and metadata; and extracting fields that include at least text content, time, and sender / recipient identification fields.

[0007] Furthermore, the multilingual encoding process in the data preprocessing step includes: segmenting texts in different minority languages ​​using dedicated word segmentation tools for those languages; constructing a dedicated lookup table for criminal terminology in the minority languages; first, matching and converting texts using this lookup table; and inputting unmatched text fragments into a multilingual pre-trained model for translation and conversion to form standardized text.

[0008] Furthermore, in the semantic parsing and entity recognition steps, the formula for calculating the dynamic weights of crime elements is as follows: in: For the first Dynamic weights of each crime element; Its basic weights were determined by judicial professionals and natural language processing technicians using the analytic hierarchy process. The total number of identified and confirmed criminal elements in a single chat message; , Different criminal elements identified in a single chat text; For the first The elements of the crime and the first The mutual information between criminal elements is calculated based on the co-occurrence matrix of criminal elements, which is constructed from chat log samples of historical criminal cases. For the first The elements of the crime and the first The semantic similarity between individual crime elements, which is determined by... and The corresponding text description is input into the BERT pre-trained model to extract semantic vectors, and then the cosine similarity between the two semantic vectors is calculated.

[0009] Furthermore, in the semantic parsing and entity recognition steps, the entity-context crime association loss function is: The total loss function of the crime-specific named entity recognition model is: in, For entity-context crime-related losses; This represents the total number of entity tokens in a single chat message; For the first Attention weights for each entity token; For the first The entity corresponding to each entity token; For the first individual entities The degree of contribution to crime; For the first individual entities With crime context vector Semantic similarity between them; For the first individual entities Compared with normal context vector Semantic similarity between them; The total loss for the crime-specific named entity recognition model; Cross-entropy loss; These are the weighting coefficients.

[0010] Furthermore, the dependency syntactic analysis process of the entity association and element reasoning steps only extracts five core syntactic relations: subject-predicate relation, verb-object relation, preposition relation, coordinate relation, and attribute relation. During the analysis process, non-core syntactic relations such as adjectives modifying nouns and adverbs modifying verbs are excluded.

[0011] Furthermore, the formula for calculating the confidence fusion of hybrid reasoning in the entity association and element reasoning steps is as follows: The formula for calculating the crime risk score is as follows: in, The final confidence level for mixed reasoning; The dynamic fusion coefficient; The degree of matching for the rule base for inferring crime elements; The confidence level of the deep learning inference model; This is the adjustment coefficient; Assess crime risk. The total number of identified and confirmed criminal elements in a single chat message; For the first Dynamic weights of each crime element; For the first Elements of a crime The normalized value; The threshold for crime risk scoring.

[0012] Furthermore, in the entity association and element reasoning steps, the management process of the crime element reasoning rule base includes a dynamic update and version management mechanism: when adding or modifying a rule, the identity information of the person making the modification, the modification time, the specific content of the rule, the type of criminal case to which the rule applies, and a unique rule base version number is generated; after the rule base version is updated, 10% of the samples in the historical labeled data are selected for re-reasoning verification, and the verification accuracy is calculated. If the verification accuracy is greater than or equal to 93%, the version is confirmed to be effective; if the verification accuracy is less than 93%, it is rolled back to the previous effective version.

[0013] Furthermore, the input data of the deep learning inference model consists of core text processed by the data preprocessing step, and criminal entities and their associated information extracted by the semantic parsing and entity recognition steps; the training data of the model comes from chat log annotation data in historical criminal cases; in the entity association and element inference steps, the model works in conjunction with the criminal element inference rule base to jointly participate in the criminal element determination process and output the relevant results of various criminal elements corresponding to the text to be determined. These results are used to fuse and calculate the matching degree results with the criminal element inference rule base.

[0014] Furthermore, in the risk scoring and judicial analysis steps, the normalized values ​​of the elements... For crime elements related to transaction amount, piecewise linear interpolation is used for calculation. Specifically, when the transaction amount is less than or equal to 10,000 yuan, When the transaction amount is greater than 10,000 yuan and less than or equal to 100,000 yuan, When the transaction amount is greater than 100,000 yuan and less than or equal to 500,000 yuan, When the transaction amount exceeds 500,000 yuan, .

[0015] Compared with existing technologies, this method for automatically labeling criminal elements in chat logs based on natural language processing has the following advantages: I. This invention breaks through the limitations of traditional annotation techniques by innovatively integrating multilingual processing, dynamic weight calculation, and hybrid reasoning technologies. It is compatible with multi-platform and multi-format data, solving the challenges of parsing monolingual, bilingual, and minority language texts; it improves the accuracy of criminal entity identification through dynamic weight formulas for criminal elements and a dedicated entity recognition loss function; and it employs a hybrid reasoning approach combining rule bases and deep learning models with dynamic weight adjustment, balancing constraint and adaptability, significantly improving the efficiency and accuracy of criminal element annotation in chat logs, laying a technological foundation for subsequent judicial applications.

[0016] Second, this invention enhances the practical judicial value of the annotation results by constructing a full-link system that aligns with judicial procedures. It transforms criminal elements into standardized tags and supports the export of judicial electronic evidence formats, achieving seamless integration with the evidence collection process. Through risk scoring and multi-dimensional judicial analysis reports, it assists in quickly grasping the key aspects of a case. The dynamic update mechanism of the rule base adapts to new types of crimes, effectively reducing the workload of judicial personnel, improving case handling efficiency, and providing reliable technical support for combating cybercrime.

[0017] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0019] Figure 1 A flowchart of a method for automatically annotating criminal elements in chat logs based on natural language processing; Figure 2This is a framework diagram for an automatic annotation method of criminal elements in chat logs based on natural language processing. Detailed Implementation

[0020] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0021] Example 1: Automatic Annotation and Data Preprocessing of Drug-Related Transaction Chat Logs: For encrypted database files and text backup files generated by a mainstream instant messaging platform, a decryption algorithm conforming to electronic data recovery and verification technical specifications is used for decryption. The data structure is read using the platform's corresponding format parsing tool, extracting the text content, sending timestamp, sender / receiver identification, attachment storage path, and metadata for each chat log. This ensures that the extracted fields include at least text content, time, and sender / receiver identification. This process can completely obtain key basic information from the chat logs, providing comprehensive data support for subsequent criminal element analysis. If the chat logs contain text mixed with Chinese and other languages, a dedicated word segmentation tool for that language is used to segment the text. Then, a pre-constructed lookup table of criminal terms for that language is used to match and convert the segmented text. For unmatched text fragments, they are input into a multilingual pre-trained model for translation and conversion, forming standardized text. This effectively solves the problem of inconsistent encoding in multilingual text, avoiding deviations in subsequent semantic analysis and entity recognition due to language differences. Subsequently, meaningless symbols, redundant information, and system notifications are filtered from the text, retaining only the core text relevant to the communication between the two parties. By removing interfering information, the efficiency and accuracy of subsequent processing steps can be significantly improved, allowing the model to focus more on valuable text content. Semantic parsing and entity recognition: A context window is set, and the pre-processed core text is input into the conversational pre-trained model. The model parses the criminal intent contained in the core text and determines the confidence level of this criminal intent. This step can initially determine whether the chat content has a tendency to involve drug transactions, pointing the way for subsequent entity recognition. The crime-specific named entity recognition model is called. First, the weight of each potential criminal element is calculated using the dynamic weight formula of criminal elements. This formula can dynamically adjust the importance of each element based on the correlation and semantic similarity between criminal elements, allowing the model to prioritize elements that are more critical to the determination of drug transactions. The dynamic weight calculation formula for criminal elements is as follows: in: For the first Dynamic weights of each crime element; Its basic weight; The total number of identified and confirmed criminal elements in a single chat message; , Different criminal elements identified in a single chat text; For the first The elements of the crime and the first Mutual information between elements of a crime; For the first The elements of the crime and the first The semantic similarity between individual crime elements; combined with the entity-context crime association loss function, the entity-context crime association loss function is: The total loss function of the crime-specific named entity recognition model is: in, For entity-context crime-related losses; This represents the total number of entity tokens in a single chat message; For the first Attention weights for each entity token; For the first The entity corresponding to each entity token; For the first individual entities The degree of contribution to crime; For the first individual entities With crime context vector Semantic similarity between them; For the first Individual entity and normal context vector Semantic similarity between them; The total loss for the crime-specific named entity recognition model; Cross-entropy loss; This is a weighting coefficient; this function strengthens the correlation between entities and the crime context, effectively distinguishes crime-related entities from normal social entities, accurately extracts identity entities, behavioral entities, and verbal entities from the core text, and records the type, location, and recognition confidence of these entities, providing accurate entity data for subsequent entity association and element reasoning, such as... Figure 1 As shown.

[0022] Entity association and element reasoning: Dependency parsing tools are used to analyze the syntactic structure of core texts containing criminal entities. Only five types of core syntactic relations are extracted: subject-predicate, verb-object, preposition, coordinate, and attribute relations. During the analysis, non-core syntactic relations such as adjectives modifying nouns and adverbs modifying verbs are excluded. This reduces the interference of irrelevant syntactic relations on entity association analysis, accurately sorts out the grammatical logic between entities, and thus excludes combinations of entities without criminal association. Combining the previously analyzed criminal intent and extracted entity information, a crime element reasoning rule base and a deep learning reasoning model are invoked. The input data for the deep learning reasoning model consists of preprocessed core text and criminal entities and their associated information extracted through semantic parsing and entity recognition. Furthermore, the model's training data comes from labeled chat logs in historical drug-related transaction cases, ensuring the model can learn the characteristic patterns of drug-related transactions based on real case data. A hybrid reasoning confidence fusion formula is used to fuse the matching results of the crime element reasoning rule base and the confidence results of the deep learning reasoning model. This formula dynamically adjusts the weights of the rule base and model results, balancing the rigor of the rules with the flexibility of the model. Ultimately, it accurately determines the drug-related crime elements and specific types contained in the core text. The hybrid reasoning confidence fusion calculation formula is as follows: in, The final confidence level for mixed reasoning; This is a dynamic fusion coefficient used to adjust the weighting of the results between the crime element reasoning rule base and the deep learning reasoning model. The matching degree of the crime element reasoning rule base is the degree of matching between the text to be judged and the rules in the rule base, with a value range of 0 to 1; The confidence level of the deep learning inference model is the probability that the model predicts the text to be judged contains elements of crime, and its value ranges from 0 to 1. This is an adjustment coefficient used to control the dynamic fusion coefficient. Crime risk score The rate of change when the crime type is drug trafficking or extortion. The value is 2.2 when the crime type is the sale or illegal trading of personal information. The value is 1.8 when the type of crime is not specified. The value is 2.0.

[0023] Structured Tagging: This process transforms the elements of drug-related crimes, confirmed through reasoning, into standardized tags. These standardized tags include basic information, crime type, criminal entities, and relationships. Basic information includes the sending time of chat logs and sender / recipient identifiers; the crime type is drug-related transaction; the criminal entities are extracted identity entities, behavioral entities, and verbal entities; and the relationships are the core syntactic relationships between entities. This standardized tagging format makes the crime element information clearer and more standardized, facilitating quick understanding and review by judicial personnel. Standardized tags are bound to corresponding core text via original text IDs. The bound tagging results can be exported as a standard format for judicial electronic evidence. This ensures that the tagging results meet the requirements of judicial electronic evidence and can be directly applied to judicial case handling procedures, improving the convenience and legality of evidence use.

[0024] Risk Scoring and Judicial Analysis: Based on the previously calculated dynamic weights of crime elements and the normalized values ​​of each crime element, the risk score of this chat log is calculated using the crime risk scoring formula. This score can intuitively reflect the severity of drug-related transactions involved in the chat log, providing data for judicial authorities to determine case priority. The crime risk score calculation formula is as follows: in, Assess crime risk. The total number of identified and confirmed criminal elements in a single chat message; For the first Dynamic weights of each crime element; For the first Elements of a crime The normalized value ranges from 0 to 1; A crime risk scoring threshold of 5.0 is used to distinguish between high-risk and medium-to-low-risk texts. Combining the risk score and standardized tags, a judicial analysis report is generated. This report includes an overview of drug-related transaction risks, distribution of crime types, a core entity relationship graph, and high-risk text fragments. The core entity relationship graph displays the relationships between the identities of the transacting parties, the entities involved in the transaction-related behaviors, and the entities using drug-related rhetoric, helping judicial personnel clearly understand the participants and behavioral logic in drug-related transactions. High-risk text fragments are key dialogue contents involving transaction amounts, delivery locations, and drug types, which can be directly used as key evidence for case investigation and trial, providing comprehensive and accurate data analysis support for judicial organs in handling drug-related transaction cases.

[0025] In summary, this embodiment focuses on the automatic annotation of criminal elements in chat logs related to drug transactions. Through data preprocessing, key information is fully extracted and multilingual encoding issues are resolved, laying the foundation for subsequent analysis. Semantic parsing and entity recognition, using specialized formulas, accurately locate core entities and clarify drug-related tendencies. Entity association and element reasoning, combined with tools and models, eliminate interference and accurately determine criminal elements. Structured tagging ensures information standardization and legal export. Risk scoring and judicial analysis generate practical reports. The entire process is interconnected, balancing accuracy and judicial applicability, providing efficient data support for handling drug transaction cases.

[0026] Example 2: Automatic Labeling and Data Preprocessing of Personal Information Trafficking Chat Log Crime Elements: For binary log files and text backup files of a mainstream instant messaging platform, the corresponding decryption algorithm is used according to the electronic data recovery and inspection technical specifications. The platform's proprietary format parsing tool is used to read the data structure, extracting text content, sending timestamps, sender / receiver identification, attachment storage path, and metadata. This ensures that the extracted fields include text content, time, and sender / receiver identification. This process comprehensively collects basic information from the chat logs, laying a data foundation for subsequent analysis of personal information trafficking-related crime elements. For monolingual and bilingual mixed text in the chat logs, it is input into a multilingual pre-trained model for unified encoding and conversion to form standardized text. This effectively eliminates information comprehension barriers caused by language differences, ensuring that subsequent semantic parsing and entity recognition can accurately handle various language texts. Meaningless emoticons, irrelevant chat content, and automatically sent system notifications are filtered out, retaining core text involving information inquiries, price negotiations, and delivery method communication. By filtering key text content, interference from invalid information in subsequent processing steps is reduced, improving the model's efficiency and accuracy in recognizing content related to personal information trafficking. Figure 2 As shown.

[0027] Semantic parsing and entity recognition: A context window is set up, and the pre-processed core text is input into the conversational pre-trained model. The model parses the criminal intent in the core text and determines the confidence level of the criminal intent, initially judging whether the chat content has the possibility of personal information trafficking, providing guidance for subsequent accurate extraction of relevant entities. A crime-specific named entity recognition model is invoked. First, the weight of each potential criminal element is calculated using a dynamic weight formula for criminal elements. This formula can dynamically adjust the element weights according to the association and semantic features of each element in the personal information trafficking scenario, allowing the model to focus on elements closely related to personal information trafficking. Then, the entity-context crime association loss function is combined. This function can enhance the association between entities and the context of personal information trafficking, effectively distinguishing normal social entities from personal information trafficking-related entities, accurately extracting identity entities, behavioral entities, and verbal entities from the core text, and recording the type, position in the text, and recognition confidence of these entities, providing high-quality entity data for subsequent entity association and element reasoning.

[0028] Entity association and element reasoning: Dependency parsing tools are used to perform syntactic structure analysis on core texts containing criminal entities. Only five types of core syntactic relations are extracted: subject-predicate, verb-object, preposition, coordinate, and attribute relations. Non-core syntactic relations such as adjectives modifying nouns and adverbs modifying verbs are eliminated to avoid irrelevant syntactic information from interfering with entity association analysis. The grammatical connections between entities are accurately identified, and combinations of entities without criminal significance are excluded. Combining the criminal intent obtained from semantic parsing with the extracted entity information, a crime element reasoning rule base and a deep learning reasoning model are invoked. The input data for this deep learning reasoning model consists of core text after data preprocessing, and criminal entities and their associated information extracted through semantic parsing and entity recognition steps. The model training data comes from chat log annotation data in historical personal information trafficking cases, ensuring that the model can fully learn the text features and element association patterns of personal information trafficking cases. The matching degree results of the crime element reasoning rule base and the confidence results of the deep learning reasoning model are fused and calculated through a hybrid reasoning confidence fusion formula. This formula can dynamically adjust the weights of the rule base and model results according to the text risk situation, taking into account both the standardization of the rules and the adaptability of the model, and finally accurately determining the criminal elements and specific types related to personal information trafficking in the core text.

[0029] Structured Tagging: This process transforms confirmed elements of personal information trafficking crimes into standardized tags. These tags include basic information, crime type, criminal entities, and relationships. Basic information includes the sending time of chat logs and sender / recipient identifiers; the crime type is personal information trafficking; criminal entities include extracted identity entities, behavioral entities, and verbal entities; and relationships are the core syntactic relationships between entities. Standardized tags systematically integrate relevant elements of personal information trafficking crimes, making information presentation more organized and facilitating rapid access to key case information for judicial personnel. Standardized tags are bound to corresponding core text via original text IDs. The tagging results can be exported in a standard format for judicial electronic evidence, ensuring compliance with judicial requirements for electronic evidence format. This allows for direct use in case investigation, prosecution, and trial processes, improving judicial efficiency.

[0030] Risk Scoring and Judicial Analysis: Based on the dynamic weights of crime elements and the normalized values ​​of each element, a risk score is calculated using a crime risk scoring formula. This score quantifies the severity of the personal information trafficking involved in the chat log, helping judicial authorities quickly screen high-priority cases and optimize the allocation of case handling resources. Combining the risk score and standardized tags, a judicial analysis report is generated. The report covers an overview of personal information trafficking risks, the distribution of crime types, a core entity relationship graph, and high-risk text fragments. The core entity relationship graph displays the relationships between information seller entities, buyer entities, entities involved in trafficking-related behaviors, and entities using trafficking-related rhetoric, enabling judicial personnel to clearly understand the participants, processes, and relationships involved in personal information trafficking. High-risk text fragments are key dialogue contents involving information types, transaction prices, and delivery methods, serving as important clues for case investigation and key evidence for trial, providing comprehensive and reliable data analysis support for judicial authorities to combat personal information trafficking crimes.

[0031] In summary, this embodiment targets chat logs related to the sale of personal information. Through data preprocessing, it comprehensively collects information, eliminates language barriers, and filters core content. Semantic parsing and entity recognition utilize specialized formulas to highlight key elements and accurately extract relevant entities. Entity association and element reasoning rely on tools and models to clarify relationships and accurately determine criminal elements. Structured tagging ensures standardized and compliant information export. Risk scoring and judicial analysis quantify risks and generate detailed reports. Each step is closely integrated, ensuring processing accuracy while meeting the needs of judicial practice, providing strong technical support for combating crimes involving the sale of personal information.

[0032] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for automatically labeling criminal elements in chat logs based on natural language processing, characterized in that, The specific steps of this method are as follows: Data preprocessing: For chat data formats of mainstream instant messaging platforms, the text content, sending time, sender and recipient identifiers, and attachment association information are parsed and extracted; a multilingual pre-trained model is used to unify the encoding of monolingual, bilingual, or minority language text; meaningless symbols, redundant information, and system notifications are filtered out, and the core text is retained; Semantic parsing and entity recognition: Set a context window, parse the core text through a conversational pre-trained model, and identify criminal intent and confidence level; calculate weights using a dynamic weight formula for criminal elements, call a crime-specific named entity recognition model with entity-context crime association loss function, extract identity, behavior, and speech entities, and record their type, location, and confidence level; Entity association and element reasoning: The syntactic structure of text containing criminal entities is parsed using dependency parsing tools to identify grammatical relationships between entities and exclude non-criminal associations; combined with semantic intent and entity information, the criminal element reasoning rule base and deep learning reasoning model are invoked, and the criminal elements and types are determined through a hybrid reasoning confidence fusion formula; Structured tagging: Transforming confirmed crime elements into standardized tags containing basic information, crime type, crime entity, and related relationships; By binding tags and core text with the original text ID, it supports exporting to the standard format of judicial electronic evidence; Risk scoring and judicial analysis: Based on the dynamic weights of crime elements and the normalized values ​​of the elements, the risk score is calculated using the crime risk scoring formula; By combining scoring and standardized tags, a judicial analysis report is generated that includes a risk overview, distribution of crime types, a core entity relationship map, and high-risk text fragments.

2. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, The multi-platform data parsing process in the data preprocessing step includes: decrypting encrypted database files, binary log files, and text backup files generated by mainstream instant messaging platforms using decryption algorithms that conform to the technical specifications for electronic data recovery and verification; reading the data structure using corresponding format parsing tools; and extracting text content, sending timestamps, sender and recipient identification, attachment storage paths, and metadata. The extracted fields must include at least the text content, time, and sender / recipient identification fields.

3. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, The multilingual encoding process in the data preprocessing steps includes: segmenting texts in different minority languages ​​using dedicated word segmentation tools for those languages; constructing a dedicated lookup table for criminal terminology in the minority languages; first, matching and converting texts using this lookup table; and inputting unmatched text fragments into a multilingual pre-trained model for translation and conversion to form standardized text.

4. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, In the semantic parsing and entity recognition steps, the formula for calculating the dynamic weight of crime elements is as follows: in: For the first Dynamic weights of each crime element; Its basic weight; The total number of identified and confirmed criminal elements in a single chat message; , Different criminal elements identified in a single chat text; For the first The elements of the crime and the first Mutual information between elements of a crime; For the first The elements of the crime and the first Semantic similarity between elements of a crime.

5. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, In the semantic parsing and entity recognition steps, the entity-context crime association loss function is: The total loss function of the crime-specific named entity recognition model is: in, For entity-context crime-related losses; This represents the total number of entity tokens in a single chat message; For the first Attention weights for each entity token; For the first The entity corresponding to each entity token; For the first individual entities The degree of contribution to crime; For the first individual entities With crime context vector Semantic similarity between them; For the first individual entities Compared with normal context vector Semantic similarity between them; The total loss for the crime-specific named entity recognition model; Cross-entropy loss; These are the weighting coefficients.

6. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, The dependency syntactic analysis process of the entity association and element reasoning steps extracts only five types of core syntactic relations: subject-predicate relation, verb-object relation, preposition relation, coordinate relation, and attribute relation. During the analysis, non-core syntactic relations such as adjectives modifying nouns and adverbs modifying verbs are excluded.

7. The automatic annotation method for criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, The formula for calculating the confidence fusion of hybrid reasoning in the entity association and element reasoning steps is as follows: The formula for calculating the crime risk score is as follows: in, The final confidence level for mixed reasoning; The dynamic fusion coefficient; The degree of matching for the rule base for inferring crime elements; The confidence level of the deep learning inference model; This is the adjustment coefficient; Assess crime risk. The total number of identified and confirmed criminal elements in a single chat message; For the first Dynamic weights of each crime element; For the first Elements of a crime The normalized value; The threshold for crime risk scoring.

8. The method for automatically labeling criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, In the entity association and element reasoning steps, the management process of the crime element reasoning rule base includes a dynamic update and version management mechanism: when adding or modifying a rule, the identity information of the person making the modification, the modification time, the specific content of the rule, the type of criminal case to which the rule applies, and a unique rule base version number is generated; after the rule base version is updated, 10% of the samples in the historical labeled data are selected for re-reasoning verification, and the verification accuracy is calculated. If the verification accuracy is greater than or equal to 93%, the version is confirmed to be effective; if the verification accuracy is less than 93%, it is rolled back to the previous effective version.

9. The method for automatically labeling criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, The input data of the deep learning inference model consists of core text processed by the data preprocessing step, and criminal entities and their associated information extracted by the semantic parsing and entity recognition steps. The training data of the model comes from the chat log annotation data in historical criminal cases. In the entity association and element inference steps, the model works in conjunction with the criminal element inference rule base to jointly participate in the criminal element determination process and output the relevant results of various criminal elements corresponding to the text to be determined. These results are used to calculate the matching degree results with the criminal element inference rule base.

10. The method for automatically labeling criminal elements in chat logs based on natural language processing according to claim 1, characterized in that, In the aforementioned risk scoring and judicial analysis steps, the element normalization values For crime elements related to transaction amount, piecewise linear interpolation is used for calculation. Specifically, when the transaction amount is less than or equal to 10,000 yuan, When the transaction amount is greater than 10,000 yuan and less than or equal to 100,000 yuan, When the transaction amount is greater than 100,000 yuan and less than or equal to 500,000 yuan, When the transaction amount exceeds 500,000 yuan, .