An AI-based offline application text hidden danger processing method and system

CN122927293APending Publication Date: 2026-10-16GUANGDONG KENUO SURVEYING ENG CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610978362.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]然而,现有技术中仍主要依赖云端智能分析与本地规则匹配相结合的处理方式

Benefits of technology

[0019]The embodiments of this application include at least the following beneficial effects: This application provides a text hazard processing method and system based on AI offline applications. This solution standardizes the input text and unifies its structure by generating target text based on a preset compliance template, thereby improving the accuracy and consistency of subsequent semantic analysis. By performing semantic parsing and structured decomposition on the target text, the text is divided into semantic text fragments, transforming risk identification from overall text processing to fine-grained semantic unit processing, thus improving the precision and localization capability of hazard identification. Furthermore, by introducing a local hazard rule base to perform preliminary risk matching on semantic text fragments, while ensuring the availability of the offline environment, it enables rapid screening and filtering of obvious risk points, improving processing efficiency and reducing computational load. Simultaneously, based on the offline AI semantic analysis model, deep semantic recognition is performed on the preliminary hazard results, which can supplement the detection of implicit risks that are difficult to cover by the rule base, thereby significantly improving the comprehensiveness and robustness of hazard identification. Furthermore, by fusing the results of the first and second potential hazards, the system achieves complementarity and verification between rule-driven and semantic understanding-driven results, thereby improving the reliability and accuracy of risk assessment. Finally, based on the fused hazard processing results, the system outputs optimized text results, enabling the system to automatically identify and optimize text hazards in an offline environment, thus improving the efficiency of text compliance processing and its practical engineering value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927293A_ABST
    Figure CN122927293A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of text information processing, in particular to a text hidden danger processing method and system based on AI offline application. The method comprises the following steps: obtaining a text to be processed and generating a target text based on a scale template; then performing semantic analysis and structured splitting on the target text to obtain semantic text segments; then performing preliminary risk matching on the semantic text segments by using a local hidden danger rule library to generate a first hidden danger result; further performing deep semantic reasoning and risk identification on the first hidden danger result by combining an offline AI semantic analysis model to obtain a second hidden danger result; finally, fusing the two types of results to form a unified hidden danger processing result, and outputting a text optimization result according to the unified hidden danger processing result, so as to realize layered detection and multi-model collaborative optimization processing on the text content. The application realizes efficient and accurate identification and automatic optimization output of the text hidden danger, thereby significantly improving the comprehensiveness and reliability of the text hidden danger processing in an offline environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of text information processing technology, and in particular to a method and system for handling text-related hidden dangers based on AI offline applications. Background Technology

[0002] In related technologies, with the continuous improvement of enterprises' digital management and business automation levels, the generation and review of contract texts, business documents, and professional documents are gradually becoming more intelligent and automated. In practical applications, text processing systems typically perform structured generation and basic verification of input text based on preset templates or rule systems, and combine risk identification mechanisms to detect potential compliance risks, semantic ambiguities, and clause anomalies, in order to meet enterprises' basic needs for text standardization and risk controllability.

[0003] However, current technologies primarily rely on a combination of cloud-based intelligent analysis and local rule matching. While cloud-based analysis possesses strong semantic understanding capabilities, it requires external data transmission, posing security risks when handling sensitive text. Furthermore, it suffers from low processing efficiency and insufficiently precise risk identification in long texts or complex structures. On the other hand, traditional methods based on human experience mainly rely on keyword matching or fixed template comparison, which struggles to effectively identify implicit risks with strong contextual semantic relationships. These methods also suffer from delayed rule updates, limited coverage, and high manual costs. Moreover, current technologies typically lack a unified fusion mechanism for initial rule screening results and deep semantic analysis results, resulting in fragmented risk identification outcomes and hindering the formation of a complete closed-loop processing chain. This, in turn, affects the overall consistency and reliability of subsequent text optimization and risk management.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0005] The main objective of this application is to propose a text vulnerability processing method and system based on AI offline applications, so as to achieve efficient and accurate identification and automatic optimization output of text vulnerabilities, thereby significantly improving the comprehensiveness and reliability of text compliance processing in offline environments.

[0006] To achieve the above objectives, one aspect of this application proposes a method for handling textual vulnerabilities based on AI offline applications, the method comprising the following steps: Obtain the text information to be processed and generate the target text based on the preset compliance template; The target text is semantically parsed and structurally decomposed to obtain semantic text fragments; Based on the local hazard rule base, a preliminary risk matching is performed on the semantic text fragment to generate the first hazard result; Based on an offline AI semantic analysis model, a deep hazard identification is performed on the first hazard result to generate a second hazard result; The first hazard result and the second hazard result are merged to generate a hazard handling result; The text optimization results are output based on the results of the hazard handling.

[0007] In some embodiments, the text information to be processed includes one or more combinations of contract text information, agreement text information, legal and regulatory clause text information, business specification document information, unstructured or semi-structured text information containing sensitive information, and historically stored text information.

