Semantic perception-based black box large model sensitive word positioning method and system

By extracting features from document sets and using multi-granularity detection, a dynamic sensitive word library is constructed, which solves the problem of misjudgment in sensitive word identification and location in existing technologies, and achieves efficient and accurate sensitive word location and processing.

CN121502533AActive Publication Date: 2026-02-10QINGTA TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202610031337.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-02-10
Estimated Expiration
2046-01-12

AI Technical Summary

Technical Problem

Existing technologies, which filter through fixed sensitive word libraries, cannot effectively identify and process context-sensitive content, leading to misjudgments and rejections. Traditional methods cannot accurately locate specific sensitive words.

Method used

By acquiring document set features, performing lightweight feature enrichment analysis, multi-granularity parallel detection, and constructing a dynamic sensitive word library, sensitive words can be accurately identified and located.

Benefits of technology

It achieves accurate identification and location of context-sensitive content, reduces resource consumption, improves location efficiency and accuracy, and adapts to large-scale document processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121502533A_ABST
    Figure CN121502533A_ABST
Patent Text Reader

Abstract

The invention provides a black box large model sensitive word positioning method and system based on semantic perception, and relates to the technical field of text processing, and the method comprises the following steps: obtaining an original document set; performing feature extraction on the original document set to obtain lightweight features; performing response state judgment on the original document set through a large language model, and when the response state is refusal or violation, determining that the original document set is a refusal document set; when the response state is normal, determining that the original document set is a compliance document set; the enrichment degree scores of the lightweight features in the rejected document set are calculated, and the lightweight features with the enrichment degree scores higher than a preset score are marked as high-risk features; mapping the high-risk features to a rejected document set, and calculating an initial popularity value of the rejected document set; marking paragraphs with initial popularity values exceeding a preset popularity value in the rejected document set as hot areas; and performing multi-granularity parallel detection operation on the hot area to obtain a core trigger word and a sensitive type grade, and completing sensitive word positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text processing technology, and in particular to a method and system for locating sensitive words based on a semantically aware black-box large model. Background Technology

[0002] With the rapid development of Large Language Models (LLM), more and more industries are relying on these powerful artificial intelligence models to automate text analysis, generation, and interaction. In the field of information processing, the application of LLM is becoming increasingly widespread. Many enterprises and organizations deploy LLM to achieve functions such as document review, automated report generation, and natural language interaction. However, with increasing societal and legal requirements for information security, documents in many fields inevitably contain sensitive words or information. This information often triggers the LLM's rejection mechanism or is judged as illegal content, causing the model to fail to generate responses correctly.

[0003] In practical applications, much sensitive information does not necessarily mean illegality or non-compliance, but rather that the model cannot distinguish specific contexts. Therefore, ensuring that LLMs can successfully execute tasks in these application scenarios while avoiding triggering unnecessary rejections has become an urgent problem to be solved.

[0004] However, most current technologies rely on fixed sensitive word lists for filtering, failing to effectively identify and process context-sensitive content, often leading to false positives and rejections. Furthermore, methods that rely on testing each part of a document individually or using techniques like sliding windows or binary search to infer sensitive words may not accurately pinpoint specific sensitive content. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a semantically aware black-box large-scale model sensitive word localization method, which can solve the problem that the existing technology uses a fixed sensitive word library for filtering, which fails to effectively identify and process context-sensitive content, often leading to misjudgments and rejections. Furthermore, methods that rely on testing each part of a document or using techniques such as sliding windowing or binary search to infer sensitive words may not accurately locate specific sensitive content.

[0006] In a first aspect, this invention proposes a method for locating sensitive words using a semantically aware black-box large-scale model, comprising: S1: Get the original document set.

[0007] S2: Extract features from the original document set to obtain lightweight features.

[0008] S3: Using a large language model, determine the response status of the original document set. If the response status is "rejected" or "violation," determine that the original document set is a rejected document set and proceed to step S4. If the response status is "normal," determine that the original document set is a compliant document set and proceed to step S1.

