Intelligent correction system for office documents based on deep learning

CN122904880APending Publication Date: 2026-10-13JIANGSU ELECTRIC POWER INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611152923.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]为了弥补以上不足,改善现有校对系统难以识别情态动词语义强度等级、从而难以自动检测同一规范主体与同一行为动作所对应的句子之间情态强度不一致以及难以校验各句子情态强度是否与所属领域法定强制等级相匹配的问题,本发明的目的是提供一种基于深度学习的办公文档智能纠错系统,能够精准识别每个句子中的规范主体、情态动词、行为动作及条件从句,将非结构化的自然语言文本转化为结构化的情态语义要素,为后续的强度等级映射及一致性校验提供了结构化的数据基础

Benefits of technology

[0058]1、通过构建多级强度标尺对文档中各句子的情态动词进行强度等级映射,并对同一语义簇内各句子对的情态强度标签进行等级差比较,同时将各句子的情态强度标签与领域合规知识图谱中的法定强制等级进行比对,从而实现对办公文档中同一规范主体与同一行为动作所对应的句子之间的情态强度不一致的自动检测,以及对各句子的情态强度是否低于或高于所属领域法定强制等级的自动校验,克服了现有校对系统无法识别情态动词语义强度等级的技术缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122904880A_ABST
    Figure CN122904880A_ABST
Patent Text Reader

Abstract

The application discloses an office document intelligent correction system based on deep learning, which comprises: a modality semantic analysis module, which identifies the standard subject, modality verb and action of each sentence in the document; a strength grade mapping module, which generates a modality strength label and a confidence score; a document structure aggregation module, which generates the requirement strength sequence of each subject and forms a semantic cluster; a semantic similarity calculation module, which calculates the semantic similarity of the sentence pairs in each semantic cluster; a strength inconsistency marking module, which marks potential inconsistencies according to the semantic similarity and strength grade difference; a compliance verification and report generation module, which constructs a field compliance knowledge graph for comparison and generates a consistency verification report. The application realizes the double verification of the internal modality strength consistency and external compliance of the document, and overcomes the technical defects that the existing correction system cannot identify the semantic strength grade of the modality verb.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent office document processing technology, and in particular to an intelligent error correction system for office documents based on deep learning. Background Technology

[0002] In the process of drafting and collaboratively editing office documents (such as technical specifications, laws and regulations, standard documents, tender documents, contracts and agreements, etc.), the level of requirements between the subject of the specification and the action is usually defined by modal verbs (such as "should," "appropriate," "may," "should not," and "must not" in Chinese). However, existing document proofreading systems mainly focus on spelling error checking, grammar correction, or format conformity verification, lacking the ability to identify and verify the semantic intensity level expressed by modal verbs in documents.

[0003] Specifically, existing technologies cannot automatically identify situations where the same regulatory subject is assigned different levels of requirement in different locations within a document when performing the same action (e.g., "the user should provide proof of identity" and "the user can provide proof of identity" coexist). They also cannot verify whether the modal strength of each clause in a document matches the legally mandated level of its domain (e.g., a clause that should be mandatory uses a recommended modal verb). These deficiencies make it difficult for existing proofreading systems to automatically and accurately detect potential risks such as weakened or incorrectly amplified clause binding force due to inconsistent use of modal verbs when faced with a large number of documents containing regulatory clauses. Summary of the Invention

[0004] To address the shortcomings mentioned above and improve the existing proofreading systems' inability to identify the semantic intensity levels of modal verbs, thus hindering the automatic detection of inconsistencies in modal intensity between sentences corresponding to the same normative subject and the same action, and making it difficult to verify whether the modal intensity of each sentence matches the legally mandated level of its domain, the present invention aims to provide an intelligent error correction system for office documents based on deep learning. This system can accurately identify the normative subject, modal verbs, actions, and conditional clauses in each sentence, transforming unstructured natural language text into structured modal semantic elements, thus providing a structured data foundation for subsequent intensity level mapping and consistency verification.

[0005] The objective of this invention is achieved through the following technical solution:

[0006] A deep learning-based intelligent error correction system for office documents includes:

[0007] The modal semantic parsing module is used to obtain the full text of the document to be proofread, perform modal semantic role labeling on each sentence in the full text, and identify the normative subject, modal verbs, actions and conditional clauses in each sentence;

[0008] The intensity level mapping module is used to map the modal verbs to the corresponding intensity levels in a predefined multi-level intensity scale, and output the modal intensity label of each sentence and the confidence score corresponding to the modal intensity label;

[0009] The document structure aggregation module is used to cluster sentences according to the normative subject, arrange all sentences of the same normative subject in document order, and generate a requirement strength sequence of the normative subject; and to perform semantic clustering on the behavioral actions, merging sentences that express the same behavioral action into the same semantic cluster.

[0010] The semantic similarity calculation module is used to construct a Siamese network trained by contrastive learning. Sentences belonging to the same semantic cluster are input into the Siamese network in pairs to calculate the semantic similarity of each pair of sentences.

[0011] The intensity inconsistency marking module is used to select sentence pairs whose semantic similarity is higher than a preset threshold, compare the level difference of the modality intensity labels of the two sentences in the sentence pair, and mark the sentence pair as potentially inconsistent when the level difference is greater than a preset level difference threshold.

[0012] The compliance verification and report generation module is used to construct a domain compliance knowledge graph. It compares the normative subject, behavioral action, and modality intensity label of each sentence with the clause topics and legal enforcement levels in the domain compliance knowledge graph. Based on the comparison results and the potential inconsistency markers, it generates a modality intensity consistency verification report for the document to be proofread.

[0013] Furthermore, in the modal semantic parsing module, the normative subject, modal verbs, actions, and conditional clauses in each sentence are identified, including:

[0014] The full text is segmented, part-of-speech tagging is performed, and syntactic analysis is conducted to obtain the part-of-speech tags of each word and the dependency relationships between words;

[0015] Based on the part-of-speech tags and the dependency relationships, modal verbs are selected from the predicates of each sentence;

[0016] Using the modal verb as the annotation target, the candidate arguments that have a dependency relationship with the modal verb are classified into semantic roles. The arguments corresponding to the agent label are extracted as the normative subject, and the arguments corresponding to the patient label are extracted as the behavioral action.

[0017] Each sentence is identified as a conditional adverbial clause, and conditional clauses containing conditional conjunctions are extracted.

[0018] Furthermore, in the intensity level mapping module, mapping the modal verb to the corresponding intensity level in a predefined multi-level intensity scale includes:

[0019] According to the predefined multi-level strength scale, the multi-level strength scale includes multiple preset strength levels and standard modal verbs corresponding to each preset strength level;

[0020] For each modal verb in a sentence, retrieve the standard modal verb that matches the modal verb in the multi-level intensity scale, and determine the preset intensity level corresponding to the matching standard modal verb as the modal intensity label of the sentence;

[0021] The confidence score corresponding to the modal intensity label is calculated based on the matching method between the modal verb and the standard modal verb.

[0022] Furthermore, in the document structure aggregation module, all sentences of the same specification subject are arranged in document order to generate a sequence of required strengths for that specification subject, including:

[0023] Sentences are grouped according to the normative subject, and all sentences with the same normative subject are grouped into the same subject group.

[0024] For each subject group, the sentences are sorted according to their document position order to generate an ordered sequence of sentences for that subject group;