[0008] In some embodiments, obtaining the text information to be processed and generating the target text based on a preset compliance template includes: Obtain and process text information; Based on the parsing of the processed text information, the target business type and corresponding compliance constraints are obtained; Match a preset compliance template from the local compliance template library based on the target business type; The target text is generated based on the preset compliance template and the compliance constraints.

[0009] In some embodiments, the semantic parsing and structured decomposition of the target text to obtain semantic text fragments includes: The target text is normalized by unifying the encoding format and performing punctuation standardization and redundant character cleanup to obtain standardized text; Based on syntactic analysis, the standardized text is segmented into sentences at the sentence level to identify semantic boundaries and obtain semantically complete sentences. Based on preset structural rules, the semantically complete statement is split into clause-level segments to generate candidate semantic fragments; The candidate semantic segments are subjected to semantic verification and merging processing to obtain semantic text segments.

[0010] In some embodiments, the step of performing sentence-level segmentation on the standardized text based on syntactic analysis, identifying semantic boundaries, and obtaining semantically complete sentences includes: The standardized text is segmented and part-of-speech tagged to obtain a basic word sequence; Based on the aforementioned basic word sequence, a syntactic dependency relation structure is constructed using dependency parsing. Based on the syntactic dependency relation structure, the subject-verb-object and modification relation boundaries are extracted to determine the semantic segmentation points; Based on the semantic segmentation points, perform statement-level segmentation to obtain the basic statements; Based on semantic integrity constraints, the basic statement is boundary-corrected to obtain a semantically complete statement.

[0011] In some embodiments, the preliminary risk matching of the semantic text fragment based on a local hazard rule base to generate a first hazard result includes: The semantic text fragment is represented by feature vectorization to obtain a semantic feature vector; A rule indexing system is built based on a local hazard rule base; Based on the semantic feature vector and the rule index system, a matching calculation is performed to generate a matching result; the matching calculation includes semantic similarity matching, keyword hit matching, and threshold constraint verification. Based on the matching results, preliminary risk assessment information is generated, and risk type is marked and hazard location is determined to obtain the first hazard result.

[0012] In some embodiments, the rule indexing system includes one or more combinations of clause rule index, keyword rule index, and threshold constraint index.

[0013] In some embodiments, the step of performing deep hazard identification on the first hazard result based on an offline AI semantic analysis model to generate a second hazard result includes: The first potential hazard result is subjected to structured analysis to extract semantic fragments to be reviewed and initial risk markers; Based on the semantic fragment to be reviewed and the initial risk label, a model input representation is constructed, and a semantic feature vector is generated; The semantic feature vector is input into an offline AI semantic analysis model for inference calculation to obtain the hazard identification result; Based on the identified hazard results, risk verification and compliance mapping are performed to generate a second hazard result.

[0014] In some embodiments, the step of inputting the semantic feature vector into an offline AI semantic analysis model for inference calculation to obtain the hazard identification result includes: The semantic feature vectors are then subjected to context-enhanced encoding to construct a fused semantic representation; Based on the fused semantic representation, attention weights are assigned to extract key risk semantic features; Based on the key risk semantic features, multi-layer reasoning is performed through an offline semantic analysis network to generate risk types and risk intensity. Based on the risk type and risk intensity, decoding processing is performed to generate hazard identification results.

[0015] To achieve the above objectives, another aspect of this application proposes a text vulnerability processing system based on AI offline applications, the system comprising: The acquisition module is used to acquire the text information to be processed and generate the target text based on a preset compliance template; The semantic processing module is used to perform semantic parsing and structured decomposition on the target text to obtain semantic text fragments; The preliminary risk matching module is used to perform preliminary risk matching on the semantic text fragments based on the local hidden danger rule base and generate the first hidden danger result; The deep hazard identification module is used to perform deep hazard identification on the first hazard result based on an offline AI semantic analysis model, and generate a second hazard result. The fusion processing module is used to fuse the first hidden danger result and the second hidden danger result to generate a hidden danger processing result; The output module is used to output text optimization results based on the hazard handling results.