[0009] S4: Calculate the enrichment score of lightweight features in the rejected document set, and mark lightweight features with enrichment scores higher than the preset score as high-risk features.

[0010] S5: Map high-risk features to the set of rejected documents and calculate the initial heat value of the set of rejected documents.

[0011] S6: Mark paragraphs in the rejected document set whose initial popularity value exceeds the preset popularity value as hot zones.

[0012] S7: Perform multi-granularity parallel detection operations on the hot zone to obtain core trigger words and sensitivity classification, and complete the sensitive word location.

[0013] In a second aspect of this invention, a semantically aware black-box large-scale model sensitive word localization system is proposed, comprising: a processor and a memory.

[0014] The memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, it implements the steps of the semantically aware black-box large model sensitive word localization method as described in the first aspect.

[0015] A third aspect of the present invention proposes a readable storage medium on which a program or instruction is stored, wherein when the program or instruction is executed by a processor, the steps of the semantically aware black-box large model sensitive word localization method of the first aspect are implemented.

[0016] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this embodiment of the invention, a dynamic sensitive word database is constructed through sensitive word localization, which can effectively identify and process context-sensitive content. Simultaneously, multi-granularity parallel probing and multi-granularity analysis enable rapid and accurate localization of specific sensitive content. Attached Figure Description

[0017] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0018] Figure 1This is a flowchart illustrating a semantically aware black-box large-scale model sensitive word localization method provided in an embodiment of the present invention.

[0019] Figure 2 This is a schematic diagram of the structure of a semantically aware black-box large-scale sensitive word localization system provided in an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions 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, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] The following detailed description, in conjunction with the accompanying drawings, of the semantically aware black-box large-model sensitive word localization method provided by the present invention through specific embodiments and application scenarios, will be presented in detail.

[0022] Reference manual attached Figure 1 The diagram illustrates a flowchart of a semantically aware black-box large-scale model sensitive word localization method provided by an embodiment of the present invention.

[0023] This invention provides a method for sensitive word localization based on a semantically aware black-box large model, which may include the following steps: S1: Get the original document set.

[0024] S2: Extract features from the original document set to obtain lightweight features.

[0025] In one possible implementation, S2 specifically includes sub-steps S201 and S202: S201: Index the original document set hierarchically by chapter, paragraph, and clause to obtain multiple hierarchical units.

[0026] Specifically, for each original document, only a few representative paragraphs (such as the first paragraph, middle paragraph, and last paragraph, or sampled according to TF-IDF) are sent to the model, and rejections / acceptances are recorded.

[0027] It should be noted that by indexing the original document set according to the hierarchy of chapters, paragraphs, and clauses, the scattered text is transformed into structured hierarchical units. This provides a clear localization foundation for subsequent accurate extraction of lightweight features and rapid screening of sensitive hotspots at different levels, while also preserving the semantic integrity of different granularities. This avoids the truncation or missed detection of sensitive entities due to the chaotic text structure in subsequent detection, significantly improving the orderliness and accuracy of the overall sensitive word localization.

[0028] S202: Extract lightweight features for each hierarchical unit.

[0029] It should be noted that lightweight features are extracted from each hierarchical unit after the hierarchical index. This captures the core text information at different granularities (chapter, paragraph, clause) with low computational cost, and provides accurate and comprehensive basic data for subsequent enrichment score calculation and high-risk feature screening. This avoids the omission of sensitive information due to missing features, and is also suitable for large-scale document processing scenarios, balancing efficiency and effectiveness.

[0030] In this embodiment of the invention, by first constructing a multi-granularity structured framework of chapters, paragraphs, and clauses, and then selectively extracting lightweight features at each level, the semantic relationships of different granularities of the text are fully preserved, and core information is captured comprehensively with low computational cost. This provides accurate and large-scale data support for subsequent enrichment analysis and high-risk feature screening, achieving a balance between efficiency and accuracy.

[0031] S3: Using a large language model, determine the response status of the original document set. If the response status is "rejected" or "violation," determine that the original document set is a rejected document set and proceed to step S4. If the response status is "normal," determine that the original document set is a compliant document set and proceed to step S1.

