An event tag detection method and computer based on element knowledge
By using an event tag detection method based on element knowledge, combined with coarse classification, element extraction, and rule filtering, the problem of poor scalability and interpretability of end-to-end pre-trained models in police text tag classification is solved, and the flexibility and maintainability are improved, resulting in more convincing results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, end-to-end pre-trained models suffer from poor scalability and poor label interpretability in police incident text label classification. In particular, they require retraining and fine-tuning when labeling specifications change, and they have difficulty distinguishing police incidents with less obvious features.
An event label detection method based on element knowledge is adopted. Through coarse classification, element extraction and rule filtering, the final label of the event is determined by combining the coarse classification results and text label information. The rule filtering module is used to improve flexibility and maintainability, and the element extraction module is used to improve the interpretability of the results.
It achieves flexibility and maintainability in the event label detection process, improves detection efficiency and interpretability of results, and only requires adjustment of the rule filtering module when the labeling specifications change, making the results more convincing.
Smart Images

Figure CN115422351B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and public security management, and in particular to an event tag detection method and computer based on element knowledge. Background Technology
[0002] The development of deep neural network (DNN) models and graphics processing units (GPUs) has made it possible to train neural networks with larger parameters and more layers. Natural language sequences contain specific patterns and related knowledge, especially in vertical domains such as event texts, where these pattern features and knowledge implications are even more pronounced. Deep neural network models can effectively learn and capture these patterns and knowledge in text sequences and make predictions on previously unseen data. In recent years, the increasing sophistication of information technology in public security organs and other relevant departments has led to the accumulation of massive amounts of event text data, including police reports and incident texts, during emergency response. However, the current method for verifying daily event tags still relies primarily on manual, line-by-line checks, which is not only labor-intensive but also inefficient.
[0003] By effectively utilizing the massive amounts of accumulated event data and leveraging the capabilities of deep neural network models in sequence label classification, combined with element knowledge and rule-based post-processing, the amount of data requiring manual inspection can be significantly reduced. Ultimately, through human-machine coupling, the inspection and verification of emergency response data labels can be completed more quickly and efficiently.
[0004] In existing technologies for text sequence classification tasks, end-to-end pre-trained models, such as BERT, are mainly employed. BERT's self-attention mechanism effectively learns and captures the features inherent in the text sequence, demonstrating that a deep model can significantly improve the accuracy of natural language processing tasks. Furthermore, this model can be trained from unlabeled corpora. For the police report text labeling task, the BERT model takes the police report text sequence as input, performs word embeddings on the sequence using pre-trained parameters, and fine-tunes the model parameters through gradient descent to improve the model's generalization performance.
[0005] The main problem with end-to-end pre-trained models is their poor scalability. If the labeling standards for event tags change, it's necessary to correct the labeling of each type of tag in the training corpus each time, and the model needs to be fine-tuned again. Furthermore, pre-trained models struggle to distinguish between alerts with subtle features. The fine-tuning process is also like a black box, resulting in poor interpretability of the predicted tags and unconvincing results. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide an event tag detection method and computer based on element knowledge, which can improve the flexibility and maintainability of the detection process.
[0007] To achieve the above objectives, the present invention provides an event tag detection method based on element knowledge, comprising:
[0008] Coarse classification of event texts based on key features;
[0009] Perform element extraction on the event text to obtain text tag information that maps to the subcategories;
[0010] Based on rule-based filtering, the final label of the event is determined by combining the coarse classification results and text label information.
[0011] In a preferred embodiment, when the final label of an event is determined to be greater than or equal to two labels based on rule filtering, combined with coarse classification results and text label information, the method further includes:
[0012] Detail the classification of event texts;
[0013] The determined labels are filtered based on the fine classification results to obtain the final labels for the events.
[0014] In a preferred embodiment, the determination of obtaining the second-level label based on the coarse classification of the event text according to key features.
[0015] In a preferred embodiment, the element extraction operation on the event text includes:
[0016] Preliminary labeling results were obtained by extracting elements from the event text;
[0017] The initial labeling results are normalized to obtain text label information that maps to the subcategories.
[0018] In a preferred embodiment, the rule filtering includes filtering of positive rules and filtering of negative rules.
[0019] In a preferred embodiment, the rule content for rule filtering is stored in a configuration file.
[0020] In a preferred embodiment, after performing a coarse classification of the event text based on key features, the method further includes:
[0021] A first threshold is defined for the confidence level of the coarse classification results using a probabilistic model;
[0022] When the confidence level falls below the first threshold, event text data is displayed for manual intervention.
[0023] In another aspect, the present invention provides a computer comprising a processor and a memory, the processor being configured to execute code in the memory to perform the event tag detection method based on element knowledge as described above.
[0024] The solution provided in this embodiment of the invention combines coarse model classification with post-processing rules, making the event label detection process more flexible and maintainable.
[0025] Other beneficial effects of the present invention will be further explained in the specification. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A flowchart of an event tag detection method based on element knowledge is provided for this invention;
[0028] Figure 2 This is a diagram illustrating sequence labeling of police incident texts using the BIO method. Detailed Implementation
[0029] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention.
[0030] Figure 1 The flowchart illustrates an event tag detection method based on element knowledge provided by the present invention.
[0031] Includes the following steps:
[0032] Step S101: Perform coarse classification of event text based on key features.
[0033] A coarse classification model can divide the event text into a second-level label system. Subsequent steps then determine the first-level labels, significantly reducing the number of labels that need to be classified. In cases where the coarse classification contains errors, these errors can be discarded through subsequent processing, improving the recall rate of erroneous data.
[0034] When event text contains a large amount of numerical information, such as ID card numbers, mobile phone numbers, bank card numbers, loss amounts, and dates, and the model is not sensitive to this information, several special tokens can be used for replacement during the data preprocessing stage. For example, in the police report event text shown in the table below, token replacement of the numerical content can further improve the recognition accuracy.
[0035] Table 1
[0036]
[0037] Step S102: Perform element extraction on the event text to obtain text label information that is mapped to the subcategories.
[0038] In this step, feature extraction can be performed on the event text. Specifically, the event text can first be sequence-labeled, and then feature entity extraction can be performed. The BIO annotation method can be used during sequence labeling. The BERTwwm-LSTM-CRF model can be used for feature entity extraction.
[0039] Figure 2 This diagram illustrates sequence labeling of police incident texts using the BIO method.
[0040] It's important to note that after extracting elements from event text to obtain preliminary labels, label normalization is sometimes necessary to establish a mapping with subsequent subcategories. For example, "crime location" in the form of "construction site," "factory," or "business company" would be normalized to the label "unit area." Furthermore, the normalized label can be mapped to the final subcategories; here, "unit area" and the label "theft unit" are mapped. This element label normalization module can be implemented using a hash table. Additionally, an "other" category label can be defined. If "crime location" cannot be mapped to any of the other address-related labels, it will be mapped to "other," and the final predicted label will be unrelated to the address.
[0041] Step S103: Based on rule filtering, combine the coarse classification results and text label information to determine the final label of the event.
[0042] Based on predefined rules, candidate labels for the next step are provided. Most of the time, a single candidate label indicates sufficient confidence in predicting that label based on the previously obtained information. For example, if the probability model label filtering module provides the label "theft," and the element normalization module provides "residential area" and a loss amount greater than 600 yuan, then the final label for this type of police incident text can be inferred to be "criminal incident -> theft -> residential theft." The rule module can be divided into affirmative and negative rules. Affirmative rules, for example, derive a label based on feedback from previous modules; negative rules, for example, negate certain labels based on feedback. Table 2 lists some examples of affirmative and negative rules, written using a rule engine.
[0043] Table 2
[0044]
[0045]
[0046] The rules for rule filtering can be stored in a configuration file, which improves the flexibility and maintainability of the rule module.
[0047] If, in step S103, based on rule filtering and combining the coarse classification results and text label information, the final label of the event is determined to be greater than or equal to two labels, the event text can be further subdivided to determine the first-level label.
[0048] For example, if the rules module returns two tags in step S103, namely "SMS fraud" and "illegal SMS", the "illegal SMS" tag will be filtered out if the "police handling category" is "reporting a criminal case".
[0049] The solution provided in this invention combines coarse model classification with post-processing rules, making the event label detection process more flexible and maintainable. For example, for data with changing labeling specifications, the secondary labels of this data often remain unchanged, so only the rule filtering module needs to be adjusted. Utilizing a rule engine can further enhance flexibility. The feature extraction module can make the inference results more convincing.
[0050] Another embodiment of the present invention provides a computer, including a processor and a memory, wherein the processor is configured to execute code in the memory to perform the event tag detection method based on element knowledge described in the above embodiments.
[0051] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0052] The various illustrative logic units and circuits described in the embodiments of this application can be implemented or operate the described functions using a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic system, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can also be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented using a combination of computing systems, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0053] The steps of the methods or algorithms described in the embodiments of this application can be directly embedded in hardware, a software unit executed by a processor, or a combination of both. The software unit can be stored in RA memory, flash memory, RO memory, EPRO memory, EEPRO memory, registers, hard disk, removable disk, CD RO, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be disposed in an ASIC, which can be disposed in a terminal. Optionally, the processor and storage medium can also be disposed in different components within the terminal. These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An event tag detection method based on element knowledge, characterized in that, include: Coarse classification of event texts based on key features; Perform element extraction on the event text to obtain text tag information that maps to the subcategories; Based on rule-based filtering, the final label of the event is determined by combining the coarse classification results and text label information. When, based on rule-based filtering and combining coarse classification results with text label information, the final label of an event is determined to be greater than or equal to two labels, the method further includes: Detail the classification of event texts; The determined labels are filtered based on the fine classification results to obtain the final labels for the events.
2. The method as described in claim 1, characterized in that, The determination of the second-level label is obtained by coarsely classifying the event text based on key features.
3. The method as described in claim 1, characterized in that, The element extraction operation of the event text includes: Preliminary labeling results were obtained by extracting elements from the event text; The initial labeling results are normalized to obtain text label information that maps to the subcategories.
4. The method as described in claim 1, characterized in that, The rule filtering includes filtering for positive rules and filtering for negative rules.
5. The method as described in claim 1, characterized in that, The rules for filtering are stored in a configuration file.
6. The method as described in claim 1, characterized in that, After performing a coarse classification of the event text based on key features, the method further includes: A first threshold is defined for the confidence level of the coarse classification results using a probabilistic model; When the confidence level falls below the first threshold, event text data is displayed for manual intervention.
7. A computer, characterized in that, include: A processor and a memory, the processor being configured to execute code in the memory to perform the feature knowledge-based event tag detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data processing method and device, computer equipment and storage medium
CN112035449A
Automatic detection and association of new attributes with entities in knowledge bases
US20210279606A1