[0016] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0017] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0018] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0019] The embodiments of this application include at least the following beneficial effects: This application provides a text hazard processing method and system based on AI offline applications. This solution standardizes the input text and unifies its structure by generating target text based on a preset compliance template, thereby improving the accuracy and consistency of subsequent semantic analysis. By performing semantic parsing and structured decomposition on the target text, the text is divided into semantic text fragments, transforming risk identification from overall text processing to fine-grained semantic unit processing, thus improving the precision and localization capability of hazard identification. Furthermore, by introducing a local hazard rule base to perform preliminary risk matching on semantic text fragments, while ensuring the availability of the offline environment, it enables rapid screening and filtering of obvious risk points, improving processing efficiency and reducing computational load. Simultaneously, based on the offline AI semantic analysis model, deep semantic recognition is performed on the preliminary hazard results, which can supplement the detection of implicit risks that are difficult to cover by the rule base, thereby significantly improving the comprehensiveness and robustness of hazard identification. Furthermore, by fusing the results of the first and second potential hazards, the system achieves complementarity and verification between rule-driven and semantic understanding-driven results, thereby improving the reliability and accuracy of risk assessment. Finally, based on the fused hazard processing results, the system outputs optimized text results, enabling the system to automatically identify and optimize text hazards in an offline environment, thus improving the efficiency of text compliance processing and its practical engineering value. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a text vulnerability processing method based on AI offline applications provided in an embodiment of this application; Figure 2 yes Figure 1 A flowchart illustrating step S2 in the process; Figure 3 yes Figure 1 A flowchart illustrating step S3 in the process; Figure 4 This is a schematic diagram of a text vulnerability processing system based on AI offline applications provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0022] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0023] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0025] This application provides a text-based hidden danger processing method and system based on AI offline applications. This solution standardizes the input text by generating target text based on a preset compliance template, thereby improving the accuracy and consistency of subsequent semantic analysis. By performing semantic parsing and structured decomposition on the target text, the text is broken down into semantic text fragments, transforming risk identification from overall text processing to fine-grained semantic unit processing, thus enhancing the precision and localization capability of hidden danger identification. Furthermore, by introducing a local hidden danger rule base for preliminary risk matching of semantic text fragments, the availability of the offline environment is ensured while enabling rapid screening and filtering of obvious risk points, improving processing efficiency and reducing computational load. Simultaneously, deep semantic recognition is performed on the preliminary hidden danger results based on an offline AI semantic analysis model, supplementing the detection of implicit risks that are difficult to cover by the rule base, thereby significantly improving the comprehensiveness and robustness of hidden danger identification. Furthermore, by fusing the results of the first and second potential hazards, the system achieves complementarity and verification between rule-driven and semantic understanding-driven results, thereby improving the reliability and accuracy of risk assessment. Finally, based on the fused hazard processing results, the system outputs optimized text results, enabling the system to automatically identify and optimize text hazards in an offline environment, thus improving the efficiency of text compliance processing and its practical engineering value.

[0026] This application provides a text vulnerability processing method based on AI offline applications, relating to the field of text information processing technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing an AI offline application-based text vulnerability processing method, but is not limited to the above forms.

[0027] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0028] Figure 1 This is an optional flowchart of a text vulnerability processing method based on AI offline applications provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S1 to S6: S1: Obtain the text information to be processed and generate the target text based on the preset compliance template; This includes acquiring the text information to be processed and generating the target text based on a preset compliance template, including: S11: Obtain and process text information; the text information to be processed includes one or more combinations of contract text information, agreement text information, legal and regulatory clause text information, business specification document information, unstructured or semi-structured text information containing sensitive information, and historical stored text information. S12: Obtain the target business type and corresponding compliance constraints based on the parsing of processed text information; S13: Match a preset compliance template from the local compliance template library based on the target business type; S14: Generate target text based on a preset compliance template and in combination with compliance constraints.

[0029] In this embodiment, the text information to be processed is first acquired. This text information includes one or more combinations of contract text information, agreement text information, legal and regulatory clause text information, business specification document information, unstructured or semi-structured text information containing sensitive information, and historically stored text information. The acquired text information undergoes unified access processing, including format cleaning, redundant character filtering, and encoding standardization, thereby achieving standardized input of multi-source heterogeneous text.

[0030] Based on this, semantic analysis is performed on the text information to be processed. The target business type is identified based on text content features, keyword distribution, and semantic structure information, and the corresponding compliance constraints are extracted simultaneously. This target business type includes one or more combinations of procurement, construction, service, or general standard business types. The compliance constraints include industry regulatory requirements, clause constraints, and risk control boundary conditions.

[0031] Furthermore, based on the identified target business type, a pre-set compliance template is matched from the local compliance template library. The compliance template library pre-stores standardized text structures and clause frameworks corresponding to different business types. During the matching process, preliminary screening is performed based on business type tags and text characteristics, and secondary verification is conducted in conjunction with compliance constraints to determine the target compliance template that best matches the current text.

[0032] Finally, based on the preset compliance template and combined with compliance constraints, the template content is dynamically adjusted and filled, the business information in the original text is mapped to the corresponding clause position in the template, and the template clauses are modified for compliance adaptation, thereby generating target text with unified structure, consistent semantics and compliance constraints, providing a standardized input basis for subsequent hidden danger identification and semantic analysis.

[0033] Specifically, this embodiment incorporates a multi-industry compliance framework, a clause element library for segmented business scenarios, and standardized text generation rules. Based on key parameters input by the user, such as business type, transaction entity, and core rights and obligations, it intelligently retrieves matching industry-specific templates and customized clause modules to quickly generate unstructured contracts or draft texts that fully comply with target industry regulatory requirements and are adapted to specific business scenarios. This ensures that the generated content meets initial standards in terms of structural integrity, clause compliance, and business adaptability. The unstructured text also provides more possibilities for applications such as dynamically adding clauses, automatic risk analysis, and risk closure.