[0032] Among them, the Large Language Model (LLM) refers to a large-scale pre-trained language model trained on massive text data, which has powerful natural language understanding, generation and reasoning capabilities. In this method, it is deployed in a black box form and is used for document response status determination, sensitive segment detection feedback and response verification after perturbation copy or synonym replacement. It is the core benchmark model for sensitive word localization.

[0033] In this embodiment of the invention, the response status of the original document set is directly determined by a black-box large model, and the document sets are accurately divided into two categories: rejected and compliant. This provides clear comparison samples for subsequent feature enrichment analysis, and can quickly filter compliant documents to avoid invalid processing, significantly reducing the resource consumption of large-scale document processing and improving the targeting and efficiency of the process.

[0034] S4: Calculate the enrichment score of lightweight features in the rejected document set, and mark lightweight features with enrichment scores higher than the preset score as high-risk features.

[0035] The formula for the enrichment score is as follows:

[0036] in, f Indicates lightweight features f , Score ( f ) indicates lightweight features f The enrichment score in the set of rejected documents. PMI Represents point mutual information, Refused This indicates a rejection of the document set. Accepted This represents a set of compliant documents. Features with significantly high scores (such as specific phrase combinations or topic keywords) are marked as high-risk features.

[0037] It should be noted that those skilled in the art can set preset scores for judgment according to actual needs, and this invention does not limit such settings.

[0038] In this embodiment of the invention, high-risk features are accurately marked by quantifying the enrichment of lightweight features in the set of rejected documents. This not only eliminates the dependence on fixed sensitive word libraries but also focuses on core sensitive related information, significantly reducing the invalid range of subsequent detections, providing precise targeting for hotspot localization, and significantly improving the targeting and screening efficiency of the overall process.

[0039] S5: Map high-risk features to the set of rejected documents and calculate the initial heat value of the set of rejected documents.

[0040] In this embodiment of the invention, high-risk features are accurately mapped to the set of rejected documents and the initial popularity value is quantified. This not only enables the visualization and classification of sensitive risks, but also allows for the rapid filtering of low-risk segments. This provides a clear target for subsequent refined detection, avoids blind scanning, and significantly improves the accuracy and efficiency of sensitive location.

[0041] S6: Mark paragraphs in the rejected document set whose initial popularity value exceeds the preset popularity value as hot zones.

[0042] Specifically, a hybrid strategy of perturbation stability or binary and local sliding window is used in the hot zone until the paragraph or clause level is reached.

[0043] It should be noted that those skilled in the art can set preset heat values ​​according to actual needs, and this invention does not limit such settings.

[0044] In this embodiment of the invention, by filtering and marking hot zones with a preset heat threshold, high-risk paragraphs in the rejected document set are accurately locked, which greatly reduces the scope of subsequent refined detection and avoids blind processing of risk-free areas. This not only reduces resource consumption but also allows detection resources to focus on core targets, significantly improving the targeting of sensitive word location and the overall process efficiency.

[0045] S7: Perform multi-granularity parallel detection operations on the hot zone to obtain core trigger words and sensitivity classification, and complete the sensitive word location.

[0046] In one possible implementation, S7 specifically includes sub-steps S701 to S706: S701: Performs multi-granularity parallel segmentation on hot regions. Specifically, multi-granularity parallel segmentation includes: natural paragraph segmentation, sentence boundary segmentation, and fixed token window segmentation.

[0047] It should be noted that by using multi-granularity parallel segmentation of natural paragraphs, sentence boundaries, and fixed token windows, full coverage of text fragments in different dimensions can be achieved. This avoids the truncation and missed detection of sensitive entities caused by single-granularity segmentation, and can capture deep sensitive associations through multi-view complementarity, providing rich and comprehensive basic samples for subsequent accurate sampling and positioning, thus balancing the integrity and effectiveness of the detection.

[0048] S702: Predicts the rejection probability of the segmented hot zone using a lightweight proxy model, and obtains the smallest fine-grained segment through an uncertainty sampling strategy.