[0025] Extract the modality intensity labels corresponding to each sentence in the ordered sequence of sentences, arrange them sequentially according to the order of the sentences, and generate the requirement intensity sequence of the main body of the specification.

[0026] Furthermore, in the document structure aggregation module, semantic clustering is performed on the actions, grouping sentences expressing the same action into the same semantic cluster, including:

[0027] Dependency parsing is performed on each of the described actions. Using words in each action as nodes and dependency relationships between words as edges, a phrase dependency graph corresponding to each action is constructed.

[0028] Each phrase dependency graph is input into a graph isomorphic network to obtain graph-level semantic vectors corresponding to each action; the graph isomorphic network is used to map phrase dependency graphs with different structures to fixed-dimensional vectors in the same vector space;

[0029] Calculate the vector distance between the semantic vectors at each graph level, and determine the semantic similarity between any two actions based on the vector distance;

[0030] Clustering is performed based on the semantic similarity between each behavior action, and multiple behaviors actions with a semantic similarity greater than a preset clustering threshold are grouped into the same behavior action group.

[0031] Sentences in each sentence that correspond to each action within the action group are labeled as belonging to the semantic cluster corresponding to that action group.

[0032] Furthermore, in the semantic similarity calculation module, a Siamese network trained through contrastive learning is constructed, including:

[0033] Construct a twin network, wherein the twin network includes a first coding branch and a second coding branch that share network parameters;

[0034] Using sentence pairs and their corresponding similarity labels as training samples, the sentence pairs in the training samples are input into the first encoding branch and the second encoding branch respectively to obtain the sentence vectors corresponding to each sentence.

[0035] The predicted semantic similarity of the sentence pairs is generated based on the distance between the sentence vectors. The network parameters of the Siamese network are iteratively updated based on the difference between the predicted semantic similarity and the similarity label until convergence, and the trained Siamese network is output.

[0036] Furthermore, in the semantic similarity calculation module, sentences belonging to the same semantic cluster are paired and input into the Siamese network to calculate the semantic similarity of each pair of sentences, including:

[0037] Iterate through the set of sentences contained in each of the semantic clusters to generate all possible combinations of unordered sentence pairs;

[0038] The two sentences in each of the unordered sentence pairs are respectively input into the first and second encoding branches of the Siamese network to obtain the sentence vector of each sentence;

[0039] Calculate the vector distance between the two sentence vectors in each sentence pair, and generate the semantic similarity of the sentence pair based on the vector distance.

[0040] Furthermore, in the intensity inconsistency labeling module, sentence pairs with semantic similarity higher than a preset threshold are selected, and the difference in the modality intensity labels of the two sentences in the sentence pair is compared, including:

[0041] Sentence pairs whose semantic similarity is greater than a preset threshold are selected as a candidate sentence pair set.

[0042] For each candidate sentence pair in the candidate sentence pair set, extract the first intensity level value and the second intensity level value corresponding to the modality intensity labels of the two sentences in the sentence pair, respectively;

[0043] The absolute difference between the first strength grade value and the second strength grade value is calculated as the grade difference;

[0044] When the grade difference is greater than a preset grade difference threshold, the candidate sentence pair is marked as potentially inconsistent.

[0045] Furthermore, in the compliance verification and report generation module, a domain compliance knowledge graph is constructed, including:

[0046] Obtain the set of compliance guidelines texts in the target field, break down each compliance guidelines text according to the clause structure, and obtain the original text of each clause;

[0047] The original text of each clause is input into a large language model that has been fine-tuned with a compliant and standardized corpus. The large language model outputs the structured extraction results of the clause theme, the subject of the standard, the description of the behavior, and the level of legal enforcement for each clause.

[0048] The structured extraction results of each clause are checked for consistency, and clauses with the same subject matter but different levels of legal enforcement are marked as conflict clauses.

[0049] The clause topics and the behavior descriptions are semantically normalized to map different textual expressions of the same concept to the same standardized entity node.

[0050] Using the standardized entity nodes as entity nodes, the legally mandated levels as entity attributes, and the reference and hierarchical relationships between clauses as entity edges, a compliance knowledge graph for the target domain is constructed.

[0051] Furthermore, in the compliance verification and report generation module, a modality strength consistency verification report for the document to be proofread is generated, including:

[0052] Using the subject of each sentence and the action described therein as search criteria, the matching clause topics are retrieved from the domain compliance knowledge graph to obtain the legally mandated level associated with the clause topics;

[0053] The modality intensity label in each sentence is compared with the retrieved legally mandated level, and the difference between the intensity level corresponding to the modality intensity label of each sentence and the legally mandated level is calculated as the compliance deviation score of the sentence.

[0054] Obtain all sentence pairs marked as potentially inconsistent. For each potentially inconsistent sentence pair, calculate the product of the difference in modality intensity labels between the two sentences in the sentence pair and the semantic similarity, and use it as the severity score of the sentence pair.

[0055] Based on the compliance deviation score of each sentence and the severity score of each potentially inconsistent sentence pair, the warning items are prioritized and sorted, and the warning items whose compliance deviation score and severity score are both higher than the preset high priority threshold are marked as high priority;

[0056] Summarize all warning items in descending order of priority to generate a modality strength consistency verification report for the documents to be checked.

[0057] The present invention has the following beneficial effects:

[0058] 1. By constructing a multi-level intensity scale to map the intensity levels of modal verbs in each sentence of a document, and comparing the level differences of modal intensity labels of sentence pairs within the same semantic cluster, and comparing the modal intensity labels of each sentence with the legally mandated levels in the domain compliance knowledge graph, this system can automatically detect inconsistencies in modal intensity between sentences corresponding to the same normative subject and the same action in office documents, and automatically verify whether the modal intensity of each sentence is lower or higher than the legally mandated level of its domain. This overcomes the technical deficiency of existing proofreading systems that cannot identify the semantic intensity levels of modal verbs.

[0059] 2. By using the modal semantic parsing module to perform word segmentation, part-of-speech tagging, syntactic analysis, and semantic role classification on each sentence in the full text, it can accurately identify the normative subject, modal verbs, actions, and conditional clauses in each sentence, transforming unstructured natural language text into structured modal semantic elements, providing a structured data foundation for subsequent intensity level mapping and consistency verification.

[0060] 3. By using the document structure aggregation module, the document is structured and aggregated from both the normative subject dimension and the behavioral action dimension. On the one hand, all sentences of the same normative subject are arranged in document order to generate a required strength sequence. On the other hand, semantic clustering of behavioral actions is performed to form semantic clusters. This achieves multi-dimensional structured reorganization of the document and establishes an index structure covering the entire document for subsequent semantic similarity calculation and cross-sentence strength comparison. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the architecture of the intelligent error correction system for office documents based on deep learning proposed in this invention.

[0062] Figure 2 This is a schematic diagram illustrating the implementation process of the modal semantic parsing module of the intelligent error correction system for office documents based on deep learning proposed in this invention.

[0063] Figure 3 This is a schematic diagram illustrating the implementation process of the intensity level mapping module in the deep learning-based intelligent error correction system for office documents proposed in this invention.

[0064] Figure 4 This is a schematic diagram illustrating the implementation process of the document structure aggregation module in the architecture of the deep learning-based intelligent error correction system for office documents proposed in this invention.