[0034] S2: Perform semantic parsing and structured decomposition on the target text to obtain semantic text fragments; Among them, reference Figure 2 As shown, semantic parsing and structured decomposition of the target text yield semantic text fragments, including: S21: Standardize the target text, unify the encoding format, and perform punctuation standardization and redundant character cleanup to obtain standardized text; S22: Based on syntactic analysis, standardized text is segmented into sentences at the sentence level to identify semantic boundaries and obtain semantically complete sentences; S23: Based on preset structural rules, semantically complete statements are split into clause-level segments to generate candidate semantic fragments; S24: Perform semantic verification and merging on the candidate semantic segments to obtain semantic text segments.

[0035] In this embodiment, the target text is first standardized by converting the input contract text, agreement text, or other business text into a standard encoding format. Punctuation standardization is then performed, including unifying Chinese and English punctuation, replacing illegal characters, and removing redundant spaces and control characters, resulting in standardized text. This process eliminates differences in encoding and format between texts from different sources, improving the consistency and stability of subsequent semantic parsing.

[0036] Based on this, the standardized text is segmented at the sentence level. The text is then analyzed for dependency relations and sentence structure based on the syntactic analysis model. The subject-verb-object structure and modification relations within the sentence are determined. Semantic boundaries are identified by combining sentence segmentation rules. This process divides continuous text into semantically complete sentences with complete semantic expression, thus avoiding the loss or fragmentation of semantic information due to incorrect sentence segmentation.

[0037] Specifically, the construction process of the syntactic analysis model includes: First, data collection is conducted based on a large-scale general corpus and a domain-specific corpus. This corpus covers at least multiple sources of legal and business data, such as contract texts, agreement texts, and business specification texts. The collected data is then processed with word segmentation, part-of-speech tagging, and dependency relation annotation to form a structured training sample dataset. Subsequently, training samples for the syntactic analysis model are constructed based on the training sample dataset. By introducing a syntactic dependency tree structure, the subject-verb-object, modification, and subordination relations in the sentences are annotated and modeled to form a standardized syntactic structure representation. Further, a deep neural network model is used to train the training samples for feature learning, enabling the model to automatically generate syntactic dependency structures and semantic boundary determination results for the input text. Finally, the model parameters are optimized and the generalization ability is verified through a validation set to obtain a syntactic analysis model suitable for semantic parsing of the target text, which is used for subsequent sentence-level semantic boundary recognition and structured decomposition processing.

[0038] Furthermore, based on preset structural rules, semantically complete statements are split into clauses. These preset structural rules include clause numbering rules, chapter level rules, and business semantic identification rules. By identifying structural identifiers such as "Article X" and "Clause XX", the statements are further broken down into candidate semantic fragments. Complex statements involving multiple constraints or multiple behavioral descriptions are split into fine-grained segments, so that each candidate semantic fragment corresponds to a single semantic expression unit.

[0039] Finally, the candidate semantic segments are subjected to semantic consistency verification and merging. The semantic integrity between segments is judged based on the contextual relationship. Segments with semantic repetition or dependency are merged, and semantically broken or incomplete segments are supplemented and adjusted, thereby generating semantic text segments with clear semantic boundaries, semantic independence and consistent structure, providing a high-quality input foundation for subsequent hazard identification and semantic analysis.

[0040] Specifically, based on syntactic analysis, standardized text is segmented at the sentence level to identify semantic boundaries and obtain semantically complete sentences, including: S221: Perform word segmentation and part-of-speech tagging on the standardized text to obtain a basic word sequence; S222: Construct syntactic dependency relation structures based on dependency parsing according to the basic word sequence; S223: Extract subject-verb-object and modification relation boundaries based on syntactic dependency relation structure to determine semantic segmentation points; S224: Perform statement-level segmentation based on semantic segmentation points to obtain basic statements; S225: Based on semantic integrity constraints, the boundaries of the basic statement are corrected to obtain a semantically complete statement.

[0041] In this embodiment, standardized text is segmented and tagged with parts of speech. The text is split into a sequence of basic words, and each word is assigned a corresponding part-of-speech tag, thus forming structured input data. The segmentation and tagging process is implemented based on a pre-trained language model and a domain dictionary to improve the recognition accuracy of proper nouns and legal terms in contract, agreement, and normative texts.

[0042] Based on a pre-trained syntactic analysis model using basic word sequences as input, the model is used to model and analyze the dependency relationships between words, constructing a syntactic dependency relationship structure. This structure is used to represent the master-slave, modification, and dominance relationships between words, and generates a structured dependency tree, thus providing a structural basis for semantic boundary recognition.

[0043] Furthermore, based on the syntactic dependency relation structure, the subject-verb-object structure and modification relation boundaries are extracted by combining the output of the syntactic analysis model, and semantic segmentation points are identified. For complex sentences containing parallel relations, conditional relations, or multiple action expressions, the potential semantic boundary locations are determined by dependency relation breakpoints and the structural determination results of the syntactic analysis model, and candidate semantic segments are generated.

[0044] Finally, the candidate semantic segments are subjected to semantic integrity verification and merging. Based on contextual consistency and syntactic dependency structure constraints, the semantically fragmented segments are completed, and the repeated or redundant segments are merged and optimized, so as to obtain semantic text segments with clear semantic boundaries, complete semantic expression and consistent structure, providing standardized input units for subsequent hidden danger identification and semantic analysis.