[0049] The lightweight proxy model refers to a locally deployed binary classifier with a simple structure and low computational cost. Its core function is to quickly predict the probability of each text segment triggering LLM rejection after hot zone segmentation, providing a basis for uncertainty sampling, avoiding blindly calling the real LLM, and reducing detection costs.

[0050] Furthermore, a paragraph-level rejection predictor is trained using a lightweight proxy model.

[0051] Specifically, the formula for calculating the smallest fine-grained segment is:

[0052] in, x * represents the smallest fine-grained segment, and argmax represents the mathematical operator, taking the independent variable that maximizes the value of the subsequent function. x This represents the segmented hot zone. V 1 indicates the semantic layer, i.e., natural paragraph segmentation. V 2 indicates the syntactic level, i.e., sentence boundary segmentation. V 3 indicates a sliding window layer, i.e., a fixed token window segmentation. Pproxy ( x () indicates that the lightweight surrogate model predicts hotspots. x The probability of triggering a rejection in a large language model. u It indicates uncertainty.

[0053] It should be noted that by using a lightweight proxy model to quickly predict the probability of rejection, and combining it with an uncertainty sampling strategy to prioritize high-entropy segments, we can avoid blindly traversing all segmentation units, significantly reduce the cost of calling the real LLM, and accurately lock the smallest fine-grained sensitive segments. This lays a precise foundation for subsequent causal perturbation to locate core trigger words, balancing detection efficiency and targeting.

[0054] S703: Randomly replace words at different positions in the smallest fine-grained segment with neutral placeholders or general words to generate multiple random perturbation copies.

[0055] It should be noted that by generating multiple random perturbation copies through non-destructive replacement, the original syntactic structure and context of the smallest fine-grained fragments are fully preserved, while comprehensively covering perturbation scenarios at different word positions. This provides sufficient and interference-free comparison samples for subsequent differential testing, effectively avoiding the shortcomings of traditional dichotomy methods that destroy context, and ensuring the accuracy and reliability of core trigger word location.

[0056] S704: Input each random perturbation copy into the large language model, and obtain the core trigger words through statistical test analysis.

[0057] Specifically, the replica set is input into the large language model in batches, and statistical tests (such as Fisher's exact test) are used to analyze which position the LLM state significantly flips from "refusal" to "acceptance" after the word is replaced. The word at that position is the core trigger word.

[0058] It should be noted that by inputting random perturbation copies into the large language model and combining statistical tests to analyze the differences in response states, objective data comparison is used to replace subjective judgment. This not only accurately locates the core trigger words that cause the model response to reverse, but also uses statistical methods to ensure the reliability and significance of the results, avoiding misjudgments caused by single sample perturbations, and providing a solid basis for subsequent sensitive type classification.

[0059] S705: Generates synonyms corresponding to core trigger words through a controlled generator.

[0060] It should be noted that generating semantically equivalent synonyms of core trigger words through a controlled generator ensures that the core meaning of the replaced text is consistent with that of the original sentence, while also providing accurate comparison samples for sensitive type determination. This avoids interference with the model's response feedback due to differences in expression, and covers multi-dimensional synonym expression scenarios, providing reliable support for distinguishing between expression-sensitive and semantic-sensitive types, and ensuring the accuracy of sensitive type classification.

[0061] S706: Replace the core trigger word with a synonym, and input the replaced random perturbation copy into the large language model to obtain the sensitivity classification and complete the sensitive word location.

[0062] Specifically, the sensitivity classification includes: expression sensitivity and semantic sensitivity.

[0063] It should be noted that by replacing the core trigger words with synonyms and inputting them into a large language model, the expression-sensitive and semantic-sensitive types can be accurately distinguished through semantic equivalence comparison. This not only completes the closed loop of sensitive word location but also provides a clear basis for subsequent differentiated desensitization strategies, avoiding over-desensitization or incomplete desensitization caused by a "one-size-fits-all" approach, while ensuring the core semantic integrity of the desensitized text.

[0064] In this embodiment of the invention, a dynamic sensitive word database is constructed based on core trigger words and sensitivity classification. This not only breaks the rigidity of traditional fixed word databases and supports dynamic iteration and updates with new sensitive scenarios, but also provides accurate basis for differentiated desensitization by associating trigger words with sensitivity types. At the same time, the accumulated effective data can be reused and optimized, significantly improving the adaptability and efficiency of subsequent document sensitive word location and desensitization.

[0065] In one possible implementation, after S7, the following is also included: When the sensitivity level is classified as expression-sensitive, a vocabulary list is created to replace sensitive words. When the sensitivity level is classified as semantic-sensitive, the document will be rejected and rewritten using abstraction.

[0066] S8: Construct a dynamic sensitive word database based on core trigger words and sensitivity classification.

[0067] The specific formula for the dynamic sensitive word database table is as follows:

[0068] in, Table This represents the sensitive word database table, and Trigger represents the core trigger word. Context_Hash Represents the context hash value. Sensitivity_Type Indicates the sensitivity level. Safe_Replacement This indicates a security replacement plan corresponding to the sensitivity level.

[0069] In this embodiment of the invention, a dynamic sensitive word database is constructed based on core trigger words and sensitivity classification. This not only breaks the rigidity of traditional fixed word databases and supports dynamic iteration and updates with new sensitive scenarios, but also provides accurate basis for differentiated desensitization by associating trigger words with sensitivity types. At the same time, the accumulated effective data can be reused and optimized, significantly improving the adaptability and efficiency of subsequent document sensitive word location and desensitization.

[0070] S9: Combine the dynamic sensitive word database and the original document set to obtain the de-sensitized secure document.

[0071] Furthermore, in the subsequent inference stage, the input text is automatically preprocessed based on a dynamic sensitive word database. For words expressing sensitivity, they are directly replaced with safe replacements verified during the detection stage. For semantically sensitive paragraphs, a local model is invoked for summarization or fuzzy rewriting.

[0072] In this embodiment of the invention, the dynamic sensitive word library is accurately matched with the original document set for desensitization. This not only leverages the dynamic iteration characteristics of the word library to adapt to new sensitive scenarios, but also implements differentiated processing by associating sensitive types, avoiding the risk of over-desensitization or omission. At the same time, it ensures that the core semantics of the document are not damaged after desensitization, thus achieving a balance between security compliance and practical value.

[0073] The semantically aware black-box large-scale model sensitive word localization method provided in this application can be executed by a semantically aware black-box large-scale model sensitive word localization device. This application embodiment uses the execution of the semantically aware black-box large-scale model sensitive word localization method by the semantically aware black-box large-scale model sensitive word localization device as an example to illustrate the semantically aware black-box large-scale model sensitive word localization device provided in this application embodiment.

[0074] Reference manual attached Figure 2 The diagram shows a schematic representation of a semantically aware black-box large-scale sensitive word localization system provided by an embodiment of the present invention.

[0075] This invention provides a semantically aware black-box large-scale sensitive word localization system 20, including: a processor 201 and a memory 202; The memory 202 stores programs or instructions that can run on the processor 201. When the program or instructions are executed by the processor 201, they implement the steps of the above-described semantically aware black-box large model sensitive word localization method and achieve the same technical effect. To avoid repetition, the present invention will not elaborate further.

[0076] It should be understood that the processor 201 in this embodiment of the invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0077] It should also be understood that the memory 202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).

