Auxiliary archive auditing method and system
By building audit details and sensitive thesaurus, combining large language model and DPRAG technology, the logical reasoning and insufficient data in long-text archive review are solved, efficient and accurate archive review is achieved, and reliable audit opinions are provided.
Patent Information
- Application Number
- CN202510263607.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-08-01
AI Technical Summary
When faced with long text, existing archive review technology lacks global information integration and logical relationship reasoning capabilities, lacks traceable logical reasoning, and it is difficult to judge the reliability of audit results. The training data is limited, resulting in poor generalization capabilities of model, and large models are prone to illusions of judgment and insufficient understanding in the field of archive review.
Build a review rules knowledge base and a sensitive word information base, use dense text search rules model and large language model for preprocessing and sensitive word matching, combine DPRAG technology for logical reasoning and classification, improve the model's logical reasoning ability through independent encoder, set sensitive word similarity thresholds and occurrence interval boundaries for accurate identification, and use control index levels for archive classification.
It improves the work efficiency and accuracy of archive review, can quickly process a type of archive, provides reliable review opinions for review experts to refer to, avoids complex training processes and large-scale model judgment illusions, and enhances the logical reasoning ability of lightweight large-language models in archive review.
Smart Images

Figure CN120407762A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of auxiliary file opening review, and particularly to an auxiliary file review method and system. Background Art
[0002] The file opening review work refers to reviewing files that are about to reach the retention period, and determining further treatment of the files according to whether the files themselves meet the relevant open indicators. With the development of the times, the social demand for open files shows a significant upward trend. Relevant departments are responsible for responding to the legitimate demands of the public to access files, while ensuring the security of sensitive information. However, with the huge amount of file data generated by digital development, the traditional manual review method can no longer cope with the increasing amount of files due to problems such as high human resource costs and low review efficiency. There is an urgent need to apply intelligent review and management technologies to the field of file opening review, improve the review efficiency through artificial intelligence, deep learning, and big data analysis technologies, and more accurately identify sensitive information to ensure the maximum protection of information security while meeting the public disclosure requirements. In the prior art, files are reviewed by establishing a format semantic library, a keyword library, and a semantic knowledge base, or a file classification identification model is constructed using a deep learning algorithm to identify the classification of files, or a conclusion is obtained by comprehensively considering the sensitive word identification coefficient and the semantic sensitivity identification coefficient.
[0003] Some problems and improvements can still be seen from the prior art; the existing file review technology still has deficiencies in data preprocessing. The method based on semantic analysis technology can better capture local semantic information of the text when processing short texts, but when facing long-text files with complex semantics, its ability to integrate global information and reason about logical relationships will be greatly attenuated. The prior art lacks effective preprocessing of long-text data; the existing file review technology has deficiencies in logical reasoning. Using deep learning or machine learning technology to abstract the review work into a binary classification or multi-classification review method, the final output result is a fixed label. It is difficult for the review personnel to trace the reasoning logic through the output result and quickly judge the reliability of the review result; the existing file review technology based on deep learning or machine learning requires a large amount of high-quality files as training data. Due to the confidentiality of files, it is difficult to obtain sufficient file data during the actual training process. When facing file content that has never been trained, the review method based on training is more likely to make misjudgments; although the file opening review technology based on large models has good language ability and logical reasoning ability, it may also have problems such as large model judgment hallucinations and insufficient understanding depth of file content when facing this vertical field of file review. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an auxiliary file audit method and system to solve the problem of insufficient data pre - processing, especially the weak ability to integrate global information and infer logical relationships of long texts, lack of traceable logical reasoning, difficulty in judging the reliability of audit results, limited training data, and difficulty in obtaining sufficient data due to file confidentiality, resulting in poor model generalization ability, and the large model is prone to judgment hallucinations and insufficient understanding in the field of file audit.
[0006] To solve the above - mentioned technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides an auxiliary file audit method, including:
[0008] Obtain and define the audit rule text and the training document structure, and construct an audit rule knowledge base and a training document library;
[0009] Obtain and define sensitive word information, and construct a sensitive word information library;
[0010] Use the audit rule knowledge base and the training document library to train a dense text retrieval rule model to obtain a first dense text retrieval rule model;
[0011] Deploy the large - language model and the first dense text retrieval rule model, input the document information to be audited, and pre - process the document information to obtain the first document information;
[0012] Based on the sensitive word information library, perform the first sensitive word matching on the first document information respectively, and make a first judgment on the matching result;
[0013] Based on the first judgment result, use the large - language model to assist in file audit, and classify the files according to the output control index level.
[0014] As a preferred solution of the auxiliary file audit method of the present invention, wherein: using the audit rule knowledge base and the training document library to train the dense text retrieval rule model includes:
[0015] The training set includes the document to be audited and the first audit rule sequence;
[0016] Perform average pooling on the document to be audited and the first audit rule sequence to obtain the corresponding first audit rule vector and document vector.
[0017] As a preferred solution of the auxiliary file audit method of the present invention, wherein: it further includes:
[0018] Construct independent dense encoders with non - shared parameters, namely the first encoder and the second encoder;
[0019] Encode the first audit rule vector using the first encoder to obtain the first audit rule vector;
[0020] Encode the document vector using the second encoder to obtain the first document vector;
[0021] Perform similarity matching on the first audit rule vector and the first document vector, and iteratively update the first encoder and the second encoder using the first loss function.
[0022] As a preferred solution of the auxiliary file audit method described in the present invention, wherein: the preprocessing of the document information includes:
[0023] Input the file to be audited, extract the text of the file to be audited using the first extraction method, and unify the text encoding format;
[0024] Record the specific coordinates of a single-page file, determine the coordinate values of each line, calculate the average line height and average line spacing of the current page, and obtain the text key information and the body text information;
[0025] Input the text key information and the body text information into the first word segmentation tool to segment each piece of text;
[0026] Use the first word vector embedding model to construct corresponding dense vectors for the segmented key information and body text information respectively to obtain the first document information.
[0027] As a preferred solution of the auxiliary file audit method described in the present invention, wherein: the text key information and the body text information include:
[0028] Perform first preprocessing on the average line height and average line spacing to obtain the first average line height and the first average line spacing;
[0029] Classify the text content of each page;
[0030] If the line spacing between the upper and lower lines of a line is greater than the first threshold of the average line spacing by more than a certain amount, and the unilateral line spacing is greater than the second threshold of the average line spacing by more than a certain amount, or the line height of the current line is higher than the third threshold of the average line height by more than a certain amount, then it is the line where the key information is located, otherwise it is the line where the body text information is located;
[0031] Calculate the text line width and average line width of the body text information, and segment the lines where the body text information is located;
[0032] Mark the lines with a body text line width lower than the fourth threshold of the average line width as line breaks or mark the lines that end with a period and the starting coordinate of the second line text is greater than the fifth threshold of the average line width as line breaks.
[0033] As a preferred solution of the auxiliary file review method described in the present invention, wherein: the first sensitive word matching and the first judgment include:
[0034] Set the sensitive word similarity threshold as the first threshold, and the boundary of the occurrence times interval of the sensitive words in the text as the second threshold;
[0035] Import the key information and the text information into the sensitive word information library respectively for word-by-word matching of sensitive words;
[0036] For the key information, if the similarity of the word to be reviewed is higher than the first threshold, the sensitive word matching is successful, and the file is set to the sub-sensitive state of the key information;
[0037] For the text information, if the similarity of the word to be reviewed is higher than the first threshold, the sensitive word matching is successful, and the file with the number of successful sensitive word matches exceeding the second threshold is set as the sub-sensitive file of the text information;
[0038] Conduct the first judgment on the file to be reviewed. If the file to be reviewed has both the sub-sensitive file of the key information and the sub-sensitive file of the text information at the same time, it is marked as the control type;
[0039] If the file to be reviewed only has one of them or does not have either of them, the auxiliary file review is carried out.
[0040] As a preferred solution of the auxiliary file review method described in the present invention, wherein: using the large language model for auxiliary file review includes:
[0041] Calculate the first review rule with the highest relevance to the file to be reviewed by the first dense text retrieval rule model;
[0042] Combine the first review rule with the original text of the file to be reviewed and input it into the large language model to obtain the control index level;
[0043] Classify the file according to the control index level in combination with the sensitive word matching result.
[0044] In the second aspect, the present invention provides an auxiliary file review system, including:
[0045] The first construction module is used to obtain and define the review rule text and the training document structure body, and construct the review rule knowledge base and the training document library;
[0046] The second construction module is used to obtain and define the sensitive word information and construct the sensitive word information library;
[0047] The model training module is used to train the dense text retrieval rule model by using the review rule knowledge base and the training document library to obtain the first dense text retrieval rule model;
[0048] A preprocessing module is used to deploy a large language model and a first dense text retrieval rule model, input document information to be audited, and preprocess the document information to obtain first document information;
[0049] A matching module is used to perform first sensitive word matching on the first document information based on the sensitive word information library, and make a first judgment on the matching result;
[0050] A classification module is used to perform auxiliary file auditing using the large language model based on the first judgment result, and classify files according to the output control index level.
[0051] In a third aspect, the present invention provides a computing device, including:
[0052] A memory and a processor;
[0053] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the auxiliary file auditing method are implemented.
[0054] In a fourth aspect, the present invention provides a computer-readable storage medium that stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the auxiliary file auditing method are implemented.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention further improves the work efficiency and accuracy of file auditing. By integrating the advantages of the sensitive word auditing mode and artificial intelligence technology, introducing sensitive word auditing rules enables the method to have the ability to quickly process a certain type of files. At the same time, the intelligent processing of artificial intelligence is used to supplement the deficiencies in the semantic auditing level. Using sensitive word coefficients for hierarchical auxiliary auditing further improves the auditing efficiency. Using the DPRAG technology to realize the retrieval of auditing rules enhances the logical reasoning ability and judgment accuracy of the lightweight large language model in file auditing work. At the same time, the application of the large language model in auxiliary auditing work avoids complex fine-tuning and training, does not rely on a large number of file datasets. In the face of file types that have not been trained, through the reasoning ability of the model combined with auditing rules, relatively accurate auditing can still be achieved, and auditing opinions are provided for subsequent review experts to refer to. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0057] Figure 1 Schematic diagram of the overall process logic of the auxiliary file review method according to an embodiment of the present invention;
[0058] Figure 2 Auxiliary flowchart of the auxiliary file review method according to an embodiment of the present invention;
[0059] Figure 3 Auxiliary review judgment flowchart of the auxiliary file review method according to an embodiment of the present invention. Detailed implementation manners
[0060] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the following will describe in detail the specific implementation manners of the present invention with reference to the accompanying drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0061] Embodiment 1, referring to Figures 1 - 3 , Table 1, which is an embodiment of the present invention, provides an auxiliary file review method, including:
[0062] S100: Obtain and define the review rule text and the training document structure, and construct a review rule knowledge base and a training document library;
[0063] Specifically, the review personnel collect the review rule text and the training file text, and store them in.txt format respectively; for image data, the OCR technology is used to realize text conversion, and the converted text is copied and pasted into the.txt file with the corresponding file name. Each review rule text and each training file text independently occupy a.txt file;
[0064] Clean the review rule text and the training file text; input them into the corresponding.txt files respectively, and set the file encoding format to UTF-8 encoding format; loop through the file content, and remove the illegal characters and the specified special characters inside the file according to the characters declared in the encoding set;
[0065] Segment the review rule text and establish a uniquely corresponding index, including marking combined nouns, stop words, weak determiners and redundant words; input the review rule text into the LAC word segmentation tool for word segmentation;
[0066] Remove the stop words that appear in the text according to the setting, and remove the weak determiners and redundant words according to the part-of-speech characteristics of individual words; loop through the review rule text and set the length of the words in the segmented and cleaned review rule sequence text to n p , n pis an adjustable hyperparameter. For the review rule text with a word length less than n p use [PAD] for padding in the review rule text;
[0067] Establish an index for each review rule text. This index uniquely points to the corresponding review rule sequence, and the review rule sequence will be mapped to a unique d-dimensional dense vector belonging only to the corresponding review rule text by the EncoderP encoder during the training phase; t dimensional dense vector;
[0068] Calibrate the level Rank for each review rule in turn i , Rank i The range of Rank levels is from 1 to 6, with Rank6 being the highest and Rank1 being the lowest; The calibration of the review rule level follows the principle that the review rule with a smaller scope of action in the same field has a higher level than the review rule with a larger scope of action, and the specific review rule has a higher level than the vague and broad review rule. The calibration of the review rule level provides a reference standard for subsequent DPRAG retrieval of review rules, where the rule level is manually divided by reviewers in advance;
[0069] Define the review rule structure. The structure includes three fields: review rule level, review rule sequence index, and review rule text. Store the corresponding review rule text in the local review rule knowledge base with the review rule structure as the basic unit.
[0070] Segment and clean the training documents, and build a training document library, marking compound nouns, stop words, weak determiners, and redundant words. Input the training documents into the LAC word segmentation tool to perform word segmentation on each text and retain compound nouns; Remove the stop words that appear in the text according to the settings, and remove weak determiners and redundant words according to their part of speech; Traverse the training archives in a loop, and splice the data of the training archives after word segmentation and cleaning in each round and store them as a basic storage unit of a document in the training document library.
[0071] It should be noted that the efficient preprocessing and organization of the review rule text and training documents are realized, improving the review efficiency and accuracy, enhancing the flexibility and scalability of the system, and providing support for the processing of complex texts.
[0072] S200: Obtain and define sensitive word information, and build a sensitive word information library;
[0073] Specifically, define the words that should increase the sensitivity coefficient of the document when they appear in the archive as sensitive information words. The selected range of sensitive information words includes specific people, places, times, events, organizations, and units; Reviewers upload a.txt document with sensitive information words, separated by spaces between each sensitive word;
[0074] Use the Word2Vec word vector embedding model to construct a dense vector of dimension τ (τ = n p ) for each sensitive word, and establish a unique index for each sensitive word, pointing to the corresponding sensitive word vector; define a sensitive word structure, which includes two fields: the sensitive word vector index and the sensitive word, and store the sensitive words in the local sensitive word information library with the sensitive word structure as the basic unit;
[0075] It should be noted that the efficient management and accurate identification of sensitive words are realized. Using the static word vector model to transform sensitive words into dense vectors is convenient for semantic matching and similarity calculation. At the same time, a unique index is established for each sensitive word to ensure fast retrieval and reference.
[0076] S300: Use the audit rule knowledge base and the training document library to train the dense text retrieval rule model to obtain the first dense text retrieval rule model;
[0077] S400: Deploy the large language model and the first dense text retrieval rule model, input the document information to be audited, and preprocess the document information to obtain the first document information;
[0078] S500: Based on the sensitive word information library, perform the first sensitive word matching on the first document information respectively, and make the first judgment on the matching result;
[0079] S600: Based on the first judgment result, use the large language model to assist in file auditing, and classify the files according to the output control index level.
[0080] It should be noted that the DPRAG retrieval technology is used to provide knowledge support for the LLM in the field of file auditing, enhance the decision-making of the LLM, and construct prompt words to realize the auxiliary auditing of the large model. Calibrate the sensitivity of the files to be audited and provide corresponding comprehensive audit opinions according to different sensitivity indicators. This method can provide strong assistance for the traditional manual file auditing work and further improve the auditing efficiency.
[0081] In the embodiment of the present application, the above step S300 includes the following sub-steps A1 - A2;
[0082] In A1: The training set includes the document to be audited and the first audit rule sequence;
[0083] In A2: Perform average pooling on the document to be audited and the first audit rule sequence to obtain the corresponding first audit rule vector and document vector.
[0084] Specifically, the first audit rule sequence includes n pA text sequence composed of words, with a unique index pointing to the corresponding original review rules text. The training document library consists of document storage units, and each document storage unit consists of a set of words {w1, ···, w n};
[0085] Construct training data. Let D be the training data composed of m instances, which is represented as:
[0086]
[0087] where m is the number of document storage units, that is, the size of the training document library. Each instance consists of a document storage unit q i , a relevant review rules sequence and k irrelevant review rules sequences ;
[0088] Use the local static word vector embedding model to map each word w in t and q respectively, and obtain n p word vectors V p (τ = n P ) with dimension τ for each word (w t ), 1×τ and n word vectors V p (τ = n q ) with dimension τ for each word (w t ), 1×τ where the word vector corresponding to the [PAD] symbol is all zeros;
[0089] Perform average pooling on the vectors V P (w t ) 1×τ and V q (w t ) 1×τ respectively, and obtain two representation vectors V i (q) and for this instance, which are represented as:
[0090]
[0091] where V i (q) represents the representation vector after average pooling of the training documents in the i-th instance; represents the respective representation vectors after average pooling of the positive and negative relevant review rules in the i-th instance; V(w t ) represents the vector representation of the t-th word, τ is the dimension of the word vector, and here it is stipulated that τ = n p .
[0092] In the embodiments of the present application, after the steps A1 - A2 are completed in the above step S300, the following steps A3 - A6 are further included;
[0093] In A3: Construct independent dense encoders with non - shared parameters, namely the first encoder and the second encoder;
[0094] In A4: Use the first encoder to encode the first review rule vector to obtain the first review rule vector;
[0095] In A5: Use the second encoder to encode the document vector to obtain the first document vector;
[0096] In A6: Perform similarity matching on the first review rule vector and the first document vector, and use the first loss function to iteratively update the first encoder and the second encoder;
[0097] In an alternative embodiment, the first encoder and the second encoder can be LSTM (Long Short - Term Memory) network encoders. Through two independent LSTM encoders, dense vectors of the review rules and the document to be reviewed are respectively generated. The cosine similarity is used to calculate the similarity between the review rule vector and the document vector. According to the similarity score, the review rules most relevant to the document to be reviewed are retrieved. By minimizing the negative log - likelihood loss function, the parameters of the LSTM encoders are optimized, so that the similarity scores between the positively relevant review rules and the document are higher. The weights of the LSTM encoders are updated through backpropagation to improve the retrieval performance of the model;
[0098] In an alternative embodiment, the first encoder and the second encoder can also be GRU (Gated Recurrent Unit) encoders. Through two independent GRU encoders, dense vectors of the review rules and the document to be reviewed are respectively generated; the cosine similarity is used to calculate the similarity between the review rule vector and the document vector; according to the similarity score, the review rules most relevant to the document to be reviewed are retrieved;
[0099] In the embodiments of the present application, the first encoder and the second encoder include EncoderP and EncoderQ, which are Transformer - based encoders;
[0100] Specifically, define that the EncoderP encoder is used to further map the τ - dimensional representation vectors of 1 positive - relevant review rule sequence and K negative - relevant review rule sequences into dense vectors of dimension d t Define that the EncoderQ encoder is used to further map the τ - dimensional representation vector of the training document into a dense vector of dimension d t dimension;
[0101] Add the [CLS] start symbol at the beginning of each training document and review rule sequence as input. Use the output vector at the [CLS] position of the last layer of the encoder as the vector representation carrying semantic information of the text statement;
[0102] Define that in the DPR retrieval process, the key information of the document to be reviewed is represented as a vector E carrying semantic information Q (V i (q)) d×1 , and perform similarity matching with the set of vectors carrying semantic information in the review rule knowledge base Perform similarity matching by calculating the similarity between E Q (V i (q)) d×1 and each vector in , and retrieve and return the closest entry. The cosine similarity calculation is expressed as:
[0103]
[0104] Define the loss function as the negative log-likelihood of the document information and the positively relevant review rules, expressed as:
[0105]
[0106] The dot product function is further simplified to:
[0107]
[0108] In an alternative embodiment, the first loss function can be mean squared error loss, cross-entropy loss, or minimization loss function;
[0109] In the embodiment of the present application, the first loss function is the minimization loss function. Use the minimization loss function to iteratively update the parameters of the review rule encoder EncoderP and the document to be reviewed encoder EncoderQ to obtain the first dense text retrieval rule model, that is, the trained dense text retrieval rule model;
[0110] It should be noted that by using the Transformer-based EncoderP and EncoderQ encoders and adding the [CLS] start symbol, the review rules and the documents to be reviewed are encoded into vectors carrying semantic information. Use the cosine similarity to calculate the similarity between vectors to implement DPR retrieval, thereby improving the accuracy of similarity matching.
[0111] In the embodiment of the present application, the above step S400 includes the following sub-steps B1-B4;
[0112] In B1: Input the document to be reviewed, use the first extraction method to extract the text of the document to be reviewed, and unify the text encoding format;
[0113] In B2: Record the specific coordinates of a single-page file, determine the coordinate values of each line, calculate the average line height and average line spacing of the current page, and obtain the text key information and body text information;
[0114] In B3: Input the text key information and body text information into the first word segmentation tool to segment each piece of text;
[0115] In B4: Use the first word vector embedding model to construct corresponding dense vectors for the segmented key information and body text information respectively, and obtain the first document information.
[0116] Specifically, download the large language model parameter file and install the basic environment required for running the local large model according to the requirements.txt file provided by the relevant open-source large model; configure the path of the model parameter file, mount it to the local server and start the large model proxy mode; send the initialization Prompt, the content of which includes background information and task responsibilities, and this Prompt is a fixed template and is sent once before starting the assisted review. It is necessary to inform the model about relevant tasks, content formats, expectations, and precautions.
[0117] In view of the sensitivity of the file opening review, the large language model used is deployed locally, and the relevant data information generated by the review exists locally and runs offline. For the basic situation required by the open-source large model, it is required that the hard disk of the hardware device for local storage of the large model is at least 30G or more, and the video memory of the graphics card is 8G or more.
[0118] In an alternative embodiment, the first extraction method can be manual transcription, manually transcribing the text in an image or a handwritten document into electronic text; the first extraction method can be speech recognition, inputting it into a speech recognition system, and the speech recognition software converts the speech signal into text;
[0119] In an alternative embodiment, the first extraction method can also be handwriting recognition, inputting the image of the handwritten document into a handwriting recognition system, and the handwriting recognition software converts the handwritten text into electronic text;
[0120] In the technical solution of this application, the first extraction method includes OCR technology;
[0121] Specifically, input the file to be reviewed and establish an electronic label for the file. The label includes the file number, file name, filing time, affiliated unit, review time, AI review opinion, and remarks information; among them, the file number, file name, filing time, and affiliated unit are the inherent attributes of the file; for electronic files in the form of images, OCR technology is used to achieve text extraction;
[0122] Uniformly set the text encoding format of the file to be audited to UTF-8 encoding format; traverse the file and remove illegal characters and specified special characters inside the file according to the character correspondence declared in the encoding set.
[0123] Record the upper-left and lower-right coordinates of each line of a single-page file to uniquely determine the coordinate values of each line. Calculate the average line height and average line spacing of the current page.
[0124] The line coordinates can be represented by a 2*2 two-dimensional array (l represents the current line number) as:
[0125]
[0126] The calculation of the average line height is expressed as:
[0127]
[0128] Among them, Rh avg is the average line height, l represents the line number, and A i [1][2] represents the Y of the upper-left coordinate value of the i-th line, and A i [2][2] represents the Y of the lower-right coordinate value of the i-th line;
[0129] The average line spacing is expressed as:
[0130]
[0131] Among them, Ls avg is the average line spacing, l represents the line number, and A i [2][2] represents the Y of the upper-left coordinate value of the i-th line, and A i-1 [1][2] represents the Y of the lower-right coordinate value of the (i - 1)-th line;
[0132] In an alternative embodiment, the first word segmentation tool can be Jieba. Through its dictionary and statistical model, the text of the audit rules is split into individual words while retaining compound nouns; the first word segmentation tool can also be SnowNLP. Using its machine learning algorithm, the audit rules are segmented and new words or phrases are identified.
[0133] In an alternative embodiment, the first word segmentation tool can also be THULAC, which splits the text of the audit rules into individual words and annotates the part of speech for each word for word segmentation.
[0134] In the embodiment of the present application, the first word segmentation tool includes the LAC word segmentation tool.
[0135] Specifically, the text key information and the body information of the file to be reviewed are respectively marked with combined nouns, stop words, weak determiners, and redundant words. The text key information and the body information are respectively input into the LAC word segmentation tool to perform word segmentation on each piece of text while retaining the combined nouns; the stop words appearing in the text are removed according to the settings, and the weak determiners and redundant words are removed according to their parts of speech.
[0136] In an alternative embodiment, the first word vector embedding model can be the GloVe word vector embedding model. The GloVe model is used to map the sensitive word into an n p -dimensional vector, and the cosine similarity is calculated to detect the similarity between the sensitive word vector and the word vectors in the document, so as to detect whether there are words with similar semantics to the sensitive word in the document; the first word vector embedding model can be the FastText word vector embedding model. The sensitive word is input into the FastText model to generate an n p -dimensional word vector to handle variants (such as abbreviations, spelling mistakes) and rare words of the sensitive word.
[0137] In an alternative embodiment, the first word vector embedding model can also be AILab. The AILab model is used to map the sensitive word into an n p -dimensional vector to handle sensitive words in the file field.
[0138] In the embodiment of the present application, the first word vector embedding model includes the Word2Vec word vector embedding model.
[0139] Specifically, the Word2Vec word vector embedding model is used to construct corresponding dense vectors of τ dimensions (τ = n p ) for the segmented key data and body information data respectively.
[0140] Exemplarily, referring to Table 1, special words are marked as stop words, low-level words, and combined words, and the words are classified into redundant words, weak determiners, strong determiners, and core words according to their parts of speech. The redundant and weak determiner words are removed, and the core words and strong determiner words are retained and spliced.
[0141] Table 1 Part-of-Speech Categories
[0142] Label Meaning Corresponding part of speech 0 Redundant words expressed in the text Prepositions, punctuation marks, function words 1 Weakly defined words in the text Pronouns, conjunctions, auxiliary words 2 Strongly defined words in the text Nouns, verbs 3 Core words in the text Proper nouns
[0143] It should be noted that first, an electronic label is established for the file to facilitate information management and traceability; then, through encoding unification and character cleaning, the standardization of the text data is ensured; then, the key information and the body are divided through layout analysis to highlight the key content; finally, through word segmentation and word vector embedding, the text is converted into dense vectors to provide semantically rich data support for subsequent review.
[0144] In the embodiment of the present application, after the above steps S400 are completed after steps B1 - B4, the following steps B5 - B9 are further included;
[0145] In B5: Perform a first pre - processing on the average line height and the average line spacing to obtain a first average line height and a first average line spacing;
[0146] In B6: Classify the text content of each page;
[0147] In B7: If the line - to - line spacing above and below a line is greater than a first threshold of the first average line spacing by more than a certain amount, and the unilateral line spacing is greater than a second threshold of the first average line spacing by more than a certain amount, or the line height of the current line is higher than a third threshold of the first average line height by more than a certain amount, then it is a line where key information is located; otherwise, it is a line where body text information is located;
[0148] In B8: Calculate the text line width of the body text information and the average line width, and segment the lines where the body text information is located;
[0149] In B9: Mark the lines with a body text line width lower than a fourth threshold of the average line width as line breaks, or mark the lines ending with a full stop and having a starting coordinate on the left side of the second line greater than a fifth threshold of the average line width as line breaks.
[0150] Specifically, the first pre - processing includes, for special lines with a line spacing greater than three times the average line spacing or more, using Ls avg ×1.2 for replacement, and for special lines with a line height greater than three times the average line height or more, using Rh avg ×1.2 for replacement, and then calculating the average line height and line spacing again after optimization;
[0151] Classify the text content of each page into key information and body text information line by line; for lines where the line - to - line spacing above and below the line is greater than the first average line spacing by 10% or more, the unilateral line spacing is greater than the average line spacing by 20% or more, or the line height of the current line is higher than the average line height by 30% or more, mark them as lines where key information is located, and mark the remaining non - key information lines as lines where body text information is located.
[0152] Specifically, record the text line width of the body text information and the average line width. The average line width is expressed as:
[0153]
[0154] where Rw avg is the average line width, l n represents the number of lines of body text information, A i [2][1] represents the X value of the lower - right coordinate of the i - th line, and A i [1][1] represents the X value of the upper - left coordinate of the i - th line;
[0155] Operate on the lines where the text information is located to segment them, and define the line break marker as the end terminator of the paragraph text. For the lines whose text width is lower than the fourth threshold of the average line width by 90%, mark them as line breaks. For the lines that end with a period and the starting coordinate on the left side of the second line text is greater than the fifth threshold of the average line width by 8%, mark them as line breaks; segment the text according to the line break markers.
[0156] It should be noted that by optimizing the processing of line height and line spacing, the interference of special lines to the overall layout is reduced, and the key information lines and text lines are accurately identified; combined with line width analysis and line break markers, automatic segmentation of the text is achieved, improving the accuracy of text layout parsing.
[0157] In the embodiment of the present application, the above step S500 includes the following sub-steps C1-C6;
[0158] In C1: Set the similarity threshold of sensitive words as the first threshold, and the boundary of the occurrence times interval of text sensitive words as the second threshold;
[0159] In C2: Import the key information and text information into the sensitive word information library respectively for word-by-word matching of sensitive words;
[0160] In C3: For the key information, if the similarity of the word under review is higher than the first threshold, the sensitive word matching is successful, and the file is set to the sub-sensitive state of key information;
[0161] In C4: For the text information, if the similarity of the word under review is higher than the first threshold, the sensitive word matching is successful, and the file with the number of successful sensitive word matches exceeding the second threshold is set to the sub-sensitive file of text information;
[0162] In C5: Make a first judgment on the file under review. If the file under review has both the sub-sensitive file of key information and the sub-sensitive file of text information at the same time, mark it as the control type;
[0163] In C6: If the file under review only has one of them or does not have either, perform auxiliary file review.
[0164] Specifically, the first threshold is the similarity threshold of sensitive words. The maximum value (exactly the same) in the sensitive word similarity value is 1, and the minimum value (completely irrelevant) is -1. The value of the similarity threshold T1 ranges from 50% to 100%, and is equally mapped to the range of 0.5 to 1 in the sensitive word similarity value;
[0165] The second threshold is the boundary value of the occurrence times interval of text sensitive words, and the value of the boundary of the occurrence times interval of text sensitive words only needs to satisfy a positive integer greater than 0;
[0166] Import the sensitive word information database, perform word-by-word matching of sensitive words for key information, and compare the similarity between the word vectors of key information and sensitive words. When the similarity of the word under review is higher than the first threshold, it is determined that the sensitive word matching is successful, and the corresponding matched sensitive word is returned according to the sensitive word index; the word at the corresponding position of the matched file is marked as highlighted, and at the same time, the file is set to the sub-sensitive state of key information;
[0167] Perform sensitive word matching on each paragraph of the body text information, and compare the similarity between the word vectors of the words under review in the body text information and the sensitive word vectors. When the similarity is higher than the first threshold, it is determined that the sensitive word matching is successful, and the corresponding matched sensitive word is returned according to the sensitive word index. The word at the corresponding position of the matched file is marked as highlighted, and at the same time, the file with the number of successful sensitive word matches exceeding the second threshold in the interval is marked as the sub-sensitive file of the body text information;
[0168] The first judgment is whether the currently reviewed file has both the labels of the sub-sensitive file of key information and the sub-sensitive file of body text information. When the file has both labels, mark the file as the control type and send it to manual review. If the file has only one label or does not have any labels, proceed to the next step of local large model assisted review;
[0169] It should be noted that by setting the sensitive word similarity threshold and the occurrence times interval, the sensitive words in key information and the body text are accurately identified, and the hierarchical marking of files is realized. At the same time, through the dual judgment of key information and body text information, the sensitive degree of files is effectively distinguished, and the accuracy and efficiency of review are improved.
[0170] In the embodiment of the present application, as Figure 2 shown, the above step S600 includes the following sub-steps D1 - D3;
[0171] In D1: Calculate the first review rule with the highest relevance to the file to be reviewed by the first dense text retrieval rule model;
[0172] In D2: Combine the first review rule with the original text of the file under review and input it into the large language model to obtain the control index level;
[0173] In D3: Classify the file according to the control index level and in combination with the sensitive word matching result.
[0174] Specifically, set the relevance threshold T3 between the review rule sequence and the file text, and set the number K of selected review rules;
[0175] Input the key information text of the file to be audited, insert the [CLS] symbol at the starting position of the text sequence, extract N paragraphs of the file body information text and mark the [CLS] symbol at the starting position of the text sequence. Input each text sequence into the dense text retrieval model after pre-training is completed. The retrieval model outputs the audit rule sequence with a relevance higher than the threshold T3 for this section of the audit text, and retrieves the corresponding audit rule text according to the sequence index. The similarity score calculation is expressed as:
[0176]
[0177] For the audit rules retrieved for the file to be audited, select the top K audit rules as the reference rules for this file, and combine the original text of the file to be audited with the K audit rules into a Prompt. Require the large language model to understand and reason about the file to be audited based on the K audit rules provided by the system, and output interpretable audit opinions, audit reasons, and file control levels related to the target file and rules. The control levels are divided into four situations: open, recommended open, recommended control, and control;
[0178] The selection criteria for audit rules are weighted and combined according to the audit opinion level and frequency of occurrence. The weighting is expressed as: α i = λ1·Rank i + λ2·F i , where λ1 and λ2 are weight coefficients, satisfying λ1 + λ2 = 1, used to balance the factors of audit opinion level and occurrence times. Rank i is the rule level calibrated when constructing the audit rules, and F is the frequency of occurrence;
[0179] Input the Prompt into the large language model, and obtain the audit opinion, audit reason, and control level of this file through reasoning. The audit opinion and audit reason are returned and input into the label "AI Audit Opinion" under this file and saved in the local database;
[0180] Extract the large model audit control index, as Figure 3 shown, make the following judgments:
[0181] If the control index level provided by the large model is within the control range, the assisted audit method marks this document as controlled;
[0182] If the control index is within the open level range and this document does not carry any sensitive word tags, the assisted audit method marks this file as open;
[0183] If the control index is within the recommended open range or recommended control range, and this document does not carry any sensitive word tags, then retain the label for this type of document and hand it over to the auditor for review;
[0184] If the control index is within the open and recommended open level ranges and the file carries a sensitive word tag, the auxiliary file review method retains the document control level tag and submits it to the reviewer for review;
[0185] If the control index is within the recommended control range and the file carries a sensitive word tag, the auxiliary review method marks the document control.
[0186] The above is a schematic solution of an auxiliary file review method according to this embodiment. It should be noted that the technical solution of the auxiliary file review system belongs to the same concept as the technical solution of the above auxiliary file review method. For the details not described in the technical solution of the auxiliary file review system in this embodiment, reference can be made to the description of the technical solution of the above auxiliary file review method.
[0187] The auxiliary file review system in this embodiment includes:
[0188] A first construction module for obtaining and defining the review rule text and the training document structure, and constructing a review rule knowledge base and a training document library;
[0189] A second construction module for obtaining and defining sensitive word information and constructing a sensitive word information library;
[0190] A model training module for training a dense text retrieval rule model using the review rule knowledge base and the training document library to obtain a first dense text retrieval rule model;
[0191] A preprocessing module for deploying the large language model and the first dense text retrieval rule model, inputting the document information to be reviewed, and preprocessing the document information to obtain the first document information;
[0192] A matching module for performing a first sensitive word match on the first document information based on the sensitive word information library and making a first judgment on the matching result;
[0193] A classification module for assisting in file review using the large language model based on the first judgment result and classifying the files according to the output control index level.
[0194] This embodiment also provides a computing device applicable to the situation of auxiliary file review, including:
[0195] A memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the auxiliary file review method proposed in the above embodiment.
[0196] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for realizing auxiliary file review proposed in the above embodiment.
[0197] The storage medium proposed in this embodiment and the method for realizing auxiliary file review proposed in the above embodiment belong to the same inventive concept. For technical details not described in detail in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0198] From the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software and necessary general-purpose hardware, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk, or optical disc of a computer, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
Claims
1. An auxiliary file auditing method, characterized in that, Including: Obtain and define the audit rule text and the training document structure, and construct an audit rule knowledge base and a training document library; Obtain and define sensitive word information, and construct a sensitive word information library; Train a dense text retrieval rule model using the audit rule knowledge base and the training document library to obtain a first dense text retrieval rule model; Deploy the large language model and the first dense text retrieval rule model, input the document information to be audited, and preprocess the document information to obtain the first document information; Based on the sensitive word information library, perform a first sensitive word match on the first document information respectively, and make a first judgment on the matching result; Based on the first judgment result, use the large language model to assist in file auditing, and classify the files according to the output control index level.
2. The auxiliary file review method according to claim 1, characterized in that Training the dense text retrieval rule model using the audit rule knowledge base and the training document library includes: The training set includes the document to be audited and the first audit rule sequence; Perform average pooling on the document to be audited and the first audit rule sequence to obtain the corresponding first audit rule vector and document vector.
3. The auxiliary file review method according to claim 2, wherein Also including: Construct independent dense encoders with non-shared parameters, namely the first encoder and the second encoder; Encode the first audit rule vector using the first encoder to obtain the first audit rule vector; Encode the document vector using the second encoder to obtain the first document vector; Perform similarity matching on the first audit rule vector and the first document vector, and use the first loss function to iteratively update the first encoder and the second encoder.
4. The auxiliary file review method according to claim 1 or 3, characterized in that, Preprocessing the document information includes: Input the file to be audited, extract the text of the file to be audited using the first extraction method, and unify the text encoding format; Record the specific coordinates of a single-page file, determine the coordinate values of each line, calculate the average line height and average line spacing of the current page, and obtain the text key information and the body text information; Input the text key information and the body text information into the first word segmentation tool to segment each piece of text; Use the first word vector embedding model to construct corresponding dense vectors for the segmented key information and body text information respectively to obtain the first document information.
5. The auxiliary file auditing method according to claim 4, characterized in that, The text key information and the body text information include: Perform a first preprocessing on the average line height and the average line spacing to obtain the first average line height and the first average line spacing; Classify the text content of each page; If the line spacing between the upper and lower lines of a line is greater than the first threshold of the average line spacing, and the unilateral line spacing is greater than the second threshold of the average line spacing, or the line height of the current line is higher than the third threshold of the average line height, then it is the line where the key information is located, otherwise it is the line where the body text information is located; Calculate the text line width and the average line width of the body text information, and segment the lines where the body text information is located; Mark the lines with the body text line width lower than the fourth threshold of the average line width as line breaks or mark the lines ending with a period and with the starting coordinate of the second line text greater than the fifth threshold of the average line width as line breaks.
6. The auxiliary file auditing method according to claim 5, wherein The first sensitive word match and the first judgment include: Set the sensitive word similarity threshold as the first threshold, and the boundary of the occurrence times interval of the body text sensitive words as the second threshold; Import critical information and body text information into the sensitive word information database respectively for word-by-word matching of sensitive words; For critical information, if the similarity of the word under review is higher than the first threshold, the sensitive word matching is successful, and the file is set to the sub-sensitive state of critical information; For body text information, if the similarity of the word under review is higher than the first threshold, the sensitive word matching is successful, and the file with the number of successful sensitive word matches exceeding the second threshold is set to the sub-sensitive file of body text information; Conduct a first judgment on the file under review. If the file under review has both the sub-sensitive file of critical information and the sub-sensitive file of body text information at the same time, mark it as the control type; If the file under review has only one of them or neither, conduct an auxiliary file review.
7. The auxiliary file review method according to claim 6, characterized in that, Using the large language model for auxiliary file review includes: Calculating the first review rule with the highest relevance to the file to be reviewed by the first dense text retrieval rule model; Combining the first review rule with the original text of the file under review and inputting it into the large language model to obtain the control index level; Classify the file according to the control index level in combination with the sensitive word matching result.
8. An auxiliary file review system, which applies the method according to any one of claims 1-7, characterized in that Including: The first construction module is used to obtain and define the review rule text and the training document structure body, and construct the review rule knowledge base and the training document library; The second construction module is used to obtain and define sensitive word information and construct the sensitive word information database; The model training module is used to train the dense text retrieval rule model by using the review rule knowledge base and the training document library to obtain the first dense text retrieval rule model; The preprocessing module is used to deploy the large language model and the first dense text retrieval rule model, input the document information to be reviewed, and preprocess the document information to obtain the first document information; The matching module is used to perform the first sensitive word matching on the first document information respectively based on the sensitive word information database, and make a first judgment on the matching result; The classification module is used to perform auxiliary file review by using the large language model based on the first judgment result, and classify the file according to the output control index level.
9. An electronic device, comprising: A memory and a processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium stores computer executable instructions, and when the computer executable instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
A system, method, and related equipment for classifying and grading sensitive data.
CN122571266A