[0045] S3: Based on the local hazard rule base, perform preliminary risk matching on semantic text fragments to generate the first hazard result; Among them, reference Figure 3 As shown, based on the local hazard rule base, preliminary risk matching is performed on semantic text fragments to generate the first hazard result, including: S31: Perform feature vectorization on semantic text fragments to obtain semantic feature vectors; S32: Construct a rule index system based on the local hidden danger rule base; this rule index system includes one or more combinations of clause rule index, keyword rule index and threshold constraint index; S33: Perform matching calculations based on semantic feature vectors and rule indexing system to generate matching results; the matching calculations include semantic similarity matching, keyword hit matching, and threshold constraint verification. S34: Generate preliminary risk assessment information based on the matching results, and mark the risk type and locate the hazard to obtain the first hazard result.

[0046] In this embodiment, semantic text fragments are processed using feature vectorization, converting the text content into structured semantic feature vectors. This feature vectorization process is based on a text semantic representation model, which encodes keywords, entity information, and contextual semantic relationships in the semantic text fragments, mapping them to a computable high-dimensional semantic representation, thereby realizing the transformation of text from discrete symbols to a continuous semantic space.

[0047] A rule indexing system is constructed based on a local hazard rule base. This system includes one or more combinations of clause rule indexes, keyword rule indexes, and threshold constraint indexes. The clause rule index describes the structure and compliance requirements of specific clauses; the keyword rule index stores high-risk trigger words and sensitive expressions; and the threshold constraint index defines numerical or proportional risk boundary conditions, thus forming a multi-dimensional rule retrieval structure.

[0048] Matching calculations are performed based on a semantic feature vector and rule indexing system. These calculations include semantic similarity matching, keyword matching, and threshold constraint verification. Semantic similarity matching determines the closeness between the semantic text fragment and the rule's semantic description; keyword matching identifies explicit risk trigger words; and threshold constraint verification detects whether preset numerical or proportional limits are violated. The matching results are generated through a multi-mechanism joint calculation.

[0049] Specifically, the matching calculation process first performs multidimensional matching analysis based on the correlation between semantic feature vectors and clause rule indexes, keyword rule indexes, and threshold constraint indexes. For the semantic similarity matching part, the semantic similarity between the vector expression of the semantic text fragment and the clause description vector in the rule base is calculated to achieve implicit semantic risk association identification. This is used to discover potential risk rule hits that have different expressions but consistent semantic orientations, thereby improving the ability to identify implicit compliance risks.

[0050] During keyword matching, key entities, sensitive words, and high-risk trigger expressions in the semantic text fragments are parsed and compared item by item with the keyword rule index in the local hazard rule base. When a direct match or a synonym extension match occurs, a corresponding match marker is generated. Simultaneously, during threshold constraint verification, structured information such as proportional relationships, monetary limits, liability caps, and performance conditions in the text is parsed and its consistency is verified with the threshold constraint index to identify whether there are risks exceeding preset compliance boundaries. The above three types of matching results are then combined to form a unified matching output for subsequent risk assessment.

[0051] Finally, preliminary risk assessment information is generated based on the matching results. Risk types are classified and labeled, and the location of risk occurrence is accurately located, forming structured risk identification information. On this basis, different risk levels are associated and mapped with the source of rules to obtain the first hidden danger result containing risk type, risk location, and initial risk level, providing basic input for subsequent in-depth hidden danger identification.

[0052] Specifically, this embodiment utilizes a locally pre-deployed dedicated risk knowledge base, relying on an offline operating architecture, to provide real-time risk feedback throughout the entire process of long text editing and generation, without relying on external networks or cloud computing power. This risk knowledge base integrates high-frequency risk types in contract and professional text scenarios, accurately identifying two core risk categories: one is basic format and data errors, covering format verification and accuracy checks of key information such as mobile phone numbers, full company names, communication addresses, ID card numbers, and standard contract names, as well as explicit issues such as missing blank amounts, inconsistent conversion between uppercase and lowercase amounts, and incorrect numerical ratios; the other is context-related risks, verifying consistency and matching for core information such as contract performance methods, transaction addresses, and the parties involved in rights and obligations, avoiding hidden vulnerabilities such as inconsistencies and information gaps. This step, as a pre-screening checkpoint for the entire risk process, can quickly filter out most basic risks, significantly improving the accuracy and efficiency of subsequent AI deep recognition.

[0053] Specifically, a local vulnerability database is used for management. MySQL, Redis, and the MyBatis framework are used to achieve persistent storage and efficient read / write of rule data. External unstructured rule files are transformed into a standardized, parseable, executable, and callable format for storage, forming the multi-dimensional rule base for this contract. For example, see the following: Terms and Conditions Rules Library: Configure rules for required clause numbers, prohibited clause content, mandatory prompts, etc. Numerical threshold library: presets key numerical standards such as 10% warranty deposit and 20% penalty for breach of contract; Semantic keyword library: Includes null value validation for setting effective conditions, synonym expressions for certain clauses, etc. Historical review database: contract number, review results, risk records.