[0078] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0079] It should be understood that, in various embodiments of the present invention, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0080] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0081] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0082] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0085] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0086] This invention provides a readable storage medium comprising: storing a program or instructions on the readable storage medium, wherein when the program or instructions are executed by a processor, the program or instructions implement the steps of the above-described semantically aware black-box large-model sensitive word localization method, and can achieve the same technical effect. To avoid repetition, this invention will not elaborate further.

[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A method for sensitive word localization based on a semantically aware black-box large model, characterized in that, include: S1: Obtain the original document set; S2: Perform feature extraction on the original document set to obtain lightweight features; S3: Using a large language model, determine the response status of the original document set. When the response status is rejection or violation, determine that the original document set is a rejected document set and proceed to step S4; when the response status is normal, determine that the original document set is a compliant document set and proceed to step S1. S4: Calculate the enrichment score of the lightweight feature in the rejected document set, and mark the lightweight features with enrichment scores higher than a preset score as high-risk features; S5: Map the high-risk features to the rejected document set, and calculate the initial popularity value of the rejected document set; S6: Mark the paragraphs in the rejected document set whose initial popularity value exceeds the preset popularity value as hot zones; S7: Perform multi-granularity parallel detection operations on the hot zone to obtain core trigger words and sensitivity classification, and complete the sensitive word localization.

2. The method for sensitive word localization based on semantic awareness in a black-box large model according to claim 1, characterized in that, S2 specifically includes: S201: Index the original document set hierarchically by chapter, paragraph and clause to obtain multiple hierarchical units; S202: Extract the lightweight feature for each of the hierarchical units.

3. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 1, characterized in that, The formula for the enrichment score is as follows: ; in, f Indicates lightweight features f , Score ( f ) indicates lightweight features f The enrichment score in the set of rejected documents. PMI Represents point mutual information, Refused This indicates a rejection of the document set. Accepted This indicates a set of compliance documents.

4. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 1, characterized in that, Specifically, S7 includes: S701: Perform multi-granularity parallel segmentation on the hot zone; wherein, the multi-granularity parallel segmentation specifically includes: natural paragraph segmentation, sentence boundary segmentation, and fixed token window segmentation; S702: Predicts the rejection probability of the segmented hot zone using a lightweight proxy model, and obtains the smallest fine-grained segment through an uncertainty sampling strategy; S703: Randomly replace words at different positions in the smallest fine-grained segment with neutral placeholders or general words to generate multiple random perturbation copies; S704: Input each of the random perturbation copies into the large language model, and obtain the core trigger words through statistical test analysis; S705: Generate synonyms corresponding to the core trigger words through a controlled generator; S706: Replace the core trigger word with the synonym, and input the replaced random perturbation copy into the large language model to obtain the sensitivity classification and complete the sensitive word location.

5. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 4, characterized in that, The sensitivity classification specifically includes: expression sensitivity and semantic sensitivity.

6. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 4, characterized in that, The formula for calculating the smallest fine-grained segment is: ; in, x * represents the smallest fine-grained segment, and argmax represents the mathematical operator, taking the independent variable that maximizes the value of the subsequent function. x This represents the segmented hot zone. V 1 indicates the semantic layer, i.e., natural paragraph segmentation. V 2 indicates the syntactic level, i.e., sentence boundary segmentation. V 3 indicates a sliding window layer, i.e., a fixed token window segmentation. P proxy ( x () indicates that the lightweight surrogate model predicts hotspots. x The probability of triggering a rejection in a large language model. u It indicates uncertainty.

7. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 1, characterized in that, Following S7, it also includes: S8: Construct a dynamic sensitive word database table based on the core trigger words and the sensitivity classification; S9: Combine the dynamic sensitive word database and the original document set to obtain the desensitized secure document.

8. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 7, characterized in that, The specific formula for the dynamic sensitive word database table is as follows: ; in, Table This represents the sensitive word database table, and Trigger represents the core trigger word. Context_Hash Represents the context hash value. Sensitivity_Type Indicates the sensitivity level. Safe_Replacement This indicates a security replacement plan corresponding to the sensitivity level.

9. A semantically aware black-box large-scale model sensitive word localization system, characterized in that, include: Processor and memory; The memory stores programs or instructions that can run on the processor, which, when executed by the processor, implement the steps of the semantically aware black-box large-model sensitive word localization method as described in any one of claims 1 to 8.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the semantically aware black-box large-model sensitive word localization method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Financial text summarization method based on keyword heterogeneous graph and semantic matching

    CN117725928A

  • Financial fraud detection method based on large language model

    CN120598644A

  • Water conservancy design file retrieval system and method based on local lightweight large model

    CN121071166A

  • Dynamic random language input generation method based on large model architecture and training data features

    CN121278338A

  • Anti-virus security information in an extensible markup language document

    US7509573B1