An intelligent extraction method and system for legal and regulatory annotation documents
Through intelligent extraction methods and systems, data preprocessing and feature construction are used to automatically identify key information in legal and regulatory texts, solving the problems of manual screening being time-consuming and labor-intensive and susceptible to subjective influences, and achieving efficient and accurate extraction of key information.
Patent Information
- Application Number
- CN202410484659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-19
- Filing Date
- 2024-04-22
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-04-22
AI Technical Summary
When processing legal and regulatory texts, existing technologies involve manual screening and organization, which is time-consuming and labor-intensive and easily influenced by subjective preferences, making it difficult to extract key information efficiently and accurately.
Intelligent extraction methods and systems are used to automatically identify key entity information in legal and regulatory texts, including titles, tables, non-tabular and symbolic features, through data preprocessing, feature construction and feature comparison, and a feature matching model is constructed to extract key information.
It realizes the intelligent automatic extraction of legal and regulatory texts, reduces manual intervention, reduces errors, improves the speed and accuracy of information extraction, and adapts to large-scale text processing.
Smart Images

Figure CN118504559B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer-related artificial intelligence and natural language processing technologies, and in particular relates to a generative intelligent agent technology for perceiving cross-domain legislative opinions. Background Art
[0002] Before automated extraction technology became widespread, manual screening and organization were the primary means of extracting annotated documents underlying legal and regulatory texts. This process, particularly when faced with complex legal text data, requires significant time and effort, and can be influenced by the subjective preferences of the screener. The cost and difficulty of manual screening and organization increase significantly when faced with large volumes of legal and regulatory text. The addition of automated text collection and parsing systems can automatically process large volumes of text in batches, reducing labor costs. Currently, there is an urgent need for information extraction technology that can quickly and accurately extract key information from numerous legal and regulatory documents. Summary of the Invention
[0003] The purpose of the present invention is to propose an intelligent extraction method and system for legal and regulatory annotation documents, which automatically captures the text information of laws and regulations and realizes intelligent information extraction of legal and regulatory annotation documents by eliminating subjective factors.
[0004] The present invention is achieved by utilizing the following technical solutions:
[0005] An intelligent extraction method for legal and regulatory annotation documents, comprising:
[0006] Step 1: collect the text with the legal and regulatory annotation basis as the input original legal and regulatory annotation basis text, and perform data preprocessing on the original legal and regulatory annotation basis text to form clear and structured data;
[0007] Step 2: Implement feature construction based on feature engineering, including but not limited to title features, table text features, non-table text features, and symbolic features;
[0008] Step 3: Use the features constructed in step 2 to extract key information from the text of the original legal and regulatory annotations. Based on the extracted key information, automatically identify key entity information in the legal and regulatory text through text scanning, splitting, feature comparison and regular matching.
[0009] An intelligent extraction system for legal and regulatory annotation documents, comprising: a preprocessing module, a feature construction module, and an extraction module connected in sequence; wherein:
[0010] The preprocessing module is used to collect the text with the legal and regulatory annotation basis as the original legal and regulatory annotation basis text as input, and perform data preprocessing on the original legal and regulatory annotation basis text to form clear and structured data;
[0011] The feature construction module implements feature construction based on feature engineering, and at least constitutes the title feature, the table text feature, the non-table text feature, and the symbolic feature;
[0012] The extraction module uses the constructed features to extract key information from the text of the original legal and regulatory annotations, and automatically identifies key entity information in the legal and regulatory text through text scanning, splitting, feature comparison, regular matching, etc. based on the extracted key information.
[0013] Compared with traditional manual methods, the present invention can achieve the following beneficial technical effects:
[0014] 1) It realizes intelligent automatic extraction of a large number of legal and regulatory texts, reducing the subjective influence of manual intervention; it is not easy to adapt to large-scale processing
[0015] 2) Ability to automatically capture key information from regulatory documents, reduce manual errors and improve accuracy;
[0016] 3) Using computers to automatically process texts can greatly increase the speed of information extraction and improve processing efficiency; it is more conducive to adapting to large-scale text processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is an overall flow chart of an intelligent extraction method for legal and regulatory annotation files of the present invention;
[0018] Figure 2 This is a module diagram of an intelligent extraction system for legal and regulatory annotation documents of the present invention;
[0019] Figure 3 It is a model block diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the accompanying drawings in the embodiments of the present invention.
[0021] Related term descriptions:
[0022] The basis for the annotations of laws and regulations is to interpret and explain the provisions of laws and regulations, as well as the department, time and timeliness of the promulgation of laws and regulations. The annotations of laws and regulations are the explanation of the specific clauses and vocabulary of the original text of laws and regulations.
[0023] Timeliness refers to the current validity of laws and regulations, such as current validity, amendment, expiration, or partial expiration.
[0024] like Figure 1 As shown, the overall process of the present invention includes the following steps:
[0025] Step 1: collect the text with the legal and regulatory annotation basis as the input original legal and regulatory annotation basis text, and perform data preprocessing on the original legal and regulatory annotation basis text to form clear and structured data. In this step, the preprocessing operations are as follows:
[0026] (1.1) Remove irrelevant symbols such as ", @@, etc. from the input original legal and regulatory annotation text;
[0027] (1.2) irrelevant labels are added to the text of the original legal and regulatory annotations input, such as, <style>等的去除操作;
[0028] (1.3)、对所述输入的原始法律法规注释依据的文本的关键节点进行分句、分词如,,等标签的标记操作,利用Pattern公式根据标签标记提取文本,或者根据常规文本的标点符号分词分句解析出文本之后,判断得到文本是否符合被注释文件的信息,例如标题与发文字号等;
[0029] (1.4)、对所述输入的原始法律法规注释依据的文本的关键节点加入非打印字符如\r、\n等的操作;
[0030] (1.5)、对输入的原始法律法规文本的全角符号如"。”、",”、"(”、")”、"
”、"
[0031] 步骤2,实现基于特征工程的特征构造,通过将所述原始法律法规注释依据的文本与标准格式进行比对,即根据Pattern公式对HTML格式的所述原始法律法规注释依据的文本的内容做合法性的校验,筛选出可自动解析处理逻辑的文本和非可自动解析处理逻辑的文本;其中,可自动解析逻辑的文本是指依据已有的特征进行匹配,比如是否有时效性标记(如公式里提到的有效,失效等),表格的header信息是否存在特征里(类似于XXX文件名,XXX文号.....),非可自动解析是指特征库无法匹配的;例如:
[0032] (2.1)、对输入的所述原始法律法规注释依据的文本依据标题特征进行比对,筛选出非可自动解析处理逻辑的文本的特征例如包括开头结尾的空字符、失效、修改、拟修改、适用等注释依据标题的特征,开头结尾的空字符代表标题,而失效、拟修改、适用包括代表被注释文件的时效性;
[0033] 构成的标题性特征表示为特征公式Pattern1、Pattern2,如下所示:
[0034] Pattern1=Pattern.compile("取消|失效|废止|停止执行|现行有效|继续有效|保留”)
[0035] Pattern2=Pattern.compile("部分(有效|失效|内容废止|内容失效|条款废止")
[0036] (2.2)、对输入的所述原始法律法规注释依据的文本中的表格中文本依据正文特征如标签、< / pre>标签、标签、< / td标签>等进行比对,并依据java的栈的数据结构特性对标签的完整性进行验证,构成的表格文本性特征表示为特征公式Pattern3、Pattern4,如下所示:
[0037] Pattern3=Pattern.compile("<table.*?")
[0038] Pattern4=Pattern.compile("<tr.*?");Pattern.compile("<td.*?")
[0039] 在HTML文本中,比如标签代表当前的HTML文本内容是存在表格的,标签代表表格内的每一行,代表每一行的一小列;
[0040] 其中,对Pattern3=Pattern.compile("<table.*?")释义如下:
[0041] ”?”表示:
[0042] table标签里的".”表示除换行符之外的任意字符"*”表示前面的元素匹配零次或者多次"?”表示非贪婪匹配(尽可能少匹配)整体表示table标签里,除换行之外的任意字符出现零次或者多次时,都尽可能的少匹配,快速结束匹配;
[0043] 其中,对所述Pattern4=Pattern.compile("<tr.*?");attern.compile("<td.*?")释义如下:
[0044] 第一个”?”表示:
[0045] tr标签里的".”表示除换行符之外的任意字符"*”表示前面的元素匹配零次或者多次"?”表示非贪婪匹配(尽可能少匹配)整体表示tr标签里,除换行之外的任意字符出现零次或者多次时,都尽可能的少匹配,快速结束匹配;
[0046] 第二个”?”表示:
[0047] td标签里的".”表示除换行符之外的任意字符"*”表示前面的元素匹配零次或者多次"?”表示非贪婪匹配(尽可能少匹配)整体表示td标签里,除换行之外的任意字符出现零次或者多次时,都尽可能的少匹配,快速结束匹配;
[0048] 第三个”?”表示:
[0049] table标签里的".”表示除换行符之外的任意字符"*”表示前面的元素匹配零次或者多次"?”表示非贪婪匹配(尽可能少匹配)整体表示table标签里,除换行之外的任意字符出现零次或者多次时,都尽可能的少匹配,快速结束匹配;
[0050] (2.3)、对输入的所述原始法律法规注释依据的文本中的非表格文本依据正文特征进行比对:是否能用数字或字母拆分出段落层级(如大小写的1,2,3,4,a,b,c,d...),并且在段落层级内用时效性的特征进行比对,如有效、保留、拟修改、继续施行等特征字;构成的非表格文本性特征表示为Pattern5,如下所示:
[0051] Pattern5=Pattern.compile("^[((]?[0-9一两二三四五六七八九零十百〇○0123456789]+[))..,,、]+(《?.*?》?.*?号)[\\u4E00-\\u9FFF]*[))]");
[0052] 其中,对所述Pattern5=Pattern.compile("^[((]?[0-9一两二三四五六七八九零十百〇○0123456789]+[))..,,、]+(《?.*?》?.*?号)[\\u4E00-\\u9FFF]*[))]")释义如下:
[0053] Pattern5的”^”表示开始位置,[]表示字符的集合,((表示匹配中英文左小括号,?表示前面的元素出现零次或一次,整体表示,快速匹配可能存在左括号开头的字符串;
[0054] Pattern5的《?.*?》?.*?:
[0055] ”《”表示匹配中文书名号的左尖括号,”?.*?”:表示匹配零次或一次左尖括号后面紧跟着任意字符(除换行符外),并且采用非贪婪匹配模式。即匹配一个或零个字符,直到下一个条件满足;
[0056] ”》”表示匹配中文书名号的右尖括号。”?.*?”:表示再次匹配零次或一次左尖括号后面紧跟着任意字符(除换行符外),并且采用非贪婪匹配模式。即再次匹配一个或零个字符,直到下一个条件满足
[0057] Pattern5整体表示:匹配包含在中文书名号”《”...”》”之间的内容,其中书名号内部的内容可能为空或包含任意字符,且整体采用非贪婪匹配模式;
[0058] (2.4)、对输入的所述原始法律法规注释依据的文本进行行的符号性特征比对,如以符号"《》”、"()”,"<>”",”等与符号",”、"。”、"、”等作为特征进行交互匹配,并依据java的栈的数据结构特性对特征的完整性进行验证;交互匹配就是这几种符号的嵌套匹配,比如书名号内还有书名号或者括号,或者书名号与括号交叉包含,这些都是交互匹配,而解析过程就是根据这些符号的特性,然后通过字符的匹配去解析出内容;构成的符号性特征表示为Pattern6,如下所示:
[0059] Pattern6=Pattern.compile(号.*?[((]");Pattern.compile("[((](.*?[0-9]+号)[))]")
[0060] 上述符号用于解析每一句文本,作为最基础的解析单元,从这些基础的解析单元里提取出被注释文件的标题与发文字号,比如书名号和括号,作为判断标题与发文字号的首要条件
[0061] 其中,对所述Pattern6=Pattern.compile(号.*?[((]");Pattern.compile("[((](.*?[0-9]+号)[))]")释义如下:
[0062] Pattern6的”号.*?”
[0063] ”号”:表示匹配字符"号",整体表示匹配以字符"号"结尾的字符串,并且匹配的内容可以是任意字符,但会尽可能少地匹配字符;
[0064] Pattern6的”[((](.*?)”
[0065] 匹配以中文全角括号或英文小括号开头的字符串,并且匹配括号内部的任意内容,但会尽可能少地匹配字符。
[0066] 步骤3,利用步骤2构造的特征进行原始法律法规注释依据的文本的关键信息提取,具体为:对于原始法律法规注释依据的文本依据所述标题性特征、所述表格文本性特征、所述非表格文本性特征和所述符号性特征进行关键信息提取,关键信息至少包括法律法规注释依据的文本中的标签、符号及其依存关系,设置为高权重的时效性词汇;依据提取到的关键信息,通过文本扫描、拆分、特征比对、正则匹配等自动识别法律法规文本中的关键实体信息,如涉及的法律法规的标题、发文字号、发布部门、发布时间、发布来源等,并通过注释依据文本的关键特征,来对这些实体信息建立关系:
[0067] (3.1)、通过步骤2构成的所述表格文本性特征解析所述原始法律法规注释依据的表格文本中每一行关键信息如、、标签和"《》”、"()”等符号,排列出这些关键信息的依存关系,包括文本的位置、符号嵌套与交叉关系;其中,关键信息是指被注释文件的标题与发文字号,而依据这些匹配出哪些标题与发文字号等其他信息对应的是否是同一个被注释文件;
[0068] (3.2)通过步骤2构成的所述时效性特征来解析所述原始法律法规注释依据的表格文本中每一行关键信息,解析出高权重的时效性词汇如"不再执行”、"停止适用、"文件清理”、"现行有效”、"继续有效”等;
[0069] 例如:比对解析的每一行关键信息,解析出被注释文件的发布时间,如(年月日,yyyy年MM月dd日,yyyy-MM-dd,yyyyMMdd)等;通过被注释文件的特征,来比对解析的每一行关键信息,解析出被注释文件的关键内容标题、发文字号、发布部门,如(文件号、标题、统一编号、条款、实施、登记号等)。
[0070] 如图2所示,本发明的的一种对法律法规注释文件的智能提取系统,包括预处理模块、特征构造模块和提取模块。
[0071] 综上所述,在加入文本自动采集解析系统后,可以克服现有人工筛选和整理方案中的低效、准确性受限、易受主观因素影响和不易适应大规模处理等缺点,提高法律法规重要信息处理的效率和准确性。
[0072] 虽然结合附图描述了本发明的实施方式,但是本发明并不局限于上述技术方案的描述,凡是本领域技术人员在不脱离本发明的精神和范围的情况下做出各种修改和变型的,这样的修改和变型均落入由所附权利要求所限定的范围之内。< / style>
Claims
1. An intelligent extraction method for legal and regulatory annotation documents, characterized in that: include: Step 1: collect the text with the legal and regulatory annotation basis as the input original legal and regulatory annotation basis text, and perform data preprocessing on the original legal and regulatory annotation basis text to form clear and structured data; Step 2: Implement feature construction based on feature engineering, which includes but is not limited to title features, table text features, non-table text features, and symbolic features. This step further includes the following process: Step 2.1: Compare the input text of the original legal and regulatory annotations based on title features, and screen out features of the text that are not automatically parsable by the processing logic, including but not limited to leading and trailing blank characters, invalidation, modification, proposed modification, and applicability. The title features constituted are represented as feature formulas Pattern 1 and Pattern 2. Step 2.2: Compare the text in the table in the input text of the original legal and regulatory annotations based on the text features including but not limited to tags, tags, tags, tags, tags, and verify the integrity of the tags based on the data structure characteristics of the Java stack. The constructed table text features are expressed as feature formulas Pattern 3 and Pattern 4. Step 2.3: Compare the non-tabular text in the input text of the original legal and regulatory annotations based on the text features: whether it can be split into paragraph levels using numbers or letters, and compare within the paragraph level using timeliness features including but not limited to the characteristic characters of valid, reserved, proposed to be amended, and continued to be implemented; the resulting non-tabular text features are represented as Pattern 5; Step 2.4: interactively matching the symbolic features of the input text of the original legal and regulatory annotation basis to achieve feature comparison, and verifying the integrity of the features based on the data structure characteristics of the Java stack; the constructed symbolic features are represented as Pattern 6; The Pattern3 adopts non-greedy matching, and Pattern3 indicates that only any character other than line breaks is matched zero or multiple times, so as to quickly end the matching; the Pattern4 adopts non-greedy matching, and Pattern4 indicates that only any character other than line breaks is matched zero or multiple times, so as to quickly end the matching; the Pattern5 adopts non-greedy matching, and Pattern5 indicates that the content contained between Chinese book title marks is matched, wherein the content inside the book title marks is empty or contains any characters; the Pattern6 adopts non-greedy matching, and Pattern6 indicates that a string starting with Chinese full-width brackets or English parentheses is matched, and any content inside the brackets is matched; Step 3: Use the features constructed in step 2 to extract key information from the text of the original legal and regulatory annotations. Based on the extracted key information, automatically identify key entity information in the legal and regulatory text through text scanning, splitting, feature comparison and regular matching.
2. An intelligent extraction system for legal and regulatory annotation documents is used to implement the method according to claim 1, characterized in that: include: The modules are connected in sequence including a pre-processing module, a feature construction module and an extraction module; wherein: The preprocessing module is used to collect the text with the legal and regulatory annotation basis as the original legal and regulatory annotation basis text as input, and perform data preprocessing on the original legal and regulatory annotation basis text to form clear and structured data; The feature construction module implements feature construction based on feature engineering, and at least constitutes the title feature, the table text feature, the non-table text feature, and the symbolic feature; The extraction module uses the constructed features to extract key information from the text of the original legal and regulatory annotations, and automatically identifies key entity information in the legal and regulatory text through text scanning, splitting, feature comparison, and regular matching based on the extracted key information.
Citation Information
Patent Citations
Big data-based law and regulation data automatic processing method and system
CN115098585A