[0054] S4: Based on the offline AI semantic analysis model, perform deep hazard identification on the first hazard result and generate the second hazard result; Specifically, based on an offline AI semantic analysis model, deep hazard identification is performed on the first hazard result to generate a second hazard result, including: S41: Perform structured analysis on the results of the first hidden danger, and extract the semantic fragments to be reviewed and the initial risk markers; S42: Construct a model input representation based on the semantic fragments to be reviewed and the initial risk labels, and generate semantic feature vectors; S43: Input the semantic feature vector into the offline AI semantic analysis model for inference calculation to obtain the hazard identification result; S44: Based on the hazard identification results, perform risk verification and compliance mapping processing to generate a second hazard result.

[0055] In this embodiment, the first hazard result undergoes structured parsing processing, converting it from an unstructured or semi-structured output format into standardized hazard description data. This process extracts key information such as the semantic fragment identifier to be reviewed, initial risk markers, risk type labels, and risk location indexes, thereby forming a structured analysis unit that can be used as model input. This processing ensures that preliminary risk information from different sources has a unified expression format, facilitating subsequent deep semantic modeling.

[0056] The model input representation is constructed based on the semantic fragments to be reviewed and the initial risk labels. The semantic fragment content and risk label information are jointly encoded to generate a semantic feature vector. This process integrates textual semantic information with prior risk information, so that the model input not only includes textual content features, but also rule-hitting hints and risk guidance information, thereby enhancing the model's ability to focus on and identify potential hazard areas.

[0057] The semantic feature vector is input into the offline AI semantic analysis model for inference calculation. The offline AI semantic analysis model runs on a local deployment basis. Through semantic understanding and contextual association analysis, it performs in-depth hazard identification on the semantic fragments to be reviewed and outputs hazard identification results. These results include at least hazard type determination, risk level assessment and semantic interpretation information, thereby realizing the re-verification and extended identification of the initial screening risks.

[0058] Specifically, the construction process of the offline AI semantic analysis model includes: First, constructing training data based on multi-source domain corpora, which includes at least contract texts, agreement texts, legal and regulatory clauses, and business specification texts. The corpora are then semantically sliced, entity-labeled, risk-labeled, and context-related labeled to form a structured training sample dataset. Next, the model training input is constructed based on the training sample dataset, jointly encoding textual semantic information and risk-labeling information, enabling the model to simultaneously learn semantic expression features and potential risk association features. Further, a deep neural network structure is used for offline training of the jointly encoded data, enabling the model to perform risk identification and contextual reasoning on semantic text fragments. Compliance constraint rules are introduced to optimize the training process, improving the model's adaptability to legal and business compliance scenarios. Finally, the model's generalization ability is evaluated and parameters are optimized using a validation set, and the model parameters are solidified in a localized deployment environment, resulting in an offline AI semantic analysis model that can run independently without an external network.

[0059] Finally, risk verification and compliance mapping are performed based on the hazard identification results. The model output results are aligned and verified with the local compliance knowledge system, the risk types are standardized and mapped, and the risk levels are corrected and supplemented with annotations to generate a second hazard result. This result is semantically reasonable and consistent with compliance rules, providing a high-confidence result input for subsequent hazard fusion processing.

[0060] Specifically, the semantic feature vector is input into an offline AI semantic analysis model for inference calculation to obtain the hazard identification results, including: S431: Perform context-enhanced encoding on the semantic feature vector to construct a fused semantic representation; S432: Perform attention weight allocation based on fused semantic representation to extract key risk semantic features; S433: Based on key risk semantic features, multi-layer reasoning is performed through an offline semantic analysis network to generate risk types and risk intensity; S434: Decode the risk based on the risk type and risk intensity to generate hazard identification results.

[0061] In this embodiment, the semantic feature vector is subjected to context-enhanced encoding, which integrates the local semantic information of the semantic text fragment with its preceding and following contextual information, syntactic dependency information, and initial risk labeling information to construct a fused semantic representation. This representation simultaneously possesses semantic expression capabilities and risk guidance information expression capabilities, providing a unified input representation for subsequent offline reasoning.

[0062] Based on the fusion semantic representation, attention weight allocation processing is performed, and combined with the encoding structure of the offline AI semantic analysis model, the importance of different semantic positions and different feature dimensions is dynamically modeled, so that the model automatically focuses on high-risk semantic regions and key triggering nodes, thereby extracting key risk semantic features and enhancing the sensitivity and discrimination ability of hidden danger related information.

[0063] Key risk semantic features are input into an offline AI semantic analysis model for multi-layer inference calculation. The offline AI semantic analysis model runs on a local deployment basis. It analyzes the deep semantic relationships of the text step by step through a multi-layer semantic transformation structure and outputs the corresponding risk type and risk intensity information, thereby achieving in-depth identification and graded judgment of complex hidden danger patterns.