[0065] Figure 5 This is a schematic diagram illustrating the implementation process of the semantic similarity calculation module of the intelligent error correction system for office documents based on deep learning proposed in this invention.

[0066] Figure 6 This is a schematic diagram illustrating the implementation process of the strength inconsistency marking module in the deep learning-based intelligent error correction system for office documents proposed in this invention.

[0067] Figure 7 This is a schematic diagram illustrating the implementation process of the compliance verification and report generation module of the intelligent error correction system for office documents based on deep learning proposed in this invention. Detailed Implementation

[0068] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] A deep learning-based intelligent error correction system for office documents, such as... Figures 1-7 As shown, it includes:

[0070] The modal semantic parsing module is used to obtain the full text of the document to be proofread, to perform modal semantic role labeling on each sentence in the full text, and to identify the normative subject, modal verbs, actions, and conditional clauses in each sentence.

[0071] Furthermore, in the modal semantic parsing module, the normative subject, modal verbs, actions, and conditional clauses in each sentence are identified, including:

[0072] The entire text is segmented, tagged with parts of speech, and analyzed syntactically to obtain the part-of-speech tags of each word and the dependency relationships between words;

[0073] Based on part-of-speech tags and dependency relationships, modal verbs are selected from the predicates of each sentence;

[0074] Using modal verbs as the annotation target, the candidate arguments that have a dependency relationship with modal verbs are classified into semantic roles. The arguments corresponding to the agent label are extracted as the normative subject, and the arguments corresponding to the patient label are extracted as the action.

[0075] Each sentence is identified as a conditional adverbial clause, and conditional clauses containing conditional conjunctions are extracted.

[0076] Specifically, in this embodiment, the modal semantic parsing module is used to obtain the full text of the document to be proofread and to perform modal semantic role labeling on each sentence in the full text to identify the normative subject, modal verb, action, and conditional clause in each sentence.

[0077] Each sentence in the full text is segmented into word sequences. Part-of-speech tagging is then performed on each word in the sequence to obtain its grammatical category. Dependency parsing is then performed on the word sequences to obtain dependency relations between words, which represent the grammatical dependency structure between words in the sentence. Based on the grammatical tags and dependency relations, modal verbs are selected from all predicates in each sentence. Predicates are words that express actions or states in a sentence; modal verbs are a type of predicate that expresses modal meanings such as possibility, necessity, or intention.

[0078] Using selected modal verbs as the annotation target, semantic role classification is performed on each candidate argument that has a dependency relationship with the modal verb, and a corresponding semantic role label is assigned to each candidate argument. Semantic role labels include agent labels and patient labels. The agent label identifies the subject that performs the action, and the patient label identifies the object that receives the action. Based on the semantic role labels, arguments corresponding to the agent label are extracted from each candidate argument as the normative subject, and arguments corresponding to the patient label are extracted as the action. Conditional adverbial clauses are identified for each sentence to determine whether the sentence contains a conditional adverbial clause introduced by a conditional conjunction. If the sentence contains a conditional adverbial clause, it is extracted as the conditional clause of the sentence. The normative subject, modal verb, action, and conditional clause of each sentence are output as input data for the subsequent intensity level mapping module.

[0079] The intensity level mapping module is used to map modal verbs to the corresponding intensity levels in a predefined multi-level intensity scale, and outputs the modal intensity label and the confidence score corresponding to the modal intensity label for each sentence.

[0080] Furthermore, in the intensity level mapping module, modal verbs are mapped to the corresponding intensity levels in a predefined multi-level intensity scale, including:

[0081] Based on a predefined multi-level intensity scale, the multi-level intensity scale includes multiple preset intensity levels and standard modal verbs corresponding to each preset intensity level;

[0082] For each modal verb in a sentence, retrieve the standard modal verb that matches the modal verb in the multi-level intensity scale, and determine the preset intensity level corresponding to the matching standard modal verb as the modal intensity label of the sentence;

[0083] Calculate the confidence score corresponding to the modal intensity label based on the matching method between the modal verb and the standard modal verb.

[0084] Specifically, in this embodiment, the intensity level mapping module is used to map the modal verbs output by the modal semantic parsing module to the corresponding intensity levels in the predefined multi-level intensity scale, and output the modal intensity label of each sentence and the confidence score corresponding to the modal intensity label.

[0085] A multi-level intensity scale is constructed. The multi-level intensity scale contains multiple preset intensity levels, each corresponding to at least one standard modal verb. In this embodiment, the multi-level intensity scale contains five preset intensity levels: mandatory, strictly prohibited, recommended, permitted, and not recommended. The standard modal verbs corresponding to the mandatory level include *should*, *must*, and *must*. The standard modal verbs corresponding to the strictly prohibited level include *must not* and *strictly prohibited*. The standard modal verbs corresponding to the recommended level include *appropriate* and *suggested*. The standard modal verbs corresponding to the permitted level include *may* and *can*. The standard modal verbs corresponding to the not recommended level include *inappropriate* and *not recommended*. The correspondence between each preset intensity level and the standard modal verb in the multi-level intensity scale is pre-stored in the system's configuration file.

[0086] For each modal verb in a sentence, a standard modal verb matching it is retrieved from a multi-level intensity scale. The retrieval process includes two stages: exact matching and semantic similarity matching. In the first stage, the modal verb in the sentence is compared string-by-string with the standard modal verbs corresponding to each preset intensity level in the multi-level intensity scale. When a standard modal verb that completely matches the modal verb in the sentence is found, the preset intensity level corresponding to that standard modal verb is determined as the modal intensity label of the sentence. When no standard modal verb that completely matches the modal verb in the sentence is found, the process proceeds to the second stage, the semantic similarity matching stage. The semantic similarity between the modal verb in the sentence and each standard modal verb in the multi-level intensity scale is calculated. The semantic similarity is calculated by mapping each modal verb to a word vector using a pre-trained language model, and then calculating the cosine similarity between the word vectors. Let A be the word vector of a modal verb in a sentence, and B be the word vector of a standard modal verb in a multi-level intensity scale. Then the formula for calculating the semantic similarity between the two is as follows:

[0087] ;

[0088] in, This represents the cosine similarity value between word vector A and word vector B, and its value ranges from 0 to 1. This represents the dot product of word vector A and word vector B. This represents the magnitude of the word vector A. This represents the magnitude of the word vector B.

[0089] Word vectors are obtained by mapping modal verbs to a vector space using a pre-trained language model. In this implementation, the pre-trained language model can use Word2Vec or BERT to convert modal verbs into fixed-length word vectors of 300 or 768 dimensions. After calculating the cosine similarity between the modal verbs in the sentence and all standard modal verbs in the multi-level intensity scale, the preset intensity level corresponding to the standard modal verb with the highest cosine similarity is selected as the modal intensity label of the sentence.

[0090] Based on the matching method between the modal verb and the standard modal verb, the confidence score corresponding to the modal intensity label is calculated. The matching method includes two types: exact matching and semantic similarity matching. When the matching method is exact matching, the confidence score is set to a first preset value. When the matching method is semantic similarity matching, the confidence score is set to the highest cosine similarity value calculated in the semantic similarity matching stage. In this embodiment, the first preset value is 1.0, indicating that the confidence of exact matching is 100%. When a modal verb cannot match any standard modal verb, the modal intensity label of the sentence is set to null, and the confidence score is set to 0.

