Journal of Frontiers of Computer Science and Technology

• Science Researches •     Next Articles

Research on Public Security Professional Small Sample Knowledge Extraction Method Based on Large Language Model

PEI Bingsen, LI Xin, JIANG Zhangtao, LIU Mingshuai   

  1. Information Network Security Academy, People's Public Security University of China, Beijing 100038, China

基于大语言模型的公安专业小样本知识抽取方法研究

裴炳森,李欣,蒋章涛,刘明帅   

  1. 中国人民公安大学 信息网络安全学院,北京 100038

Abstract: The rapid development of informatization and digitalization in public security business has generated a large amount of law enforcement case data in public security work. However, due to the various types of text and the large amount of information, front-line police officers often face problems such as low reading efficiency and difficulty in aggregating information in the process of reading case files. In order to further utilize the law enforcement case text, it is necessary to conduct intelligent analysis and knowledge extraction. However, due to the professionalism, data sensitivity, confidentiality of public security professional law enforcement case text, as well as the requirements of public security data going out of the network, only a small number of learning training samples can be obtained, and the traditional deep learning model has unsatisfactory extraction effect. Therefore, this paper proposes to build a large language model in vertical fields with fewer resources and data, and realize the adaptation of the model to the public security profession. The model uses knowledge editing technology MEMIT, low-resource fine-tuning technology LoRA, and prompt templates to improve the model’s understanding of public security knowledge such as police terminology and common sense. Moreover, in order to further improve the knowledge extraction effect of the model, a small sample law enforcement case text data extraction process is designed to better integrate the professional knowledge related to the case in the model. The experimental results show that the accuracy of the public security professional vertical field large language model integrated with the extraction process in various knowledge extraction tasks is significantly improved compared with the traditional method, which helps front-line police officers quickly, objectively and accurately analyze law enforcement case text, dig out potential case information, and support the intelligent development of public security work.

Key words: Large Language Model, Knowledge Extraction, Small Sample Data, Public Security Law Enforcement

摘要: 当前公安业务工作信息化、数字化飞速发展,在公安工作中产生了大量执法办案数据,但是其文本种类较多、信息量较大,导致一线民警同志在阅卷工作中常面临阅读效率低、信息难以聚合等问题,为更进一步利用执法办案文本,需要对其进行智能分析、知识抽取,但受限于公安专业执法办案文本的专业性、数据敏感性、保密性,以及公安数据出网要求等,仅能获取到少量学习训练样本,使用传统的深度学习模型抽取效果不尽如人意。因此本文提出使用较少资源和数据构建垂直领域大语言模型,实现模型对公安专业适配的方法,利用知识编辑技术MEMIT、低资源微调技术LoRA、提示模版,提高模型对警务术语、警务常识等公安知识的理解能力。而且,为进一步提高模型的知识抽取效果,设计小样本执法办案文本数据抽取流程,以更好结合模型中的相关案别专业知识。实验结果展示,融合抽取流程的公安专业垂直领域大语言模型在各类知识抽取任务中准确率较之传统方法显著提高,有助于帮助一线民警快速、客观、准确分析执法办案文本,挖掘案件潜在信息,支撑公安工作智能化发展。

关键词: 大语言模型, 知识抽取, 小样本数据, 公安执法办案