[0064] Finally, based on the risk type and risk intensity, the output of the offline AI semantic analysis model is decoded and mapped into a standardized form of hazard expression to generate hazard identification results. These hazard identification results include risk type identifiers, risk level information, and semantic location information, thus providing a structured output basis for subsequent hazard fusion and compliance processing.

[0065] S5: Merge the results of the first and second hidden dangers to generate the hidden danger handling results; In this embodiment, the first and second hazard results are first processed to unify the format. The hazard markers generated based on rule matching and the hazard information output based on semantic analysis model are converted into a unified standard hazard expression form. This standard hazard expression form includes at least semantic fragment identifiers, risk type identifiers, risk location indexes, and initial risk level values, thereby achieving a unified representation of hazard information from different sources.

[0066] After completing the unified representation, using semantic text fragments as the alignment benchmark, the results of the first and second hidden dangers are mapped and matched segment by segment to form a correspondence between the two sources of hidden dangers. When the two types of hidden dangers are consistent in risk location or risk type, they are identified as consistent hidden dangers, and their risk levels are enhanced. When the two types of hidden dangers are inconsistent or conflicting, they enter the conflict determination process to determine the final risk attribution.

[0067] In the conflict determination process, multi-dimensional factors are comprehensively calculated based on preset fusion rules. These factors include rule hit strength, semantic analysis confidence, and contextual semantic consistency. A comprehensive risk score is generated through weighted calculation. The hazard results are then uniformly adjudicated based on the comprehensive risk score, thereby generating a fused hazard handling result and achieving complementary fusion of rule matching and semantic recognition results.

[0068] S6: Output text optimization results based on the hazard handling results.

[0069] In this embodiment, the fused hazard processing results are first subjected to structured parsing. Hazard index relationships are constructed based on semantic text fragments. Each hazard is bound to its corresponding position in the original text to form a hazard location link. This hazard location link includes at least the hazard identifier, text position, risk type, and risk level information.

[0070] Based on this, corresponding text correction strategies are invoked according to different types of potential risks to address them in a targeted manner. These strategies include compliance expression replacement, semantic ambiguity resolution, and responsibility balancing adjustment. For risks of different risk levels, correction processes are executed sequentially according to a preset priority order, thereby generating corresponding correction suggestions.

[0071] Furthermore, semantic-level reconstruction processing is performed on semantic text fragments with potential risks. While maintaining the original semantic intent, the risk expressions are replaced, supplemented, or rewritten to conform to preset compliance expression specifications, and text optimization results are generated. At the same time, the correspondence between the original text and the optimized text is preserved for modification tracing and comparative analysis. This achieves a closed-loop processing process from risk identification to text optimization output.

[0072] Specifically, based on the risk identification results and the offline operating architecture, the system performs real-time verification and dynamic updates of the risk identification results in conjunction with the risk level. It supports viewing risk details, corresponding original text snippets, and matching rule basis on the front-end page. The system encapsulates review rules as independent verification services and executes them in a chained manner in a fixed order, supporting single rule start / stop and expansion. This operation uses unified exception handling to ensure that errors in a single rule do not affect the overall review process.

[0073] Please see Figure 4 This application also provides a text vulnerability processing system based on AI offline applications, the system comprising: The acquisition module is used to acquire the text information to be processed and generate the target text based on a preset compliance template; The semantic processing module is used to perform semantic parsing and structured decomposition on the target text to obtain semantic text fragments; The preliminary risk matching module is used to perform preliminary risk matching on semantic text fragments based on the local hazard rule base and generate the first hazard result. The deep hazard identification module is used to perform deep hazard identification on the first hazard result based on the offline AI semantic analysis model, and generate the second hazard result. The fusion processing module is used to fuse the results of the first hidden danger and the results of the second hidden danger to generate the hidden danger processing result; The output module is used to output text optimization results based on the hazard handling results.

[0074] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0075] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0076] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0077] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0078] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0079] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0080] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0081] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0082] This application provides a text-based hidden danger processing method and system based on AI offline applications. This solution standardizes the input text by generating target text based on a preset compliance template, thereby improving the accuracy and consistency of subsequent semantic analysis. By performing semantic parsing and structured decomposition on the target text, the text is broken down into semantic text fragments, transforming risk identification from overall text processing to fine-grained semantic unit processing, thus enhancing the precision and localization capability of hidden danger identification. Furthermore, by introducing a local hidden danger rule base for preliminary risk matching of semantic text fragments, the availability of the offline environment is ensured while enabling rapid screening and filtering of obvious risk points, improving processing efficiency and reducing computational load. Simultaneously, deep semantic recognition is performed on the preliminary hidden danger results based on an offline AI semantic analysis model, supplementing the detection of implicit risks that are difficult to cover by the rule base, thereby significantly improving the comprehensiveness and robustness of hidden danger identification. Furthermore, by fusing the results of the first and second potential hazards, the system achieves complementarity and verification between rule-driven and semantic understanding-driven results, thereby improving the reliability and accuracy of risk assessment. Finally, based on the fused hazard processing results, the system outputs optimized text results, enabling the system to automatically identify and optimize text hazards in an offline environment, thus improving the efficiency of text compliance processing and its practical engineering value.