[0091] The intensity level mapping module outputs the modality intensity label and the corresponding confidence score for each sentence, which serve as input data for the subsequent document structure aggregation module and intensity inconsistency marking module.

[0092] The document structure aggregation module is used to cluster sentences according to the normative subject, arrange all sentences of the same normative subject in document order, and generate a requirement strength sequence of the normative subject; and to perform semantic clustering of actions, merging sentences that describe the same action into the same semantic cluster.

[0093] Furthermore, in the document structure aggregation module, all sentences of the same specification subject are arranged in document order to generate a sequence of requirement strengths for that specification subject, including:

[0094] Sentences are grouped according to the subject of the norm, and all sentences with the same subject are grouped into the same subject group.

[0095] For each subject group, sort the sentences according to their document position order to generate an ordered sequence of sentences for that subject group;

[0096] Extract the modality intensity labels corresponding to each sentence in the ordered sequence of sentences, arrange them in order of arrangement, and generate the requirement intensity sequence of the main body of the specification.

[0097] Furthermore, in the document structure aggregation module, semantic clustering is performed on actions, grouping sentences expressing the same action into the same semantic cluster, including:

[0098] Dependency parsing is performed on each action, and phrase dependency graphs are constructed with words in each action as nodes and dependency relationships between words as edges.

[0099] Each phrase dependency graph is input into a graph isomorphic network to obtain graph-level semantic vectors corresponding to each action; the graph isomorphic network is used to map phrase dependency graphs with different structures to fixed-dimensional vectors in the same vector space.

[0100] Calculate the vector distance between semantic vectors at each graph level, and determine the semantic similarity between any two actions based on the vector distance.

[0101] Clustering is performed based on the semantic similarity between each action, and multiple actions with semantic similarity greater than a preset clustering threshold are grouped into the same action group.

[0102] Sentences in each sentence that correspond to the actions within a particular action group are labeled as belonging to the semantic cluster corresponding to that action group.

[0103] Specifically, the document structure aggregation module performs two independent data aggregation operations simultaneously. The first operation generates a sequence of requirement strengths for the main body of the specification, and the second operation performs semantic clustering of the behavioral actions to form semantic clusters.

[0104] Retrieve the normative subject, modal verbs, and modal intensity tags for each sentence in the full text. Group the sentences according to the normative subject, merging all sentences with the same normative subject into the same subject group. For each subject group, obtain the document position number of each sentence within that group, and sort the sentences in ascending order of their document position numbers to generate an ordered sequence of sentences for that subject group. Extract the modal intensity tags corresponding to each sentence in the ordered sequence, and arrange the modal intensity tags sequentially according to the order in which the sentences appear in the ordered sequence to generate a required intensity sequence for that normative subject. The document structure aggregation module outputs the required intensity sequence for each normative subject.

[0105] The system retrieves the actions corresponding to each sentence in the full text. For each action, dependency parsing is performed first to obtain the dependency relationships between words within that action. Using each word in the action as a node and the dependency relationships between words as edges, a phrase dependency graph is constructed corresponding to that action. The phrase dependency graph is used to preserve the internal structural information of the action. The phrase dependency graphs corresponding to each action are then input into a graph isomorphic network. The graph isomorphic network is used to map phrase dependency graphs with different structures to fixed-dimensional vectors in the same vector space. In this embodiment, the specific structure of the graph isomorphic network is as follows: The graph isomorphic network contains four graph convolutional layers, each followed by a batch normalization layer and a ReLU activation function. The output dimensions of each graph convolutional layer are 128, 256, 256, and 256 dimensions, respectively. The initial features of the nodes are pre-trained word vectors of each word, with a word vector dimension of 300, obtained by training the Word2Vec model on a general corpus. The message passing and aggregation methods of the graph convolutional layers follow the aggregation paradigm of graph isomorphic networks. Specifically, the update method for the node vector of layer k is to add the node vector of layer (k-1) to the sum of the neighboring node vectors of layer (k-1), and then map this sum to a multilayer perceptron to obtain the node vector of layer k. The global readout mechanism employs a concatenation-based readout method. The node-level features output from each graph convolutional layer are subjected to global average pooling and global max pooling, respectively. The pooling results from each layer are concatenated into a fixed-dimensional graph-level semantic vector. The final dimension of the graph-level semantic vector is 4 layers multiplied by the two pooling methods multiplied by 256 dimensions, i.e., 2048 dimensions. This is then mapped to 256 dimensions through a linear projection layer, serving as the final action vector output.

[0106] The graph isomorphic network (GAN) employs a graph isomorphic network architecture, aggregating neighbor information of each node through multi-layer graph convolution operations and summarizing node-level features into graph-level semantic vectors through a global readout mechanism. The input to the GAN is the adjacency matrix of the phrase dependency graph and the initial feature matrix of the nodes, and the output is a fixed-dimensional graph-level semantic vector. In this embodiment, the graph-level semantic vector has a dimension of 256. The training of the GAN employs a contrastive learning strategy, using different expressions of the same action as positive sample pairs and different actions as negative sample pairs. Network parameters are optimized by maximizing the vector similarity between positive sample pairs and minimizing the vector similarity between negative sample pairs. The training data for the GAN comes from verb-object phrases and their synonym pairs extracted from a public corpus. In this embodiment, the contrastive learning loss function uses normalized temperature-scaled cross-entropy loss, with a temperature coefficient set to 0.07. The network parameters are optimized using an adaptive moment estimation optimizer, with an initial learning rate of 1e-4 and a weight decay coefficient of 1e-5. The training batch size is set to 64, and the maximum number of training epochs is set to 100. After each training round, the average vector similarity of positive sample pairs is calculated on the validation set. When the average vector similarity of positive sample pairs on the validation set no longer increases for 10 consecutive rounds, it is considered converged, the iterative update is stopped, and the trained graph isomorphic network is output.

[0107] After obtaining the graph-level semantic vectors corresponding to each action, the vector distance between any two graph-level semantic vectors is calculated. In this embodiment, the vector distance uses Euclidean distance, and the calculation formula is as follows:

[0108] ;

[0109] in, The graph-level semantic vector representing the i-th action. The graph-level semantic vector of the j-th action The Euclidean distance between them, where n represents the dimension of the vector, and in this implementation, n=256. Representing vectors The component in the k-th dimension, Representing vectors The component in the k-th dimension.

[0110] The semantic similarity between any two actions is determined based on vector distance. In this implementation, the semantic similarity is obtained from the Euclidean distance using the following transformation formula:

[0111] ;

[0112] in, This represents the semantic similarity between the i-th action and the j-th action, with a value ranging from 0 to 1. The distance is Euclidean. The closer the semantic similarity value is to 1, the more similar the two actions are semantically; the closer it is to 0, the greater the semantic difference.

[0113] Clustering is performed based on the semantic similarity between actions. In this embodiment, a density-based clustering algorithm is used to group multiple actions with semantic similarity greater than a preset clustering threshold into the same action group. The preset clustering threshold can be configured according to the application scenario; in this embodiment, the preset clustering threshold is set to 0.75. If the semantic similarity between a certain action and all other actions does not exceed the preset clustering threshold, then that action is grouped into a separate action group. A unique action group identifier is assigned to each action group. Based on the action group identifier, sentences in each sentence that correspond to the actions within the action group are labeled as belonging to the semantic cluster corresponding to that action group. The document structure aggregation module outputs each semantic cluster and the set of sentences it contains.

