A method and device for determining audit clues for file compliance audit
By converting legal and regulatory documents into analysis trees and training the BERT model, the behavior description statements and their polarity in the files to be audited are automatically judged, which solves the problem of low file compliance audit efficiency in the existing technology and achieves rapid screening. and efficient audit trail discovery.
Patent Information
- Application Number
- CN202410519215.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-04-26
AI Technical Summary
The existing technology uses manual judgment in file compliance audits inefficiently, and the introduced rule engine and knowledge graph technology is costly and has limited scope of application, making it impossible to quickly screen file compliance audit trails.
By converting legal and regulatory documents into analysis trees, a training data set for behavior description judgment and behavior polarity analysis is established, and the BERT model is trained to automatically judge the behavior description statements and their polarity in the documents to be audited, and combine positive and negative behaviors Describe the data set to determine the audit trail.
It realizes rapid screening of file compliance audit trails, reduces cost investment, is suitable for various documents to be audited, improves audit efficiency, and has a wide range of applications.
Smart Images

Figure CN118364105B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method and device for determining audit clues for file compliance audit. Background Art
[0002] In order to regulate behavior, maintain order, promote development, and protect rights and interests in social activities, relevant laws and regulations will be formulated to constrain the behavior of participants in social activities and protect their rights and interests. Laws and regulations can include various aspects of regulations, such as financial compliance, environmental compliance, labor compliance, data protection compliance, security compliance, etc. Laws and regulations come from national laws and regulations, industry standards, regulations of regulatory agencies, and guidelines of self-regulatory organizations.
[0003] The formulation of laws and regulations needs to follow the principle of scientific continuity. Laws and regulations should be established on the basis of fully understanding relevant issues, considering actual conditions and existing laws and regulations, and newly formulated documents cannot conflict with existing laws and regulations. Therefore, after the document is formulated, the content of the document should be audited for compliance.
[0004] Generally, legal documents need to be compiled in accordance with a certain structure. According to Article 61 of the Legislation Law, "Laws may be divided into sections, chapters, sections, articles, clauses, items, and headings according to the content requirements." During the compliance audit of legal documents, it is only necessary to confirm whether the newly formulated documents, i.e. the documents to be audited, conflict with the articles, clauses, items, and headings of the current laws and regulations. Summary of the invention
[0005] In order to achieve rapid screening of file compliance audit clues and improve the efficiency of file compliance audit, the present invention proposes a method and device for determining audit clues for file compliance audit. The technical solution proposed by the present invention is as follows:
[0006] In a first aspect, the present invention provides an audit clue determination method for file compliance audit, comprising:
[0007] Obtain a set of laws and regulations, and convert each law and regulation document in the set of laws and regulations into a parsing tree to obtain a set of parsing trees;
[0008] According to the text information stored in each leaf node of each analysis tree in the analysis tree set, a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set and a negative behavior description data set are established;
[0009] Using the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train the pre-built classification models to obtain a behavior description judgment model and a behavior polarity analysis model;
[0010] Based on the behavior description judgment model, each paragraph in the audit file is judged to determine whether the paragraph is a behavior description statement;
[0011] Analyze each behavior description statement in the audit file based on the behavior polarity analysis model to obtain corresponding behavior polarity analysis results;
[0012] According to the behavior polarity analysis results of each behavior description statement, the audit clue is determined in combination with the positive behavior description data set and the negative behavior description data set.
[0013] In one or some embodiments, the legal and regulatory document is converted into a parsing tree in the following manner:
[0014] Setting a root node based on the name of the legal and regulatory document;
[0015] Extract all pieces of data of the legal and regulatory documents, and establish a piece of data node corresponding to each piece of data in the root node;
[0016] Segment the text data of each piece of data according to natural segments to obtain segmentation results;
[0017] Use a sliding window to slide and traverse the segmentation results one by one from left to right, and according to the paragraph type processed by the previous sliding window and the paragraph type processed by the current sliding window, add branch and leaf nodes of each data node to obtain a parsing tree.
[0018] In one or some embodiments, the adding of leaf nodes of each data node according to the paragraph type processed by the previous sliding window and the paragraph type processed by the current sliding window to obtain the analysis tree includes:
[0019] The analysis tree is obtained by adding the leaf nodes of each data node in the following manner:
[0020] If the paragraph type processed by the current sliding window is paragraph, and the paragraph type processed by the previous sliding window is null, then add a child node of the data node, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0021] If the type of paragraph processed by the current sliding window is consistent with the type of paragraph processed by the previous sliding window, add a sibling node of the node corresponding to the paragraph processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0022] If the paragraph type processed by the current sliding window is a subtype of the paragraph type processed by the previous sliding window, add a child node of the node corresponding to the paragraph type processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0023] If the paragraph type processed by the previous sliding window is a subtype of the paragraph type processed by the current sliding window, add a sibling node of the parent node of the node corresponding to the paragraph type processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0024] If the paragraph type processed by the previous sliding window is a grandchild type of the paragraph type processed by the current sliding window, a sibling node of the ancestor node of the node corresponding to the paragraph type processed by the previous sliding window is added, and text information corresponding to the paragraph processed by the current sliding window is recorded in the newly added node.
[0025] In one or some embodiments, establishing a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set, and a negative behavior description data set according to the text information stored in each leaf node of each analysis tree in the analysis tree set includes:
[0026] Constructing behavior description judgment training data set, behavior polarity analysis training data set, positive behavior description data set and negative behavior description data set;
[0027] For each parse tree in the parse tree set, traverse all leaf nodes of the parse tree and perform the following operations:
[0028] If the text information stored in the leaf node is a behavior description statement, then generating behavior description training data according to the first preset description template and the second preset description template respectively and adding them to the behavior description judgment training data set;
[0029] If the text information stored in the leaf node is not a behavior description statement, then generating behavior description training data according to the third preset description template and the fourth preset description template respectively and adding them to the behavior description judgment training data set;
[0030] Obtaining a type label of the leaf node, and obtaining text information stored in the leaf node or a parent node of the leaf node according to the type label;
[0031] According to the type of qualifiers contained in the text information stored in the leaf node or the parent node of the leaf node, the text information stored in the leaf node is added to the negative behavior description data set or the positive behavior description data set, and the behavior polarity entry data of the text information stored in the leaf node is generated according to the first preset polarity template or the second preset polarity template and added to the behavior polarity analysis training data set.
[0032] In one or some embodiments, the pre-built classification model is a BERT model, and the BERT model includes an encoding input layer, a feedforward network, and a softmax layer;
[0033] The using the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train the pre-built classification models to obtain a behavior description judgment model and a behavior polarity analysis model includes:
[0034] Traversing the behavior description training data in the behavior description judgment training data set, and separating the behavior description training data into a first sub-element and a second sub-element;
[0035] Converting each character of the first sub-element into a behavioral character encoding consisting of a word vector embedding, a sentence embedding, and a position embedding in the encoding input layer;
[0036] Inputting the behavior character code into the feedforward network, and using the softmax layer to convert the first output result of the feedforward network into a probability distribution to obtain a behavior classification result probability value;
[0037] The BERT model is evaluated and optimized through the pre-built first cross entropy loss function to obtain the behavior description judgment model Wherein, the first cross entropy loss function is constructed based on the second sub-element and the behavior classification result probability value;
[0038] as well as,
[0039] Traversing the behavior polarity entry data in the behavior description judgment training data set, and separating the behavior polarity entry data into a third sub-element and a fourth sub-element;
[0040] Converting each character of the third sub-element into a polar character encoding consisting of word vector embedding, sentence embedding and position embedding in the encoding input layer;
[0041] Inputting the polarity character code into the feedforward network, and using the softmax layer to convert the second output result of the feedforward network into a probability distribution to obtain a polarity classification result probability value;
[0042] The BERT model is evaluated and optimized by using a pre-constructed second cross entropy loss function to obtain a behavior polarity analysis model; wherein the second cross entropy loss function is constructed based on the fourth sub-element and the probability value of the polarity classification result.
[0043] In one or some embodiments, judging each paragraph in the audit file based on the behavior description judgment model to determine whether the paragraph is a behavior description statement includes:
[0044] Segment the to-be-audited file according to natural segments to generate a segmented data set;
[0045] Traversing each paragraph in the segmented data set, and generating first behavior judgment data and second behavior judgment data of the paragraph respectively according to the behavior description judgment template;
[0046] Inputting the first behavior judgment data and the second behavior judgment data into the behavior description judgment model respectively to obtain a first probability value and a second probability value;
[0047] If the first probability value is less than the second probability value, the paragraph is a behavior description statement.
[0048] In one or some embodiments, the analyzing each behavior description statement in the to-be-audited file based on the behavior polarity analysis model to obtain a corresponding behavior polarity analysis result includes:
[0049] Generating first polarity analysis data and second polarity analysis data for each behavior description sentence respectively according to the behavior polarity analysis template;
[0050] Inputting the first polarity analysis data and the second polarity analysis data into the behavior polarity analysis model respectively to obtain a positive behavior probability value and a negative behavior probability value of the behavior description sentence;
[0051] If the positive behavior probability value is less than the negative behavior probability value, the behavior polarity analysis result is negative;
[0052] If the positive behavior probability value is greater than the negative behavior probability value, the behavior polarity analysis result is positive.
[0053] In one or some embodiments, the audit trail includes positive audit trails and negative audit trails;
[0054] The step of determining the audit clues based on the behavior polarity analysis results of each behavior description statement and combining the positive behavior description data set and the negative behavior description data set includes:
[0055] Each element in the positive behavior description data set is segmented to obtain a corresponding positive content set;
[0056] For each behavior description sentence in the segmented data set whose behavior polarity analysis result is negative, calculating a first similarity between the behavior description sentence and each of the positive content sets;
[0057] Adding the behavior description sentence whose first similarity is greater than a first similarity threshold as a candidate clue to the first candidate data set;
[0058] Screening the candidate clues of the first screening clue quantity from the first candidate data set in the order of the first similarity from high to low as negative audit clues;
[0059] as well as,
[0060] Each element in the negative behavior description data set is segmented to obtain a corresponding negative content set;
[0061] For each behavior description sentence in the segmented data set whose behavior polarity analysis result is positive, calculating a second similarity between the behavior description sentence and the negative content set;
[0062] Adding the behavior description sentence whose second similarity is greater than a second similarity threshold as a candidate clue to the second candidate data set;
[0063] In descending order of the second similarity, a second number of candidate clues are screened from the second candidate data set as positive audit clues.
[0064] In one or some embodiments, the first similarity is determined by the following formula:
[0065]
[0066] In the formula, represents the first similarity, Indicates that any behavior polarity analysis result in the split data set is negative behavior description statement, Represents the positive behavior description dataset Any element in Represents the positive content set, s i Represents a positive content collection Any element in and They are and The vector representation of ;
[0067] The second similarity is determined by the following formula:
[0068]
[0069] In the formula, represents the second similarity, Indicates that any behavior polarity analysis result in the segmented data set is a positive behavior description statement, Represents the negative behavior description dataset Any element in Represents a negative content set, s j Represents a negative content collection Any element in and They are and The vector representation of .
[0070] In a second aspect, the present invention provides an audit clue determination device for file compliance audit, comprising:
[0071] An analysis tree construction module is used to traverse the legal and regulatory set, convert each legal and regulatory document in the legal and regulatory set into an analysis tree, and obtain an analysis tree set;
[0072] A data set construction module, used to establish a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set and a negative behavior description data set according to the text information stored in each leaf node of each analysis tree in the analysis tree set;
[0073] A model training module, used to use the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train a pre-built classification model to obtain a behavior description judgment model and a behavior polarity analysis model;
[0074] A judgment module, used to judge each paragraph in the audit file based on the behavior description judgment model to determine whether the paragraph is a behavior description statement;
[0075] A polarity analysis module, used for analyzing each behavior description statement in the audit file based on the behavior polarity analysis model to obtain a corresponding behavior polarity analysis result;
[0076] The audit clue determination module is used to determine the audit clue according to the behavior polarity analysis results of each behavior description statement, combined with the positive behavior description data set and the negative behavior description data set.
[0077] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the audit trail determination method for file compliance audit as described in the first aspect.
[0078] In a fourth aspect, the present invention provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0079] Memory, used to store computer programs;
[0080] The processor is used to implement the audit trail determination method for file compliance audit as described in the first aspect when executing the program stored in the memory.
[0081] Based on the above technical solution, the beneficial effects of the present invention compared with the prior art are as follows:
[0082] The audit clue determination method for file compliance audit provided by the present invention converts the legal and regulatory documents in the legal and regulatory set into an analysis tree, and establishes a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set, and a negative behavior description data set according to the text information stored in each leaf node of each analysis tree. The behavior description judgment training data set and the behavior polarity analysis training data set are used to train a pre-built classification model to obtain a behavior description judgment model and a behavior polarity analysis model. The behavior description judgment model can automatically judge each paragraph of the audit file to determine whether the paragraph is a behavior description statement. The behavior polarity analysis model can automatically determine the polarity of the behavior description statement and obtain a behavior polarity analysis result. The positive behavior description data set and the negative behavior description data set are combined to determine the audit clues, and the rapid screening of the file compliance audit clues is realized, which can assist the audit work to quickly find a breakthrough and improve the efficiency of the file compliance audit.
[0083] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0084] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0086] Figure 1 It is a flowchart of a method for determining audit clues for file compliance auditing provided by an embodiment of the present invention;
[0087] Figure 2 It is a general concept diagram of an audit clue determination method for file compliance audit provided by an embodiment of the present invention;
[0088] Figure 3 It is a structural schematic diagram of an audit clue determination device for file compliance audit provided by an embodiment of the present invention;
[0089] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0090] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0091] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0092] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0093] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0094] Organizations generally establish dedicated compliance departments or hire compliance professionals to formulate compliance policies, oversee compliance processes, and provide training and guidance to ensure that business activities meet applicable compliance requirements. The inventors found in their work that compliance audits are usually performed by professional legal personnel based on manual judgment based on experience. Manual audits are labor-intensive and overly dependent on personnel's professional knowledge. Improving audit efficiency and completing the initial screening of audit clues through machine means have become urgent issues to be addressed.
[0095] Existing solutions use expert engineering methods to introduce technical means such as rule engines and knowledge graphs to achieve file compliance audits, which improves efficiency to a certain extent. However, the cost of writing rules and building knowledge graphs is high and the scope of application is relatively limited. In addition, there are also supervised learning methods to train models to automatically discover file compliance audit clues, but a large amount of training data needs to be prepared, which cannot be applied on a large scale. The methods in the prior art cannot meet the inventor's expectations. After further research and development, the inventor made the present invention.
[0096] Embodiment 1
[0097] The present invention proposes an audit clue determination method for file compliance audit, which realizes the rapid screening of audit clues. First, a general legal and regulatory document preprocessing method is proposed to process legal and regulatory documents, and a behavior description judgment training data set and a behavior polarity analysis training data set are constructed without manual labeling to train classification models, and the behavior description judgment model and the behavior polarity analysis training data set are obtained respectively. and behavioral polarity analysis models This behavior describes the judgment model It can automatically determine whether the paragraphs in the audited document are behavior description statements, so as to filter out the behavior description statements in the audited document; then, through the behavior polarity analysis model Analyze the polarity of the behavior description statement; finally, based on the behavior polarity analysis results, combined with the positive behavior description dataset and Negative Behavior Description Dataset Discover and output audit trails.
[0098] Reference Figure 1 As shown, before screening the audit clues of the files to be audited, a behavior description judgment model is constructed in advance through S101-S103 and behavioral polarity analysis models The model building process is as follows:
[0099] S101. Obtaining a collection of laws and regulations Collect the laws and regulations Each legal document in is converted into a parsing tree T k , get the analysis tree set
[0100] Traverse the legal and regulatory collection Preprocessing is performed, m represents the number of legal and regulatory documents. The specific process of preprocessing is to collect legal and regulatory documents Any legal and regulatory documents in k Convert the parse tree T into a tree structure k , a collection of laws and regulations The generated set of parse trees is
[0101] S102: According to the analysis tree set Each parse tree T k Each leaf node Stored text information to build a behavioral description judgment training data set Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset
[0102] The present invention analyzes the tree set Processing can build a behavior description judgment training data set and behavioral polarity analysis training dataset Specifically, for any parse tree Traverse all its leaf nodes For any leaf node Determine leaf nodes by regular expression Stored text information Whether it is a behavior description statement, the present invention uses a regular expression containing keywords to quickly determine whether it is a behavior description statement. Keywords include negative limiting words, such as: prohibit, strictly prohibit, strictly prohibit, not allowed, not allowed, limit, order rectification, etc., and positive encouraging words, such as: encourage, advocate, support, promote, guide, promote, etc. According to the keyword type contained in the text information stored in the leaf node or its parent node, the leaf node is The stored text information is added to the positive behavior description dataset or Negative Behavior Description Dataset middle.
[0103] S103: Using the behavior description to determine the training data set and the behavioral polarity analysis training dataset Train the pre-built classification models separately to obtain the behavior description judgment model and behavioral polarity analysis models
[0104] Use behavioral descriptions to judge the training data set and behavioral polarity analysis training dataset Train the behavior description judgment model and behavioral polarity analysis models The training methods of the two models are the same, and any data set Convert to sentence relationship dataset for existing classification model Pre-training is performed to obtain the behavior description judgment model and behavioral polarity analysis models The classification model may be a BERT model.
[0105] When it is necessary to audit the compliance of legal and regulatory documents, the above-mentioned behavior description judgment model can be applied and behavioral polarity analysis models Judge and analyze the audit documents to achieve rapid screening of document compliance audit clues. The specific process is as follows:
[0106] S104: Determine the model based on the behavior description A judgment is made on each paragraph in the audit file to determine whether the paragraph is a behavior description statement.
[0107] S105: Based on the behavior polarity analysis model Each behavior description statement in the file to be audited is analyzed respectively to obtain a corresponding behavior polarity analysis result.
[0108] S106: Based on the behavior polarity analysis results of each behavior description sentence, combined with the positive behavior description data set and the negative behavior description dataset Identify audit trails.
[0109] For documents to be audited Judging the model by describing the behavior Determine whether a paragraph is a behavior description statement, and then use the behavior polarity analysis model The polarity of the paragraphs belonging to the behavior description sentences is judged to obtain the behavior polarity analysis results. According to the behavior polarity analysis results, combined with the positive behavior description dataset and the negative behavior description dataset Finally, the audit trail is output.
[0110] The audit clue determination method for file compliance audit provided by the present invention is to Legal and regulatory documents in k Convert to parse tree T k , and according to each analysis tree T k Each leaf node Stored text information to build a behavioral description judgment training data set Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset Using behavioral descriptions to judge training datasets and behavioral polarity analysis training dataset Train the pre-built classification model to obtain the behavior description judgment model and behavioral polarity analysis models Behavior Description Judgment Model It can automatically judge each paragraph of the audit document to determine whether the paragraph is a descriptive statement. Behavior Polarity Analysis Model It can automatically determine the polarity of the behavior description statement and obtain the behavior polarity analysis result. And combined with the positive behavior description data set and Negative Behavior Description Dataset Determining audit clues and realizing rapid screening of document compliance audit clues can assist the audit work in finding breakthroughs quickly and improve the efficiency of document compliance audits. Compared with the prior art method of using expert engineering and introducing technical means such as rule engines and knowledge graphs to realize document compliance audits, the present invention reduces cost investment by proposing a generalized legal and regulatory document preprocessing method and an automatic judgment method through a model, and can be applied to various documents to be audited, with a wide range of applications. Compared with the prior art method of using supervised learning methods to train models to automatically discover document compliance audit clues, the present invention adopts a zero-labeled classification model training method to automatically construct a behavior description judgment training data set by traversing the tree structure data of legal and regulatory documents. Behavioral polarity analysis training dataset Complete the behavior description judgment model and behavioral polarity analysis models There is no need to prepare a large amount of training data for training, and it can be applied on a wide range of occasions.
[0111] In an optional embodiment, the legal and regulatory document 1 in S101 is converted into k Convert to parse tree T k :
[0112] S1011. Based on the legal documents l k Set the root node by the name;
[0113] Set up legal documents k The corresponding tree structure T k The root node is The root node records the names of laws and regulations Right now
[0114] S1012, extract the legal and regulatory documents l k All the pieces of data, establishing a piece of data node corresponding to each piece of data at the root node;
[0115] Extract legal documents k All the data in Indicates l k The number of Indicates The text content corresponding to each piece of data, set the root node The child nodes, i.e., the data nodes, are Each data node records the "item" number and "item" text information, that is, "articles" indicates that the node type label is article, Δ indicates the "article" number, a Δ Indicates a piece of text information.
[0116] S1013, segmenting the text data of each piece of data according to natural segments to obtain a segmentation result;
[0117] For any data node The text data of this data is segmented according to natural segments, and the segmentation result is
[0118] S1014, using a sliding window to slide and traverse the segmentation results one by one from left to right, and adding branch and leaf nodes to each of the data nodes according to the paragraph type processed by the previous sliding window and the paragraph type processed by the current sliding window, to obtain a parsing tree;
[0119] Use a sliding window (point, last) with a width of 2 to slide from left to right through the segmentation results one by one point represents the currently processed paragraph, last represents the paragraph processed by the previous sliding window, and the initial value of the sliding window That is, p1 represents the currently processed paragraph, indicating that the previous calculated paragraph is empty. and respectively represent the paragraph type processed by the current sliding window and the paragraph type processed by the previous sliding window, and the type is one of "section", "item", "sub-item", "empty". According to the writing specification of legal provisions, the analysis tree T k is incremented with leaf nodes by traversing the article data nodes Processing each article data of the article data node according to S1013 - S1014, and constructing the legal and regulatory document l k corresponding analysis tree T k .
[0120] In an alternative embodiment, according to the paragraph type processed by the previous sliding window as described in S1014 above and the paragraph type processed by the current sliding window increment the leaf nodes of each said article data node to obtain the analysis tree T k , including:
[0121] Increment the leaf nodes of each said article data node in the following manner to obtain the analysis tree T k :
[0122] S10141. If the paragraph type processed by the current sliding window is a section, and the paragraph type processed by the previous sliding window is empty, then add a child node to the said article data node, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0123] If and are "section" and "empty" respectively, then add a child node of the article data node k to T and record the text information corresponding to the section in the newly added node, where, Λ represents the paragraph number of "section", p represents the text content corresponding to point, and paragraphs represents that the paragraph type of the newly added node is a section. ★ S10142. If the paragraph type processed by the current sliding window
[0124] is the same as the paragraph type processed by the previous sliding window and If they are consistent, add the sibling node of the node corresponding to the paragraph processed in the previous sliding window, and record the text information corresponding to the paragraph processed in the current sliding window in the newly added node;
[0125] If and are "section" and "section" respectively, then add a data node k to the analysis tree T as the child node of i.e., the sibling node of the previous section node, and record the text information corresponding to the paragraph point processed currently in the node, i.e., where Λ represents the paragraph number of "section", p ★ represents the text content corresponding to point, and paragraphs represents that the paragraph type of the newly added node is section.
[0126] If and are "item" and "item" respectively, then add the sibling node of the node corresponding to the paragraph last processed in the previous sliding window k to the analysis tree T and record the text information corresponding to the paragraph point processed currently in the node, i.e., where Υ represents the number corresponding to "item", p★ represents the text content corresponding to point, and subparagraphs represents that the paragraph type of the newly added node is item.
[0127] If and are "sub-item" and "sub-item" respectively, then add the sibling node of the node corresponding to the paragraph last processed in the previous sliding window k to the analysis tree T and record the text information corresponding to the paragraph point processed currently in the node, i.e., where Ψ represents the number corresponding to "sub-item", p ★ represents the text content corresponding to point, and items represents that the paragraph type of the newly added node is sub-item.
[0128] S10143. If the paragraph type processed in the current sliding window is a subtype of the paragraph type processed in the previous sliding window
[0129] If and are "item" and "subparagraph" respectively, then add the sub-node of the node corresponding to the paragraph last processed by the previous sliding window in the analysis tree T k The node records the text information corresponding to the paragraph point currently being processed, that is of the sub-node The node records the text information corresponding to the paragraph point currently being processed, that is where Υ represents the number corresponding to "item", p * represents the text content corresponding to point, and subparagraphs indicates that the paragraph type of the newly added node is item.
[0130] If and are "sub-item" and "item" respectively, then add the sub-node of the node corresponding to the paragraph last processed by the previous sliding window in the analysis tree T k The node records the text information corresponding to the paragraph point currently being processed, that is of the sub-node The node records the text information corresponding to the paragraph point currently being processed, that is where Ψ represents the number corresponding to "sub-item", p ★ represents the text content corresponding to point, and items indicates that the paragraph type of the newly added node is sub-item.
[0131] S10144. If the paragraph type processed by the previous sliding window is a subtype of the paragraph type processed by the current sliding window then add the sibling node of the parent node of the paragraph type processed by the previous sliding window and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node;
[0132] If and are "subparagraph" and "item" respectively, then add the sub-node of the bar data node k in the analysis tree T of the sub-node That is, the sibling node of the parent node "subparagraph" corresponding to the paragraph last processed by the previous sliding window. The node records the text information corresponding to the paragraph point currently being processed, that is where Λ represents the paragraph number of "subparagraph", p ★ represents the text content corresponding to point, and paragraphs indicates that the paragraph type of the newly added node is subparagraph.
[0133] If and are "item" and "sub-item" respectively, then add the sibling node of the parent node of the paragraph last processed by the previous sliding window in T k The node records the text information corresponding to the paragraph point currently being processed, that is of the sibling node That is, the sibling node of the "item" which is the parent node of the target node. The node records the text information corresponding to the paragraph point being currently processed, that is where Υ represents the number corresponding to the "item", p ★ represents the text content corresponding to point, and subparagraphs indicates that the paragraph type of the newly added node is item.
[0134] S10145. If the paragraph type processed by the previous sliding window is the grandchild type of the paragraph type processed by the current sliding window then add the sibling node of the ancestor node of the paragraph type processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node.
[0135] If and are "subparagraph" and "item" respectively, then add a child node in T k which is the sibling node of the ancestor node "subparagraph" of the node corresponding to the paragraph type processed by the previous sliding window, that is, "subparagraph". The node records the text information corresponding to the paragraph point being currently processed, that is where Λ represents the paragraph number of the "subparagraph", p represents the text content corresponding to point, and paragraphs indicates that the paragraph type of the newly added node is subparagraph. ★
[0136] If and are other situations, there is a structural error in the legal and regulatory document, and the analysis tree T k fails to be generated.
[0137] Taking Article 54 of the Administrative Litigation Law of the People's Republic of China as an example, it illustrates how to generate the tree structure of this article of the regulations.
[0138] Article 54 After the people's court has heard a case, it shall render the following judgments respectively according to different circumstances: ①
[0139] (1) Where the specific administrative act is supported by conclusive evidence, applies the correct laws and regulations, and complies with the legal procedures, judgment shall be made to maintain the act. ②(2) Where the specific administrative act falls under any of the following circumstances, judgment shall be made to revoke or partially revoke the act, and the defendant may be ordered to make a new specific administrative act: ③
[0140] (i) Where the essential evidence is insufficient; ④
[0141] (ii) Where the laws or regulations applied are incorrect; ⑤
[0142] (iii) Where...
[0143] ⒊Violation of legal procedures; ⑥
[0144] 4. Exceeding the authority; 7.
[0145] ⒌ Abuse of power. ⑧
[0146] (3) If the defendant fails to perform or delays in performing his statutory duties, he shall be ordered to perform them within a certain period of time.
[0147] (IV) If an administrative penalty is manifestly unfair, the court may make a ruling to modify it.
[0148] The tree structure corresponding to this regulation is ①(②,③(④,⑤,⑥,⑦,⑧)⑨,⑩), where the parent node is written on the left side of the brackets, and the remaining nodes other than the parent node are written in brackets and separated by commas.
[0149] Another example: Article 10 of the Anti-Unfair Competition Law of the People's Republic of China
[0150] Article 10 Operators shall not engage in the following circumstances when conducting sales with prizes: ①
[0151] (1) The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are not clear, which affects prize redemption;
[0152] (ii) Conducting sales with prizes by falsely claiming there are prizes or deliberately allowing an undecided person to win a prize;
[0153] (III) Sales with prizes in the form of lottery, where the highest prize is more than 50,000 yuan.
[0154] The corresponding tree structure is ①(②,③,④).
[0155] In an optional embodiment, the above S102 establishes a behavior description judgment training data set based on the text information stored in each leaf node of each analysis tree in the analysis tree set. Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset include:
[0156] S1021. Constructing a behavior description judgment training data set Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset
[0157] First pre-build the behavior description judgment training data set Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset
[0158] For each parse tree in the parse tree set, traverse the parse tree All leaf nodes of Process the leaf node according to steps S1022-S1024 Stored text information, and add the processed data to the behavior description judgment training data set Behavioral polarity analysis training dataset Positive Behavior Description Dataset or Negative Behavior Description Dataset , perform the following operations:
[0159] S1022: If the leaf node Stored text information If the sentence is a behavior description sentence, behavior description training data is generated according to the first preset description template and the second preset description template respectively and added to the behavior description judgment training data set If the leaf node Stored text information If it is not a behavior description statement, then the behavior description training data is generated according to the third preset description template and the fourth preset description template respectively and added to the behavior description judgment training data set
[0160] Reference Figure 2 As shown, when the leaf node Stored text information When it is determined to be a behavior description statement, the first preset description template is used. and the second preset description template Generate behavior description training data separately and add behavior description judgment training data set where s T = "Description of behavior:",s F = "Other terms:". When the leaf node Stored text information If it is not a behavior description statement, follow the third preset description template And the fourth preset description template Generate behavior description training data and add behavior description judgment training data set
[0161] S1023. Obtain the leaf node A type tag, and obtaining text information stored in the leaf node or the parent node of the leaf node according to the type tag;
[0162] If a leaf node The type label is "paragraphs", then get the leaf node The text information stored. If the leaf node If the type tag is "subparagraphs" or "items", get the leaf node The text information stored in the parent node
[0163] S1024: adding the text information stored in the leaf node to the negative behavior description data set according to the type of qualifier contained in the text information stored in the leaf node or the parent node of the leaf node Or the positive behavior description dataset and generating the behavior polarity entry data of the text information stored in the leaf node according to the first preset polarity template or the second preset polarity template and adding the behavior polarity analysis training data set
[0164] The above qualifier types are negative qualifiers or positive qualifiers. If the leaf node The type label is "paragraphs", then get the leaf node The text information stored. When the leaf node Stored text information When negative qualifiers are included, the text information stored in the leaf node Add to the negative behavior description dataset According to the first preset polarity template and Generate leaf nodes Stored text information Behavior polarity entry data and added to the behavior polarity analysis training data set where s negative = "Prohibited behavior:", s positive = "Encourage behavior:"; when the leaf node Stored text information When it contains positive encouragement words, the leaf node Stored text information Add to the positive behavior description dataset According to the second preset polarity template and Generate leaf nodes The behavioral polarity entry data of the stored text information is added to the behavioral polarity analysis training data set
[0165] If a leaf node If the type tag is "subparagraphs" or "items", get the leaf node The text information stored in the parent node When the leaf node The text information stored in the parent node When a negative qualifier is included, the leaf node Stored text information Add to the negative behavior description dataset According to the first preset polarity template and Generate leaf nodes Stored text information Behavior polarity entry data and added to the behavior polarity analysis training data set where s negative = "Prohibited behavior:", s positive = "Encourage behavior:". When the leaf node The text information stored in the parent node When it contains positive encouragement words, the leaf node Stored text information Add to the positive behavior description dataset According to the second preset polarity template and Generate leaf nodes The behavioral polarity entry data of the stored text information is added to the behavioral polarity analysis training data set
[0166] Taking Article 10 of the Anti-Unfair Competition Law of the People’s Republic of China as an example, this paper explains how to generate a behavior description judgment training dataset. Behavior description training data and behavior polarity analysis training data set in Behavior polarity entry data in:
[0167] Article 10 Operators shall not engage in the following circumstances when conducting sales with prizes: ①
[0168] (1) The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are not clear, which affects prize redemption;
[0169] (ii) Conducting sales with prizes by falsely claiming there are prizes or deliberately allowing an undecided person to win a prize;
[0170] (III) Sales with prizes in the form of lottery, where the highest prize is more than 50,000 yuan.
[0171] The generated behavior description training data is as follows:
[0172] [[CLS] Behavior Description Constraints: [SEP] The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are unclear, affecting prize redemption [EOS]||True]
[0173] [[CLS]Other terms: [SEP]The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are not clear, affecting prize redemption [EOS]||False]
[0174] [[CLS] Behavior Description Constraints: [SEP] Using fraudulent means to falsely claim that there are prizes or deliberately let insiders win prizes to conduct prize sales [EOS]||True]
[0175] [[CLS]Other terms: [SEP]Selling prizes by falsely claiming there are prizes or deliberately letting insiders win prizes [EOS]||False]
[0176] [[CLS] Behavior Description Constraints: [SEP] Using fraudulent means to falsely claim that there are prizes or deliberately let insiders win prizes to conduct prize sales [EOS]||True]
[0177] [[CLS]Other terms: [SEP]Selling prizes by falsely claiming there are prizes or deliberately letting insiders win prizes [EOS]||False]
[0178] The generated behavior polarity entry data is as follows:
[0179] [[CLS] Prohibited behavior: [SEP] The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are unclear, affecting prize redemption [EOS]||True]
[0180] [[CLS] Encouraged behavior: [SEP] The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are not clear, affecting prize redemption [EOS]||False]
[0181] [[CLS] Prohibited behavior: [SEP] Conducting prize sales by falsely claiming there are prizes or deliberately letting an unknown person win the prize [EOS]||True]
[0182] [[CLS]Encouraged behavior: [SEP] Conducting prize sales by falsely claiming there are prizes or deliberately letting insiders win prizes [EOS]||False]
[0183] [[CLS] Prohibited behavior: [SEP] Conducting prize sales by falsely claiming there are prizes or deliberately letting an unknown person win the prize [EOS]||True]
[0184] [[CLS]Encouraged behavior: [SEP] Conducting prize sales by falsely claiming there are prizes or deliberately letting insiders win prizes [EOS]||False]
[0185] In an optional embodiment, the pre-built classification model is a BERT model, which includes an encoding input layer, a feedforward network and a softmax layer.
[0186] The above S103 uses the behavior description to determine the training data set Train the pre-built classification model to obtain the behavior description judgment model include:
[0187] S1031a, traversing the behavior description judgment training data set The behavior description training data in the embodiment of the present invention is separated into a first sub-element and a second sub-element.
[0188] Before training, first describe the behavior and judge the training data set Specifically, traverse the behavior description judgment training data set Any behavior description training data in the behavior description training data t is separated into two elements by ∥, which are the first sub-element t 1 , the second child element t 2 Taking the behavior description training data t "[[CLS] Behavior description constraint clause: [SEP] The type of prize, prize redemption conditions, prize amount or prize and other prize sales information are unclear, affecting prize redemption [EOS]||True]" as an example, the first sub-element t 1 Description of constraint clauses for [CLS] behavior: [SEP] The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are unclear, affecting prize redemption [EOS], the second child element t 2 is True.
[0189] S1032a, in the encoding input layer, the first sub-element t 1 Each character is converted into a behavioral character encoding consisting of word vector embedding, sentence embedding and position embedding
[0190] S1033a, inputting the behavior character code into the feedforward network, and using the softmax layer to convert the first output result of the feedforward network into a probability distribution to obtain a behavior classification result probability value.
[0191] Encoding characters The first output result is input into the feedforward network for feature extraction, and the softmax layer converts the first output result of the feedforward network into a probability distribution to obtain a classification result probability value p c , if p c If the first threshold value is met, True is output, otherwise False is output.
[0192] S1034a, evaluate and optimize the BERT model through the pre-built first cross entropy loss function to obtain the behavior description judgment model The first cross entropy loss function is constructed based on the second sub-element and the behavior classification result probability value.
[0193] By based on the second sub-element t 2 The model is evaluated by the first cross entropy loss function constructed by the output result of the judgment model, that is, the first output result mentioned above. If the evaluation result is less than the evaluation threshold, the training ends. If the evaluation result is greater than the evaluation threshold, the Adam optimizer is used to optimize the model parameters, and the iterative training model is continued to generate a behavior description judgment model. The structure and behavior character encoding of the above BERT model The generation process, the construction method of the first cross entropy loss function, and the evaluation and optimization method of the model can be referred to the description in the prior art and will not be repeated here.
[0194] The use of the behavioral polarity analysis training data set in S103 above Train the pre-built classification model to get the behavior polarity analysis model include:
[0195] S1031b, traversing the behavior description judgment training data set The behavioral polarity entry data in the , separating the behavioral polarity entry data into a third sub-element and a fourth sub-element.
[0196] Before training, analyze the behavioral polarity training data set Specifically, we traverse the behavioral polarity analysis training dataset. Any behavior polarity entry data in the, the behavior polarity entry data t is separated by ∥ into two elements, which are the third sub-element t 3 , the fourth sub-element t 4 Taking the behavior polarity entry data "[[CLS] Prohibited behavior: [SEP] The prize type, prize redemption conditions, prize amount or prizes and other prize sales information are unclear, affecting prize redemption [EOS]||True]" as an example, the third sub-element t 3Prohibited behavior for [CLS]: [SEP] The types of prizes, prize redemption conditions, prize amounts or prizes and other prize sales information are unclear, affecting prize redemption [EOS], the fourth sub-element t 4 is True.
[0197] S1032b, in the encoding input layer, the third sub-element t 3 Each character is converted into a polar character encoding consisting of word vector embedding, sentence embedding and position embedding
[0198] S1033b, inputting the polarity character code into the feedforward network, and using the softmax layer to convert the second output result of the feedforward network into a probability distribution to obtain a polarity classification result probability value.
[0199] Encoding polarity characters The second output result is input into the feedforward network for feature extraction, and the softmax layer converts the second output result of the feedforward network into a probability distribution to obtain a classification result probability value p c , if p c If the second threshold value is met, True is output, otherwise False is output.
[0200] S1034b. Evaluate and optimize the BERT model through the pre-built second cross entropy loss function to obtain a behavior polarity analysis model. Wherein, the second cross entropy loss function is constructed based on the fourth sub-element and the polarity classification result probability value;
[0201] The model is evaluated by the second cross entropy loss function. If the evaluation result is less than the evaluation threshold, the training ends. If the evaluation result is greater than the evaluation threshold, the Adam optimizer is used to optimize the model parameters and the model training continues. Finally, the behavior polarity analysis model is generated. The structure of the above BERT model, polarity character encoding The generation process, the construction method of the second cross entropy loss function, and the evaluation and optimization method of the model can be referred to the description in the prior art and will not be repeated here.
[0202] The first and second cross entropy loss functions can be:
[0203]
[0204] N is the behavior description judgment training data set Or behavioral polarity analysis training dataset The number of samples in y iis the true label of the i-th sample, which is the one-hot encoding of the second or fourth sub-element, p i is the probability value of the classification result obtained after the i-th sample passes through the softmax layer of the BERT model. The cross entropy loss measures the difference between the probability distribution predicted by the model and the true label. The smaller the value, the more accurate the model prediction.
[0205] In an optional embodiment, the above S104 determines the model based on the behavior description Each paragraph in the audit file is judged to determine whether the paragraph is a behavior description statement, including:
[0206] S1041. The documents to be audited are sorted according to the natural paragraphs. Split and generate split data sets n is the number of paragraphs in the document.
[0207] S1042 , traverse each paragraph in the segmented data set, and generate first behavior judgment data and second behavior judgment data for the paragraph according to the behavior description judgment template.
[0208] Traverse the split data set For any element d * , judging templates according to behavior descriptions [CLS]s F [SEP]d * [EOS] and [CLS]s T [SEP]d * [EOS] Generate the first line judgment data respectively The second line is judgment data
[0209] S1043: input the first behavior judgment data and the second behavior judgment data into the behavior description judgment model respectively A first probability value and a second probability value are obtained.
[0210] Set the first line to judge the data And the second behavior judgment data As behavior description judgment model Input, calculate the first probability value and the second probability value
[0211] S1044: If the first probability value Less than the second probability value Then the paragraph d *is a behavior description statement; otherwise, the process returns to step S1042 to execute a process of generating first behavior judgment data and second behavior judgment data for the next paragraph in the segmented data set.
[0212] In an optional embodiment, the behavior polarity analysis model described in S105 above Analyze each behavior description statement in the audit file to obtain the corresponding behavior polarity analysis results, including:
[0213] S1051, generating first polarity analysis data and second polarity analysis data for each behavior description sentence according to the behavior polarity analysis template;
[0214] For each paragraph of a behavior description statement, follow the behavior polarity analysis template [CLS]s positive [SEP]d * [EOS] and [CLS]s negative [SEP]d * [EOS] Generate first polarity analysis data and second polarity analysis data
[0215] S1052: the first polarity analysis data and second polarity analysis data Input the behavioral polarity analysis model respectively Get the positive behavior probability value of the behavior description sentence and negative behavior probability If the positive behavior probability value Less than the negative behavior probability value The behavior polarity analysis result is negative; if the positive behavior probability value Greater than the negative behavior probability value Then the behavior polarity analysis result is positive.
[0216] In an optional embodiment, the audit clues in S106 include positive audit clues and negative audit clues. and the negative behavior description dataset Identify audit trails, including:
[0217] S1061, describing the positive behavior data set Each element in is split separately to obtain the corresponding positive content set.
[0218] First, set the number of first screening clues k pand the first similarity threshold θ p ; Then, traverse the positive behavior description dataset For any element Split by period and semicolon The content of the positive content collection
[0219] S1062: For each behavior description sentence in the segmented data set whose behavior polarity analysis result is negative, calculate a first similarity between the behavior description sentence and each of the positive content sets.
[0220] By formula Calculate the split data set The behavior description statement d is positive in the behavior polarity analysis result * and , that is, the first similarity mentioned above. Represents the positive behavior description dataset Any element in Represents the positive content set, s i Represents a positive content collection Any element in and They are and The vector representation of .
[0221] S1063: Add the behavior description sentences whose first similarity is greater than a first similarity threshold as candidate clues to the first candidate data set.
[0222] When the first similarity hour, For alternative clues, store in the first alternative data set Continue to traverse the split data set Execute step S1062 until the traversal is completed.
[0223] S1064: Filter the first number of screening clues k from the first candidate data set in descending order of the first similarity. p alternative clues as negative audit clues.
[0224] After the traversal is completed, according to the set first screening clue number k p From the first candidate dataset Get the k with the highest similarity p elements as negative audit clues.
[0225] S1065: Describing the negative behavior dataset Each element in is split separately to obtain the corresponding negative content set.
[0226] First, set the number of second screening clues k n and the second similarity threshold θ n ; Then, traverse the negative behavior description dataset For any element Split by period and semicolon The content of the negative content collection
[0227] S1066. For each behavior description sentence in the segmented data set whose behavior polarity analysis result is positive, calculate a second similarity between the behavior description sentence and the negative content set.
[0228] By formula calculate and The similarity of is the second similarity mentioned above, Indicates that any behavior polarity analysis result in the segmented data set is a positive behavior description statement, Represents the negative behavior description dataset Any element in Represents a negative content set, s j Represents a negative content collection Any element in and They are and The vector representation of .
[0229] S1067: Add the behavior description sentences whose second similarity is greater than a second similarity threshold as candidate clues to the second candidate data set.
[0230] When the second similarity hour, For alternative clues, store in the second alternative data set Continue to traverse the split data set Execute step S1066 until the traversal is completed.
[0231] S1068. Filter the candidate clues of the second screening clue quantity from the second candidate data set in the order of the second similarity from high to low as positive audit clues.
[0232] According to the set second screening clue number k n From the second candidate dataset Get the k with the highest similarity nelements as positive audit clues. All positive and negative audit clues are provided to auditors for them to audit the compliance of the audit documents.
[0233] The first similarity and the second similarity may also be calculated using the BM25 algorithm. The specific calculation method may refer to the description of the BM25 algorithm in the prior art, which will not be described in detail here.
[0234] For ease of understanding, the present invention uses the method of obtaining positive audit clues of the audited file as an example to illustrate. For example, the current laws and regulations stipulate that "the location of the unit shall not be restricted". Since the negative qualifier "shall not" appears, when constructing the behavior description data set, this data will be classified into the negative behavior description data set. If "must be a local unit" appears in the audit file, it will be analyzed by the behavior polarity analysis model. Determined as positive behavior. The things that the newly formulated regulations allow to be done in the audited documents cannot be contrary to the things that are prohibited by the current laws and regulations, that is, the positive behavior cannot be described in the negative behavior data set Therefore, in order to prevent the laws and regulations in the audited documents from being inconsistent with the existing laws and regulations, the behavior description statements with positive behavior polarity analysis results in the audited documents need to be compared with the negative behavior description dataset. The similarity calculation is performed on the elements in the audit file to obtain positive audit clues. For the behavior description sentences with negative behavior polarity analysis results in the audit file, the positive behavior description dataset is compared with the The similarity of the elements in is calculated to obtain negative audit clues.
[0235] The present invention proposes a general legal and regulatory document preprocessing method to convert legal and regulatory documents into a tree structure. The present invention also adopts a zero-label classification model training method to automatically construct a behavior description judgment training data set by traversing the tree structure data of legal and regulatory documents. Behavioral polarity analysis training dataset Complete the behavior description judgment model and behavioral polarity analysis models This behavior describes the judgment model It can automatically find the paragraphs of the audited file that contain behavior description statements, and use the trained behavior description judgment model Extract the behavior description statements in the audit file and analyze them through the behavior polarity analysis model The polarity of the behavior description statement is judged, and then the semantic similarity algorithm is used to evaluate whether the behavior description statement in the audited file is inconsistent with the behavior in the laws and regulations, and finally the audit clues are output. This method generalizes the preprocessing method of legal and regulatory documents and uses unsupervised learning to build a behavior description judgment model. and behavioral polarity analysis models The rapid discovery of audit clues for file compliance is achieved. It can assist the audit work to find breakthroughs quickly and improve the efficiency of the audit work to a certain extent. It has the characteristics of wide application range and high efficiency. Compared with the existing technology that uses expert engineering and introduces technical means such as rule engines and knowledge graphs to achieve file compliance audits, the present invention reduces the cost investment by proposing a generalized legal and regulatory document preprocessing method and an automatic judgment method through a model, and can be applied to various files to be audited, with a wide range of applications. Compared with the existing technology that uses a supervised learning method to train a model to automatically discover file compliance audit clues, the present invention does not need to prepare a large amount of training data and can be applied on a large scale.
[0236] Embodiment 2
[0237] The embodiment of the present invention provides an audit clue determination device for file compliance audit, referring to Figure 3 As shown, including:
[0238] The analysis tree construction module 201 is used to traverse the legal and regulatory set, convert each legal and regulatory document in the legal and regulatory set into an analysis tree, and obtain an analysis tree set;
[0239] The data set construction module 202 is used to establish a behavior description judgment training data set based on the text information stored in each leaf node of each analysis tree in the analysis tree set. Behavioral polarity analysis training dataset Positive Behavior Description Dataset and Negative Behavior Description Dataset
[0240] Model training module 203, used to use the behavior description to determine the training data set and the behavioral polarity analysis training dataset Train the pre-built classification models separately to obtain the behavior description judgment model and behavioral polarity analysis models
[0241] A judgment module 204 is used to judge the model based on the behavior description. Each paragraph in the audit document is judged to determine whether the paragraph is a behavior description statement;
[0242] Polarity analysis module 205, used for analyzing the behavior polarity model based on the behavior polarity model Analyze each behavior description statement in the audit file to obtain corresponding behavior polarity analysis results;
[0243] Audit clue determination module 206, used to analyze the behavior polarity analysis results of each behavior description statement and combine the positive behavior description data set and the negative behavior description data set to determine audit clues.
[0244] The implementation principle and technical effect of the audit clue determination device for file compliance audit provided by the embodiment of the present invention are similar to those of the aforementioned method embodiment, and will not be repeated here.
[0245] Embodiment 3
[0246] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the audit clue determination method for file compliance auditing as described in the aforementioned method embodiment is implemented.
[0247] The computer-readable storage medium may be included in the device / apparatus described in the above embodiment; or it may exist independently without being assembled into the device / apparatus. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.
[0248] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0249] Embodiment 4
[0250] An embodiment of the present invention provides an electronic device, referring to Figure 4 As shown, it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112 and the memory 113 communicate with each other through the communication bus 114;
[0251] A memory 113, for storing computer programs;
[0252] The processor 111 is used to implement the audit clue determination method for file compliance audit provided by the aforementioned method embodiment when executing the program stored in the memory 113.
[0253] The implementation principle and technical effect of the electronic device provided by the embodiment of the present invention are similar to those of the aforementioned method embodiment, and will not be described in detail here.
[0254] The above-mentioned memory 113 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 113 has a storage space for program codes for executing any method steps in the above-mentioned method. For example, the storage space for program codes may include various program codes for implementing various steps in the above method respectively. These program codes can be read from or written into one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are usually portable or fixed storage units. The storage unit may have a storage segment or storage space arranged similarly to the memory 113 in the above-mentioned electronic device. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit includes a program for executing the method steps according to an embodiment of the present invention, that is, a code that can be read by, for example, a processor 111, and when these codes are run by an electronic device, the electronic device performs the various steps in the method described above.
[0255] In this document, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The orientation or position relationship indicated by the terms "upper", "lower", etc. is based on the orientation or position relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0256] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict. The present invention is not limited to any single aspect, any single embodiment, or any combination and / or permutation of these aspects and / or embodiments. Each aspect and / or embodiment of the present invention can be used alone, or in combination with one or more other aspects and / or other embodiments.
[0257] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for determining audit clues for document compliance auditing, It is characterized in that include: Obtain a set of laws and regulations, and convert each law and regulation document in the set of laws and regulations into a parsing tree to obtain a set of parsing trees; According to the text information stored in each leaf node of each analysis tree in the analysis tree set, a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set and a negative behavior description data set are established; Using the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train the pre-built classification models to obtain a behavior description judgment model and a behavior polarity analysis model; Based on the behavior description judgment model, each paragraph in the audit file is judged to determine whether the paragraph is a behavior description statement; Analyze each behavior description statement in the audit file based on the behavior polarity analysis model to obtain corresponding behavior polarity analysis results; According to the behavior polarity analysis results of each behavior description statement, the audit clue is determined in combination with the positive behavior description data set and the negative behavior description data set.
2. The audit clue determination method for file compliance audit according to claim 1, It is characterized in that The legal and regulatory documents are converted into analysis trees in the following ways: Setting a root node based on the name of the legal and regulatory document; Extract all pieces of data of the legal and regulatory documents, and establish a piece of data node corresponding to each piece of data in the root node; Segment the text data of each piece of data according to natural segments to obtain segmentation results; Use a sliding window to slide and traverse the segmentation results one by one from left to right, and according to the paragraph type processed by the previous sliding window and the paragraph type processed by the current sliding window, add branch and leaf nodes of each data node to obtain a parsing tree.
3. The audit clue determination method for file compliance audit according to claim 2, It is characterized in that According to the paragraph type processed by the previous sliding window and the paragraph type processed by the current sliding window, the branch and leaf nodes of each data node are added to obtain the analysis tree, including: The analysis tree is obtained by adding the leaf nodes of each data node in the following manner: If the paragraph type processed by the current sliding window is paragraph, and the paragraph type processed by the previous sliding window is null, then add a child node of the data node, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node; If the type of paragraph processed by the current sliding window is consistent with the type of paragraph processed by the previous sliding window, add a sibling node of the node corresponding to the paragraph processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node; If the paragraph type processed by the current sliding window is a subtype of the paragraph type processed by the previous sliding window, add a child node of the node corresponding to the paragraph type processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node; If the paragraph type processed by the previous sliding window is a subtype of the paragraph type processed by the current sliding window, add a sibling node of the parent node of the node corresponding to the paragraph type processed by the previous sliding window, and record the text information corresponding to the paragraph processed by the current sliding window in the newly added node; If the paragraph type processed by the previous sliding window is a grandchild type of the paragraph type processed by the current sliding window, a sibling node of the ancestor node of the node corresponding to the paragraph type processed by the previous sliding window is added, and text information corresponding to the paragraph processed by the current sliding window is recorded in the newly added node.
4. The audit clue determination method for file compliance audit according to claim 1, It is characterized in that The method of establishing a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set, and a negative behavior description data set based on the text information stored in each leaf node of each analysis tree in the analysis tree set includes: Constructing behavior description judgment training data set, behavior polarity analysis training data set, positive behavior description data set and negative behavior description data set; For each parse tree in the parse tree set, traverse all leaf nodes of the parse tree and perform the following operations: If the text information stored in the leaf node is a behavior description statement, then generating behavior description training data according to the first preset description template and the second preset description template respectively and adding them to the behavior description judgment training data set; If the text information stored in the leaf node is not a behavior description statement, then generating behavior description training data according to the third preset description template and the fourth preset description template respectively and adding them to the behavior description judgment training data set; Obtaining a type label of the leaf node, and obtaining text information stored in the leaf node or a parent node of the leaf node according to the type label; According to the type of qualifiers contained in the text information stored in the leaf node or the parent node of the leaf node, the text information stored in the leaf node is added to the negative behavior description data set or the positive behavior description data set, and the behavior polarity entry data of the text information stored in the leaf node is generated according to the first preset polarity template or the second preset polarity template and added to the behavior polarity analysis training data set.
5. The audit clue determination method for file compliance audit according to claim 1, It is characterized in that The pre-built classification model is a BERT model, which includes an encoding input layer, a feedforward network and a softmax layer; The using the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train the pre-built classification models to obtain a behavior description judgment model and a behavior polarity analysis model includes: Traversing the behavior description training data in the behavior description judgment training data set, and separating the behavior description training data into a first sub-element and a second sub-element; Converting each character of the first sub-element into a behavioral character encoding consisting of a word vector embedding, a sentence embedding, and a position embedding in the encoding input layer; Inputting the behavior character code into the feedforward network, and using the softmax layer to convert the first output result of the feedforward network into a probability distribution to obtain a behavior classification result probability value; The BERT model is evaluated and optimized by using a pre-constructed first cross entropy loss function to obtain a behavior description judgment model; wherein the first cross entropy loss function is constructed based on the second sub-element and the probability value of the behavior classification result; as well as, Traversing the behavior polarity entry data in the behavior description judgment training data set, and separating the behavior polarity entry data into a third sub-element and a fourth sub-element; Converting each character of the third sub-element into a polar character encoding consisting of word vector embedding, sentence embedding and position embedding in the encoding input layer; Inputting the polarity character code into the feedforward network, and using the softmax layer to convert the second output result of the feedforward network into a probability distribution to obtain a polarity classification result probability value; The BERT model is evaluated and optimized by using a pre-constructed second cross entropy loss function to obtain a behavior polarity analysis model; wherein the second cross entropy loss function is constructed based on the fourth sub-element and the probability value of the polarity classification result.
6. The audit clue determination method for file compliance audit according to claim 1, It is characterized in that The step of judging each paragraph in the audit file based on the behavior description judgment model to determine whether the paragraph is a behavior description statement includes: Segment the to-be-audited file according to natural segments to generate a segmented data set; Traversing each paragraph in the segmented data set, and generating first behavior judgment data and second behavior judgment data of the paragraph according to the behavior description judgment template; Inputting the first behavior judgment data and the second behavior judgment data into the behavior description judgment model respectively to obtain a first probability value and a second probability value; If the first probability value is less than the second probability value, the paragraph is a behavior description statement.
7. The audit clue determination method for file compliance audit according to claim 1, It is characterized in that The step of analyzing each behavior description statement in the to-be-audited file based on the behavior polarity analysis model to obtain a corresponding behavior polarity analysis result includes: Generating first polarity analysis data and second polarity analysis data for each behavior description sentence respectively according to the behavior polarity analysis template; Inputting the first polarity analysis data and the second polarity analysis data into the behavior polarity analysis model respectively to obtain a positive behavior probability value and a negative behavior probability value of the behavior description sentence; If the positive behavior probability value is less than the negative behavior probability value, the behavior polarity analysis result is negative; If the positive behavior probability value is greater than the negative behavior probability value, the behavior polarity analysis result is positive.
8. The audit clue determination method for file compliance audit according to claim 6, It is characterized in that The audit clues include positive audit clues and negative audit clues; The step of determining the audit clues based on the behavior polarity analysis results of each behavior description statement and combining the positive behavior description data set and the negative behavior description data set includes: Each element in the positive behavior description data set is segmented to obtain a corresponding positive content set; For each behavior description sentence in the segmented data set whose behavior polarity analysis result is negative, calculating a first similarity between the behavior description sentence and each of the positive content sets; Adding the behavior description sentence whose first similarity is greater than a first similarity threshold as a candidate clue to the first candidate data set; Screening the candidate clues of the first screening clue quantity from the first candidate data set in the order of the first similarity from high to low as negative audit clues; as well as, Each element in the negative behavior description data set is segmented to obtain a corresponding negative content set; For each behavior description sentence in the segmented data set whose behavior polarity analysis result is positive, calculating a second similarity between the behavior description sentence and the negative content set; Adding the behavior description sentence whose second similarity is greater than a second similarity threshold as a candidate clue to the second candidate data set; In descending order of the second similarity, a second number of candidate clues are screened from the second candidate data set as positive audit clues.
9. The audit clue determination method for file compliance audit according to claim 8, It is characterized in that The first similarity is determined by the following formula: In the formula, represents the first similarity, d n* Indicates that any behavior polarity analysis result in the split data set is negative behavior description statement, Represents the positive behavior description dataset Any element in represents the positive content set, s i Represents a positive content collection Any element in and They are d n* and The vector representation of ; The second similarity is determined by the following formula: In the formula, Represents the second similarity, d p* Indicates that any behavior polarity analysis result in the segmented data set is a positive behavior description statement, Represents the negative behavior description dataset Any element in Represents a negative content set, s j Represents a negative content collection Any element in and They are d p* and The vector representation of .
10. An audit clue determination device for document compliance audit, It is characterized in that include: An analysis tree construction module is used to traverse the legal and regulatory set, convert each legal and regulatory document in the legal and regulatory set into an analysis tree, and obtain an analysis tree set; A data set construction module, used to establish a behavior description judgment training data set, a behavior polarity analysis training data set, a positive behavior description data set and a negative behavior description data set according to the text information stored in each leaf node of each analysis tree in the analysis tree set; A model training module, used to use the behavior description judgment training data set and the behavior polarity analysis training data set to respectively train a pre-built classification model to obtain a behavior description judgment model and a behavior polarity analysis model; A judgment module, used to judge each paragraph in the audit file based on the behavior description judgment model to determine whether the paragraph is a behavior description statement; A polarity analysis module, used for analyzing each behavior description statement in the audit file based on the behavior polarity analysis model to obtain a corresponding behavior polarity analysis result; The audit clue determination module is used to determine the audit clue according to the behavior polarity analysis results of each behavior description statement, combined with the positive behavior description data set and the negative behavior description data set.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the audit trail determination method for file compliance auditing as described in any one of claims 1 to 9 is implemented.
12. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the audit trail determination method for file compliance audit as described in any one of claims 1 to 9 when executing a program stored in a memory.