[0083] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0084] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0085] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0086] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0087] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for handling textual vulnerabilities based on AI offline applications, characterized in that, The method includes the following steps: Obtain the text information to be processed and generate the target text based on the preset compliance template; The target text is semantically parsed and structurally decomposed to obtain semantic text fragments; Based on the local hazard rule base, a preliminary risk matching is performed on the semantic text fragment to generate the first hazard result; Based on an offline AI semantic analysis model, a deep hazard identification is performed on the first hazard result to generate a second hazard result; The first hazard result and the second hazard result are merged to generate a hazard handling result; The text optimization results are output based on the results of the hazard handling.

2. The method according to claim 1, characterized in that, The text information to be processed includes one or more combinations of contract text information, agreement text information, legal and regulatory clause text information, business specification document information, unstructured or semi-structured text information containing sensitive information, and historically stored text information.

3. The method according to claim 1, characterized in that, The step of acquiring the text information to be processed and generating the target text based on a preset compliance template includes: Obtain and process text information; Based on the parsing of the processed text information, the target business type and corresponding compliance constraints are obtained; Match a preset compliance template from the local compliance template library based on the target business type; The target text is generated based on the preset compliance template and the compliance constraints.

4. The method according to claim 1, characterized in that, The semantic parsing and structured decomposition of the target text to obtain semantic text fragments includes: The target text is normalized by unifying the encoding format and performing punctuation standardization and redundant character cleanup to obtain standardized text; Based on syntactic analysis, the standardized text is segmented into sentences at the sentence level to identify semantic boundaries and obtain semantically complete sentences. Based on preset structural rules, the semantically complete statement is split into clause-level segments to generate candidate semantic fragments; The candidate semantic segments are subjected to semantic verification and merging processing to obtain semantic text segments.

5. The method according to claim 4, characterized in that, The standardized text is segmented at the sentence level based on syntactic analysis to identify semantic boundaries and obtain semantically complete sentences, including: The standardized text is segmented and part-of-speech tagged to obtain a basic word sequence; Based on the aforementioned basic word sequence, a syntactic dependency relation structure is constructed using dependency parsing. Based on the syntactic dependency relation structure, the subject-verb-object and modification relation boundaries are extracted to determine the semantic segmentation points; Based on the semantic segmentation points, perform statement-level segmentation to obtain the basic statements; Based on semantic integrity constraints, the basic statement is boundary-corrected to obtain a semantically complete statement.

6. The method according to claim 1, characterized in that, The preliminary risk matching of the semantic text fragment based on the local hazard rule base to generate the first hazard result includes: The semantic text fragment is represented by feature vectorization to obtain a semantic feature vector; A rule indexing system is built based on a local hazard rule base; Based on the semantic feature vector and the rule index system, a matching calculation is performed to generate a matching result; the matching calculation includes semantic similarity matching, keyword hit matching, and threshold constraint verification. Based on the matching results, preliminary risk assessment information is generated, and risk type is marked and hazard location is determined to obtain the first hazard result.

7. The method according to claim 6, characterized in that, The rule indexing system includes one or more combinations of clause rule index, keyword rule index, and threshold constraint index.

8. The method according to claim 1, characterized in that, The process of performing deep hazard identification on the first hazard result based on an offline AI semantic analysis model to generate a second hazard result includes: The first potential hazard result is subjected to structured analysis to extract semantic fragments to be reviewed and initial risk markers; Based on the semantic fragment to be reviewed and the initial risk label, a model input representation is constructed, and a semantic feature vector is generated; The semantic feature vector is input into an offline AI semantic analysis model for inference calculation to obtain the hazard identification result; Based on the identified hazard results, risk verification and compliance mapping are performed to generate a second hazard result.

9. The method according to claim 8, characterized in that, The step of inputting the semantic feature vector into an offline AI semantic analysis model for inference calculation to obtain the hazard identification result includes: The semantic feature vectors are then subjected to context-enhanced encoding to construct a fused semantic representation; Based on the fused semantic representation, attention weights are assigned to extract key risk semantic features; Based on the key risk semantic features, multi-layer reasoning is performed through an offline semantic analysis network to generate risk types and risk intensity. Based on the risk type and risk intensity, decoding processing is performed to generate hazard identification results.

10. A text vulnerability processing system based on AI offline applications, characterized in that, The system includes: The acquisition module is used to acquire the text information to be processed and generate the target text based on a preset compliance template; The semantic processing module is used to perform semantic parsing and structured decomposition on the target text to obtain semantic text fragments; The preliminary risk matching module is used to perform preliminary risk matching on the semantic text fragments based on the local hidden danger rule base and generate the first hidden danger result; The deep hazard identification module is used to perform deep hazard identification on the first hazard result based on an offline AI semantic analysis model, and generate a second hazard result. The fusion processing module is used to fuse the first hidden danger result and the second hidden danger result to generate a hidden danger processing result; The output module is used to output text optimization results based on the hazard handling results.