[0114] The document structure aggregation module uses the generated requirement strength sequences of each specification subject and each semantic cluster and its contained sentence set as input data for the subsequent semantic similarity calculation module.

[0115] The semantic similarity calculation module is used to construct a Siamese network trained by contrastive learning. Sentences belonging to the same semantic cluster are paired and input into the Siamese network to calculate the semantic similarity of each pair of sentences.

[0116] Furthermore, in the semantic similarity calculation module, a Siamese network trained through contrastive learning is constructed, including:

[0117] Construct a twin network, which includes a first coding branch and a second coding branch that share network parameters;

[0118] Using sentence pairs and their corresponding similarity labels as training samples, the sentence pairs in the training samples are input into the first and second encoding branches respectively to obtain the sentence vectors corresponding to each sentence.

[0119] The predicted semantic similarity of sentence pairs is generated based on the distance between sentence vectors. The network parameters of the Siamese network are iteratively updated based on the difference between the predicted semantic similarity and the similarity label until convergence, and the trained Siamese network is output.

[0120] Furthermore, in the semantic similarity calculation module, sentences belonging to the same semantic cluster are paired and input into the Siamese network to calculate the semantic similarity of each pair of sentences, including:

[0121] Iterate through the set of sentences contained in each semantic cluster to generate all possible unordered sentence pairs;

[0122] Input the two sentences in each unordered sentence pair combination into the first and second encoding branches of the Siamese network respectively to obtain the sentence vector of each sentence;

[0123] Calculate the vector distance between the two sentence vectors in each sentence pair, and generate the semantic similarity of the sentence pair based on the vector distance.

[0124] Specifically, the semantic similarity calculation module performs two tasks: the first task is to construct a Siamese network trained by contrastive learning, and the second task is to input sentences belonging to the same semantic cluster into the Siamese network in pairs to calculate the semantic similarity of each pair of sentences.

[0125] Obtain the training sample set. The training sample set contains multiple sentence pairs and their corresponding similarity labels. The similarity labels are used to indicate whether the semantic content of two sentences is similar. In this embodiment, the training samples are derived from a publicly available text similarity dataset, supplemented by sentence pairs extracted from documents in the target domain. The similarity label for each training sample is set to 1 or 0, where a label of 1 indicates that the semantic content of the two sentences is similar, and a label of 0 indicates that the semantic content of the two sentences is dissimilar.

[0126] A Siamese network is constructed. The Siamese network comprises a first encoding branch and a second encoding branch. The first and second encoding branches share the same network parameters. Each encoding branch employs a Transformer-based encoder structure, containing multiple layers of self-attention layers and feedforward network layers, used to map the input sentence to a fixed-dimensional sentence vector. In this implementation, the encoding branch uses a pre-trained BERT model as the base encoder, with an output dimension of 768. Sentence pairs from the training samples are input into the first and second encoding branches respectively. Let a training sample contain sentences... and sentences , the sentence Input the first encoding branch and obtain the corresponding first sentence vector. , the sentence Input the second encoding branch to obtain the corresponding second sentence vector. .

[0127] Calculate the vector of the first sentence With the second sentence vector The distance between sentence vectors is used to generate the predicted semantic similarity of the sentence pair. In this embodiment, the distance between sentence vectors is used as the cosine distance, and the predicted semantic similarity is used as the cosine similarity. The calculation formula is as follows:

[0128] ;

[0129] in, Sentence With sentences Predicted semantic similarity between them Sentence The corresponding sentence vector, Sentence The corresponding sentence vector, express and dot product, express The length of the mold, express The modulus is [value]. The predicted semantic similarity value ranges from 0 to 1.

[0130] The contrastive learning loss is calculated based on the difference between the predicted semantic similarity and the similarity label. In this implementation, the contrastive learning loss function uses binary cross-entropy loss, and the calculation formula is as follows:

[0131] ;

[0132] Where L represents the loss value, and N represents the batch size of the training samples. Let represent the similarity label of the k-th training sample. Let represent the predicted semantic similarity of the k-th training sample, and log represent the natural logarithm.

[0133] The Siamese network parameters are iteratively updated based on the contrastive learning loss value. The parameter updates employ backpropagation and an adaptive moment estimation optimizer. In this implementation, the initial learning rate is set to 2e-5, the batch size to 32, and the maximum number of training epochs to 10. When the contrastive learning loss value no longer decreases over multiple consecutive training epochs, convergence is considered achieved, iterative updates cease, and the trained Siamese network is output.

[0134] The semantic similarity calculation module obtains each semantic cluster and its contained sentence set from the document structure aggregation module. For each semantic cluster, it iterates through all sentences in the sentence set contained in that semantic cluster, generating all possible unordered sentence pair combinations. In this implementation, for a semantic cluster containing m sentences, the number of generated unordered sentence pair combinations is m multiplied by m-1 and then divided by 2.

[0135] Each unordered sentence pair combination consists of two sentences, which are then fed into the first and second encoding branches of the trained Siamese network, respectively. Let an unordered sentence pair combination contain the sentences... and sentences , the sentence Input the first encoding branch and obtain the corresponding first sentence vector. , the sentence Input the second encoding branch to obtain the corresponding second sentence vector. Calculate the vector of the first sentence. With the second sentence vector The vector distance between the sentences is used to generate the semantic similarity of the unordered sentence pair combination. In this embodiment, the vector distance is the cosine distance, and the semantic similarity is the cosine similarity. The calculation formula is as follows:

[0136] ;

[0137] in, Sentence With sentences Semantic similarity between them Sentence The corresponding sentence vector, Sentence The corresponding sentence vector, express and dot product, express The length of the mold, express The modulus length. The semantic similarity value ranges from 0 to 1, with the value closer to 1 indicating that the semantic content of the two sentences is more similar.

[0138] The semantic similarity calculation module traverses all semantic clusters and outputs the semantic similarity of each sentence pair in each semantic cluster, which serves as the input data for the subsequent strength inconsistency labeling module.

[0139] The intensity inconsistency marking module is used to select sentence pairs with semantic similarity higher than a preset threshold, compare the level difference of the modal intensity labels of the two sentences in the sentence pair, and mark the sentence pair as potentially inconsistent when the level difference is greater than a preset level difference threshold.

[0140] Furthermore, in the intensity inconsistency labeling module, sentence pairs with semantic similarity higher than a preset threshold are selected, and the difference in modality intensity labels between the two sentences in the sentence pair is compared, including:

[0141] Select sentence pairs with semantic similarity greater than a preset threshold as a candidate sentence pair set;

[0142] For each candidate sentence pair in the candidate sentence pair set, extract the first intensity level value and the second intensity level value corresponding to the modality intensity labels of the two sentences in the sentence pair, respectively;

[0143] The absolute difference between the first strength grade value and the second strength grade value is calculated as the grade difference;

[0144] When the grade difference is greater than the preset grade difference threshold, the candidate sentence pair is marked as potentially inconsistent.

[0145] Specifically, in this embodiment, the intensity inconsistency marking module is used to select sentence pairs with semantic similarity higher than a preset threshold, compare the level difference of the modal intensity labels of the two sentences in the sentence pair, and mark the sentence pair as potentially inconsistent when the level difference is greater than a preset level difference threshold.

[0146] The intensity inconsistency labeling module first obtains the semantic similarity of each sentence pair in each semantic cluster, as well as the modal intensity label of the first sentence and the modal intensity label of the second sentence in each sentence pair. The semantic similarity is derived from the output of the semantic similarity calculation module, and the modal intensity label is derived from the output of the intensity level mapping module. The semantic similarity of each sentence pair is compared with a preset threshold one by one, and sentence pairs with semantic similarity greater than the preset threshold are selected as the candidate sentence pair set. In this embodiment, the preset threshold is set to 0.8. A semantic similarity greater than 0.8 indicates that the semantic content of the two sentences is highly similar, constituting a strong semantic association. For each candidate sentence pair in the candidate sentence pair set, the first modal intensity label of the first sentence and the second modal intensity label of the second sentence in the candidate sentence pair are obtained. Each modal intensity label corresponds to a preset intensity level value. In this embodiment, the five preset intensity levels in the multi-level intensity scale correspond to values ​​1 to 5, with the mandatory level corresponding to value 5, the strictly prohibited level corresponding to value 4, the recommended level corresponding to value 3, the allowed level corresponding to value 2, and the not recommended level corresponding to value 1.

[0147] Extract the first intensity level value corresponding to the first modal intensity label and the second intensity level value corresponding to the second modal intensity label. Calculate the absolute difference between the first and second intensity level values ​​as the level difference of the candidate sentence pair, using the following formula:

[0148] ;

[0149] in, Indicates the difference in rank. This indicates the first intensity level value. This represents the second intensity level value. The level difference indicates the degree of deviation between the levels of requirements expressed by the two sentences. For example, if the modal intensity label of the first sentence is 5 (corresponding to the mandatory level) and the modal intensity label of the second sentence is 3 (corresponding to the recommended level), then the level difference is 2, indicating that there is a two-level deviation in the level of requirements between the two sentences.

[0150] The level difference is compared with a preset level difference threshold. When the level difference is greater than the preset level difference threshold, the candidate sentence pair is marked as potentially inconsistent. In this embodiment, the preset level difference threshold is set to 1. A level difference greater than 1 indicates that the requirement levels of the two sentences differ by more than two levels, constituting a significant inconsistency. A level difference equal to 1 indicates that the requirement levels of the two sentences are adjacent, falling within a reasonable intensity gradient range, and no marking is triggered. When the modality intensity label of any sentence in the candidate sentence pair is null, the comparison operation for that candidate sentence pair is skipped, and no marking is performed.

[0151] The inconsistency labeling module performs the above comparison and labeling operations on all candidate sentence pairs and outputs all sentence pairs marked as potentially inconsistent, which serve as input data for the subsequent compliance verification and report generation module.

[0152] The compliance verification and report generation module is used to construct a domain compliance knowledge graph. It compares the normative subject, behavior action, and modality intensity label of each sentence with the clause topics and legally mandated levels in the domain compliance knowledge graph. Based on the comparison results and potential inconsistency markers, it generates a modality intensity consistency verification report for the document to be proofread.

[0153] Furthermore, in the compliance verification and report generation module, a domain compliance knowledge graph is constructed, including:

[0154] Obtain the set of compliance guidelines texts in the target field, break down each compliance guidelines text according to the clause structure, and obtain the original text of each clause;

[0155] The original text of each clause is input into a large language model that has been fine-tuned with compliant and standardized corpus. The large language model outputs the structured extraction results of the clause theme, the subject of the regulation, the description of the behavior, and the legal enforcement level corresponding to each clause.

[0156] The structured extraction results of each clause are checked for consistency, and clauses with the same subject matter but different levels of legal enforcement are marked as conflict clauses.

[0157] Semantic normalization is performed on the clause topics and behavioral descriptions respectively, mapping different textual expressions of the same concept to the same standardized entity node;

[0158] A compliance knowledge graph for the target domain is constructed using standardized entity nodes as entity nodes, legally mandated levels as entity attributes, and the referencing and hierarchical relationships between various clauses as entity edges.

[0159] Furthermore, in the compliance verification and report generation module, a modal strength consistency verification report for the document to be verified is generated, including:

[0160] Using the normative subject and behavioral action of each sentence as search criteria, the system retrieves matching clause topics from the domain compliance knowledge graph and obtains the legally mandated level associated with the clause topics.

[0161] The modality intensity labels in each sentence are compared with the retrieved legally mandated levels. The difference between the intensity level corresponding to the modality intensity label of each sentence and the legally mandated level is calculated as the compliance deviation score of the sentence.

[0162] Obtain all sentence pairs marked as potentially inconsistent. For each potentially inconsistent sentence pair, calculate the product of the difference in modality intensity labels between the two sentences in the sentence pair and the semantic similarity, and use it as the severity score of the sentence pair.

[0163] Based on the compliance deviation score of each sentence and the severity score of each potentially inconsistent sentence pair, the warning items are prioritized and sorted. Warning items with both compliance deviation score and severity score higher than the preset high priority threshold are marked as high priority.

[0164] Summarize all warning items in descending order of priority and generate a modality strength consistency verification report for the documents to be checked.

[0165] Specifically, the compliance verification and report generation module performs two tasks: the first task is to build a domain compliance knowledge graph, and the second task is to generate a modality strength consistency verification report for the documents to be verified.

[0166] The compliance verification and report generation module first obtains a set of compliance norms texts for the target domain. This set contains at least one standard or regulatory document for the target domain. In this implementation, if the target domain is the construction industry, the compliance norms text set may include the GB 500xx series of building codes; if the target domain is data security, the set may include relevant data security regulations and standards. Each compliance norm text is then broken down according to its clause structure to obtain the original text of each clause. Clause structure identification is based on formatting features such as chapter numbers, clause numbers, and paragraph indentation, dividing the normative text into independent clause units.

[0167] The original text of each clause is input into a large language model fine-tuned from a compliance and normative corpus. The large language model outputs structured extraction results for each clause, including the clause theme, normative subject, behavioral description, and legal enforcement level. In this embodiment, ChatGLM3-6B is selected as the base model, and LoRA low-rank adaptation is used for fine-tuning to reduce computational resource consumption while retaining the general language capabilities of the base model. In this embodiment, the low-rank adaptation rank of LoRA fine-tuning is set to 8, and the scaling factor is set to 32. The LoRA module is applied to the query transformation matrix and value transformation matrix of the self-attention layer of the base model, but not to the feedforward network layer. During training, the original parameters of the base model are frozen, and only the rank decomposition parameters of the LoRA module are updated. The learning rate during the fine-tuning stage is set to 3e-4, the batch size is set to 16, and the number of training epochs is set to 5. The fine-tuning data comes from publicly available legal text datasets and self-annotated compliance and normative texts from various fields, totaling approximately 5000 annotated samples. Each fine-tuning sample contains the original text of a clause and the annotation results for its corresponding four fields: clause theme, regulatory body, behavioral description, and legal enforcement level. The input format is a template containing the original clause text and an explanation of the extraction target. The output format is a JSON structure containing the four fields: clause theme, regulatory body, behavioral description, and legal enforcement level. When the JSON structure output by the large language model fails to parse or contains empty fields, the system marks the extraction result of that clause as having low confidence and uses the original text of that clause as input to call a pre-built rule-based fallback extractor for supplementary extraction. The fallback extractor matches the clause theme and legal enforcement level using regular expressions. If the fallback extractor still cannot obtain a valid result, the clause is marked for manual review and is not included in the construction of the compliance knowledge graph. The legal enforcement level corresponds to the preset intensity levels in the multi-level intensity scale, including mandatory level, strictly prohibited level, recommended level, permitted level, and not recommended level.

[0168] Consistency checks are performed on the structured extraction results of each clause. Consistency checks involve comparing the legal enforcement levels of multiple clauses with the same subject matter. When clauses with the same subject matter but different legal enforcement levels are detected, these clauses are marked as conflicting, and the conflict information is recorded in the knowledge graph construction log for subsequent manual review.

[0169] Semantic normalization is performed on both the clause topic and the behavioral description. Semantic normalization refers to mapping different textual expressions of the same concept to the same standardized entity node. For example, structural bearing capacity and structural bearing force in the clause topic express the same concept; after semantic normalization, they are uniformly mapped to the standardized entity node of structural bearing capacity. In this embodiment, semantic normalization is achieved by combining semantic similarity calculation based on a pre-trained language model with standardized vocabulary mapping. The standardized vocabulary is pre-constructed by experts in the target domain and contains the standard names of various concepts in that domain. For each textual expression to be normalized, its semantic similarity with each standard name in the standardized vocabulary is calculated. The standard name with the highest semantic similarity exceeding a preset normalization threshold is selected as the standardized entity node for that textual expression. If the semantic similarity does not exceed the preset normalization threshold, the textual expression is added to the standardized vocabulary as a new standardized entity node. In this embodiment, the preset normalization threshold is set to 0.85.

[0170] A compliance knowledge graph for the target domain is constructed using standardized entity nodes as entity nodes, legally mandated levels as entity attributes, and referencing and hierarchical relationships between clauses as entity edges. The compliance knowledge graph is stored in a graph database and supports retrieval by clause theme, regulatory subject, and behavioral description. The compliance verification and report generation module stores this compliance knowledge graph for subsequent report generation tasks.

[0171] The system acquires the normative subject, behavioral action, modality intensity tag, and domain compliance knowledge graph for each sentence. For each sentence, using its normative subject and behavioral action as search criteria, it retrieves clause topics that match the normative subject and behavioral action from the domain compliance knowledge graph. The retrieval process combines exact matching and semantic similarity matching from the graph database. First, it performs exact matching between the normative subject of the sentence and the normative subject attributes of entity nodes in the knowledge graph. Then, it performs semantic similarity matching between the behavioral action of the sentence and the behavioral description attributes of entity nodes in the knowledge graph. The clause topic with the highest semantic similarity exceeding a preset matching threshold is selected as the retrieval result. In this implementation, the preset matching threshold is set to 0.8. If multiple matching results exist, the clause topic with the highest semantic similarity is selected as the final retrieval result. If no matching result exists, the sentence is marked as unverifiable, and no warning entry is generated.

[0172] Obtain the statutory enforcement level associated with the clause topic. Compare the modal intensity tags in each sentence with the retrieved statutory enforcement levels, and calculate the difference between the intensity level corresponding to the modal intensity tag and the statutory enforcement level as the compliance deviation score for that sentence. The calculation formula is as follows:

[0173] ;

[0174] in, Indicates the compliance deviation score. This indicates the intensity level value corresponding to the modality intensity label in the sentence. This indicates the intensity level value corresponding to the legally mandated level. A positive compliance deviation score indicates that the modal intensity of the sentence is higher than the legal requirement, a negative score indicates that the modal intensity of the sentence is lower than the legal requirement, and zero indicates that the modal intensity of the sentence meets the legal requirement.

[0175] When the compliance deviation score is less than 0, meaning the intensity level corresponding to the modal intensity label is lower than the legally mandated level, the sentence is marked as a weakened constraint, and the corresponding sentence position, modal intensity label, and legally mandated level are recorded, generating a weakened constraint warning item. When the compliance deviation score is greater than 0, meaning the intensity level corresponding to the modal intensity label is higher than the legally mandated level, the sentence is marked as an over-constraint, and the corresponding sentence position, modal intensity label, and legally mandated level are recorded, generating an over-constraint warning item.

[0176] Retrieve all sentence pairs marked as potentially inconsistent. Potentially inconsistent sentence pairs are derived from the output of the inconsistency labeling module. For each potentially inconsistent sentence pair, calculate the product of the difference in modality intensity labels between the two sentences and their semantic similarity. This product is used as the severity score for the sentence pair, calculated using the following formula:

[0177] ;

[0178] in, Indicates severity score, The severity score represents the difference in modality intensity labels between the two sentences in the sentence pair, while sim represents the semantic similarity between the two sentences. The severity score considers both the magnitude of the intensity deviation and the degree of semantic relevance. A larger intensity difference and higher semantic similarity result in a higher severity score, indicating a greater actual risk of the inconsistency issue.

[0179] Based on the compliance deviation score of each sentence and the severity score of each potentially inconsistent sentence pair, the warning items are prioritized. Warning items include weakening warning items, over-constraint warning items, and internal inconsistency items. The prioritization rule is as follows: warning items with both compliance deviation scores and severity scores higher than a preset high-priority threshold are marked as high-priority. In this implementation, the preset high-priority threshold is set to an absolute value of a compliance deviation score greater than or equal to 2 and a severity score greater than or equal to 0.8. High-priority warning items are prioritized at the beginning of the report. The remaining warning items are arranged in descending order of the absolute value of their compliance deviation score or severity score.

[0180] Based on priority from highest to lowest, weakening warning items, over-constraint warning items, and internal inconsistency items are summarized to generate a modal strength consistency verification report for the documents to be checked. The verification report includes the document location, specific content, error type, and correction suggestions for each warning item, and is output in a structured document format and presented to the user interface. Correction suggestions are generated as follows: For weakening and over-constraint warning items, matching correction suggestion templates are retrieved from a predefined correction suggestion library based on the sign and absolute value of the compliance deviation score. The correction suggestion library contains multiple correction suggestion templates, each corresponding to a combination of deviation type and deviation magnitude. For internal inconsistency items, modal verbs in sentences with higher intensity levels are replaced with modal verbs in sentences with lower intensity levels as candidate correction suggestions, while modal verbs in sentences with lower intensity levels are replaced with modal verbs in sentences with higher intensity levels as another candidate correction suggestion. Both candidate correction suggestions are presented in the verification report for the user to choose from.

[0181] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A deep learning-based intelligent error correction system for office documents, characterized in that, include: The modal semantic parsing module is used to obtain the full text of the document to be proofread, perform modal semantic role labeling on each sentence in the full text, and identify the normative subject, modal verbs, actions and conditional clauses in each sentence; The intensity level mapping module is used to map the modal verbs to the corresponding intensity levels in a predefined multi-level intensity scale, and output the modal intensity label of each sentence and the confidence score corresponding to the modal intensity label; The document structure aggregation module is used to cluster sentences according to the normative subject, arrange all sentences of the same normative subject in document order, and generate a requirement strength sequence of the normative subject; and to perform semantic clustering on the behavioral actions, merging sentences that express the same behavioral action into the same semantic cluster. The semantic similarity calculation module is used to construct a Siamese network trained by contrastive learning. Sentences belonging to the same semantic cluster are input into the Siamese network in pairs to calculate the semantic similarity of each pair of sentences. The intensity inconsistency marking module is used to select sentence pairs whose semantic similarity is higher than a preset threshold, compare the level difference of the modality intensity labels of the two sentences in the sentence pair, and mark the sentence pair as potentially inconsistent when the level difference is greater than a preset level difference threshold. The compliance verification and report generation module is used to construct a domain compliance knowledge graph. It compares the normative subject, behavioral action, and modality intensity label of each sentence with the clause topics and legal enforcement levels in the domain compliance knowledge graph. Based on the comparison results and the potential inconsistency markers, it generates a modality intensity consistency verification report for the document to be proofread.

2. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the modal semantic parsing module, the normative subject, modal verbs, actions, and conditional clauses in each sentence are identified, including: The full text is segmented, part-of-speech tagging is performed, and syntactic analysis is conducted to obtain the part-of-speech tags of each word and the dependency relationships between words; Based on the part-of-speech tags and the dependency relationships, modal verbs are selected from the predicates of each sentence; Using the modal verb as the annotation target, the candidate arguments that have a dependency relationship with the modal verb are classified into semantic roles. The arguments corresponding to the agent label are extracted as the normative subject, and the arguments corresponding to the patient label are extracted as the behavioral action. Each sentence is identified as a conditional adverbial clause, and conditional clauses containing conditional conjunctions are extracted.

3. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the intensity level mapping module, the modal verb is mapped to the corresponding intensity level in a predefined multi-level intensity scale, including: According to the predefined multi-level strength scale, the multi-level strength scale includes multiple preset strength levels and standard modal verbs corresponding to each preset strength level; For each modal verb in a sentence, retrieve the standard modal verb that matches the modal verb in the multi-level intensity scale, and determine the preset intensity level corresponding to the matching standard modal verb as the modal intensity label of the sentence; The confidence score corresponding to the modal intensity label is calculated based on the matching method between the modal verb and the standard modal verb.

4. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the document structure aggregation module, all sentences of the same specification subject are arranged in document order to generate a sequence of required strengths for that specification subject, including: Sentences are grouped according to the normative subject, and all sentences with the same normative subject are grouped into the same subject group. For each subject group, the sentences are sorted according to their document position order to generate an ordered sequence of sentences for that subject group; Extract the modality intensity labels corresponding to each sentence in the ordered sequence of sentences, arrange them sequentially according to the order of the sentences, and generate the requirement intensity sequence of the main body of the specification.

5. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the document structure aggregation module, semantic clustering is performed on the actions, grouping sentences expressing the same action into the same semantic cluster, including: Dependency parsing is performed on each of the described actions. Using words in each action as nodes and dependency relationships between words as edges, a phrase dependency graph corresponding to each action is constructed. Each phrase dependency graph is input into a graph isomorphic network to obtain graph-level semantic vectors corresponding to each action; the graph isomorphic network is used to map phrase dependency graphs with different structures to fixed-dimensional vectors in the same vector space; Calculate the vector distance between the semantic vectors at each graph level, and determine the semantic similarity between any two actions based on the vector distance; Clustering is performed based on the semantic similarity between each behavior action, and multiple behaviors actions with a semantic similarity greater than a preset clustering threshold are grouped into the same behavior action group. Sentences in each sentence that correspond to each action within the action group are labeled as belonging to the semantic cluster corresponding to that action group.

6. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the semantic similarity calculation module, a Siamese network trained through contrastive learning is constructed, including: Construct a twin network, wherein the twin network includes a first coding branch and a second coding branch that share network parameters; Using sentence pairs and their corresponding similarity labels as training samples, the sentence pairs in the training samples are input into the first encoding branch and the second encoding branch respectively to obtain the sentence vectors corresponding to each sentence. The predicted semantic similarity of the sentence pairs is generated based on the distance between the sentence vectors. The network parameters of the Siamese network are iteratively updated based on the difference between the predicted semantic similarity and the similarity label until convergence, and the trained Siamese network is output.

7. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the semantic similarity calculation module, sentences belonging to the same semantic cluster are paired and input into the Siamese network to calculate the semantic similarity of each pair of sentences, including: Iterate through the set of sentences contained in each of the semantic clusters to generate all possible unordered sentence pair combinations; The two sentences in each of the unordered sentence pairs are respectively input into the first and second encoding branches of the Siamese network to obtain the sentence vector of each sentence; Calculate the vector distance between the two sentence vectors in each sentence pair, and generate the semantic similarity of the sentence pair based on the vector distance.

8. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the intensity inconsistency labeling module, sentence pairs with semantic similarity higher than a preset threshold are selected, and the difference in modality intensity labels between the two sentences in the sentence pair is compared, including: Sentence pairs whose semantic similarity is greater than a preset threshold are selected as a candidate sentence pair set. For each candidate sentence pair in the candidate sentence pair set, extract the first intensity level value and the second intensity level value corresponding to the modality intensity labels of the two sentences in the sentence pair, respectively; The absolute difference between the first strength grade value and the second strength grade value is calculated as the grade difference; When the grade difference is greater than a preset grade difference threshold, the candidate sentence pair is marked as potentially inconsistent.

9. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the compliance verification and report generation module, a domain compliance knowledge graph is constructed, including: Obtain the set of compliance guidelines texts in the target field, break down each compliance guidelines text according to the clause structure, and obtain the original text of each clause; The original text of each clause is input into a large language model that has been fine-tuned with a compliant and standardized corpus. The large language model outputs the structured extraction results of the clause theme, the subject of the standard, the description of the behavior, and the level of legal enforcement for each clause. The structured extraction results of each clause are checked for consistency, and clauses with the same subject matter but different levels of legal enforcement are marked as conflict clauses. The clause topics and the behavior descriptions are semantically normalized to map different textual expressions of the same concept to the same standardized entity node. Using the standardized entity nodes as entity nodes, the legally mandated levels as entity attributes, and the reference and hierarchical relationships between clauses as entity edges, a compliance knowledge graph for the target domain is constructed.

10. The intelligent error correction system for office documents based on deep learning according to claim 1, characterized in that, In the compliance verification and report generation module, a modality strength consistency verification report for the document to be verified is generated, including: Using the subject of each sentence and the action described therein as search criteria, the matching clause topics are retrieved from the domain compliance knowledge graph to obtain the legally mandated level associated with the clause topics; The modality intensity label in each sentence is compared with the retrieved legally mandated level, and the difference between the intensity level corresponding to the modality intensity label of each sentence and the legally mandated level is calculated as the compliance deviation score of the sentence. Obtain all sentence pairs marked as potentially inconsistent. For each potentially inconsistent sentence pair, calculate the product of the difference in modality intensity labels between the two sentences in the sentence pair and the semantic similarity, and use it as the severity score of the sentence pair. Based on the compliance deviation score of each sentence and the severity score of each potentially inconsistent sentence pair, the warning items are prioritized and sorted, and the warning items whose compliance deviation score and severity score are both higher than the preset high priority threshold are marked as high priority; Summarize all warning items in descending order of priority to generate a modality strength consistency verification report for the documents to be checked.