A semantic perception-based black box large model sensitive word positioning method and system
By performing feature extraction and multi-granularity detection on document sets, and utilizing a large language model and a lightweight proxy model, the problem of misjudgment in sensitive word identification and location in existing technologies is solved. A dynamic sensitive word library is constructed, enabling accurate identification and efficient location of context-sensitive content.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies cannot effectively identify and process context-sensitive content through filtering with a fixed sensitive word database, leading to misjudgments and rejections. Furthermore, traditional methods cannot accurately locate specific sensitive words.
By acquiring document sets for feature extraction, using a large language model to determine the response status, calculating the enrichment score of lightweight features, marking high-risk features, and performing multi-granularity parallel detection, combined with a lightweight proxy model and a large language model, sensitive words are accurately located.
It achieves accurate identification and location of context-sensitive content, builds a dynamic sensitive word library, supports dynamic updates for new sensitive scenarios, and improves the accuracy and efficiency of sensitive word location.
Smart Images

Figure CN121502533B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of text processing, in particular to a black box large model sensitive word positioning method and system based on semantic perception. BACKGROUND
[0002] With the rapid development of large language models (LLM), more and more industries have begun to rely on these powerful artificial intelligence models to automate text analysis, generation, and interaction. In the field of information processing, the application of LLM has gradually become popular. Many enterprises and institutions deploy LLM to realize document review, automatic report generation, and natural language interaction functions. However, with the increasing demand for information security from society and law, it is inevitable that many documents in the field contain some sensitive words or sensitive information, and these information often triggers the refusal mechanism of LLM or is judged as illegal content, resulting in the model unable to generate a normal response.
[0003] In practical applications, many sensitive information does not mean illegal or non-compliant, but because the model cannot distinguish the specific context. Therefore, how to ensure that LLM can smoothly perform tasks in these application scenarios while avoiding unnecessary refusal has become a problem to be solved.
[0004] However, most of the current technologies use fixed sensitive word libraries for filtering, which cannot effectively identify and process context-sensitive content, often leading to misjudgment and refusal. At the same time, by testing each part of the document one by one or using sliding window method, bisection method and other techniques to speculate sensitive words, this method may not be able to accurately locate the specific sensitive content. SUMMARY
[0005] In view of the above deficiencies of the prior art, the purpose of the embodiments of the present application is to provide a black box large model sensitive word positioning method based on semantic perception, which can solve the technical problems that the prior art uses fixed sensitive word libraries for filtering, which cannot effectively identify and process context-sensitive content, often leading to misjudgment and refusal. At the same time, by testing each part of the document one by one or using sliding window method, bisection method and other techniques to speculate sensitive words, this method may not be able to accurately locate the specific sensitive content.
[0006] The first aspect of the embodiments of the present application proposes a black box large model sensitive word positioning method based on semantic perception, comprising:
[0007] S1: Obtain an original document set.
[0008] S2: Perform feature extraction on the original document set to obtain lightweight features.
[0009] S3: The original document set is subjected to response state determination by the large language model, when the response state is rejection or violation, the original document set is determined as a rejected document set, and step S4 is entered. When the response state is normal, the original document set is determined as a compliant document set, and step S1 is entered.
[0010] S4: The enrichment score of the lightweight feature in the rejected document set is calculated, and the lightweight feature with an enrichment score higher than a preset score is marked as a high-risk feature.
[0011] S5: The high-risk feature is mapped to the rejected document set, and the initial hotness value of the rejected document set is calculated.
[0012] S6: In the rejected document set, the paragraph with an initial hotness value exceeding a preset hotness value is marked as a hot area.
[0013] S7: The hot area is subjected to a multi-granularity parallel detection operation to obtain a core trigger word and a sensitive type rating, and the sensitive word positioning is completed.
[0014] The second aspect of the embodiment of the application provides a black box large model sensitive word positioning system based on semantic perception, comprising a processor and a memory.
[0015] The memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the black box large model sensitive word positioning method based on semantic perception of the first aspect.
[0016] The third aspect of the embodiment of the application provides a readable storage medium, and the readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the black box large model sensitive word positioning method based on semantic perception of the first aspect.
[0017] The technical scheme provided by the embodiment of the application has at least the following beneficial effects:
[0018] In the embodiment of the application, the sensitive word positioning constructs a dynamic sensitive word library table, which can effectively identify and process context-sensitive content. At the same time, through multi-granularity parallel detection, multi-granularity analysis is performed, which can quickly and accurately locate specific sensitive content. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not considered as limiting the application. In the entire drawings, the same reference symbols represent the same components. Obviously, the accompanying drawings described below are only some embodiments described in the embodiments of the application, and other drawings can be obtained from these drawings without creative labor for those skilled in the art.
[0020] Figure 1is a flowchart of a semantic perception-based black box large model sensitive word positioning method provided by an embodiment of the present application.
[0021] Figure 2 is a structural diagram of a semantic perception-based black box large model sensitive word positioning system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions of the present application will be described clearly and completely below in conjunction with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0023] The semantic perception-based black box large model sensitive word positioning method provided by the embodiments of the present application will be described in detail below in conjunction with the drawings, specific embodiments and application scenarios.
[0024] Reference is made to the accompanying drawings, which show a flowchart of a semantic perception-based black box large model sensitive word positioning method provided by an embodiment of the present application. Figure 1 , shows a flowchart of a semantic perception-based black box large model sensitive word positioning method provided by an embodiment of the present application.
[0025] The embodiments of the present application provide a semantic perception-based black box large model sensitive word positioning method, which can include the following steps:
[0026] S1: Obtain an original document set.
[0027] S2: Perform feature extraction on the original document set to obtain lightweight features.
[0028] In one possible implementation, S2 specifically includes sub-steps S201 and S202:
[0029] S201: Hierarchically index the original document set by chapters, paragraphs and clauses to obtain a plurality of hierarchical units.
[0030] Specifically, only several representative paragraphs (such as the first paragraph, the middle paragraph, the last paragraph, or sampled according to TF-IDF) of each original document are sent to the model, and the rejection / acceptance is recorded.
[0031] It should be noted that by indexing the original document set by chapters, paragraphs, and hierarchical levels, the scattered text is formed into a structured hierarchical unit, which not only provides a clear positioning basis for subsequent hierarchical precise extraction of lightweight features and rapid screening of sensitive hot areas, but also retains the semantic integrity of different granularities, avoids the truncation or omission of sensitive entities in subsequent detection due to text structure confusion, and significantly improves the orderliness and accuracy of overall sensitive word positioning.
[0032] S202: Extract lightweight features for each hierarchical unit.
[0033] It should be noted that extracting lightweight features for each hierarchical unit after indexing provides accurate and comprehensive basic data for subsequent enrichment score calculation and high-risk feature screening, avoids missing sensitive information due to feature loss, and at the same time adapts to large-scale document processing scenarios, balancing efficiency and effectiveness.
[0034] In the embodiments of the present application, by first constructing a multi-granularity structured framework of chapters, paragraphs, and clauses, and then extracting lightweight features at each level, the semantic association of text at different granularities is completely retained, and the core information is captured at low computational cost, providing accurate and large-scale processing data support for subsequent enrichment analysis and high-risk feature screening, realizing the unity of efficiency and accuracy.
[0035] S3: Through the large language model, the response state of the original document set is determined, when the response state is rejection or violation, the original document set is determined as the rejection document set, and step S4 is entered. When the response state is normal, the original document set is determined as the compliance document set, and step S1 is entered.
[0036] The large language model (Large Language Model, LLM) refers to a large-scale pre-trained language model trained based on massive text data, which has strong natural language understanding, generation and reasoning capabilities. In this method, it is deployed in a black box form, and is used for document response state determination, sensitive fragment detection feedback, and response verification after perturbation copy or synonym replacement. It is the core benchmark model for sensitive word positioning.
[0037] In the embodiments of the present application, the response state of the original document set is directly determined by the black box large model, and the rejection and compliance document sets are accurately divided, which not only provides clear contrast samples for subsequent feature enrichment analysis, but also quickly filters compliance documents to avoid invalid processing, significantly reduces the resource consumption of large-scale document processing, and improves the targeting and efficiency of the process.
[0038] S4: Calculate the enrichment score of the lightweight feature in the rejected document set, and mark the lightweight feature with an enrichment score higher than a preset score as a high-risk feature.
[0039] The formula of the enrichment score is specifically:
[0040]
[0041] f The lightweight feature f , Score The lightweight feature f in the rejected document set has an enrichment score, f PMI The point mutual information Refused The rejected document set, Accepted The compliant document set. Features with significantly high scores (such as specific phrase combinations, topic keywords) are marked as high-risk features.
[0042] It should be noted that the skilled person in the art can set the determination preset score according to actual needs, and the present application does not limit it.
[0043] In the embodiment of the present application, the high-risk features are accurately marked by quantifying the enrichment degree of the lightweight features in the rejected document set, which not only breaks away from the dependence on fixed sensitive word library, but also focuses on core sensitive associated information, greatly reduces the invalid range of subsequent detection, provides precise targeting for hot area positioning, and significantly improves the pertinence and screening efficiency of the overall process.
[0044] S5: Map the high-risk features to the rejected document set, and calculate the initial hotness value of the rejected document set.
[0045] In the embodiment of the present application, the high-risk features are accurately mapped to the rejected document set and the initial hotness value is quantified, which not only realizes the visualization and classification of sensitive risks, but also quickly filters low-risk paragraphs, locks clear targets for subsequent fine detection, avoids blind scanning, and greatly improves the accuracy and efficiency of sensitive positioning.
[0046] S6: Mark the paragraph with an initial hotness value higher than a preset hotness value in the rejected document set as a hot area.
[0047] Specifically, the mixed strategy of micro-perturbation stability or binary and local sliding window is used in the hot area until the paragraph level or clause level is located.
[0048] It should be noted that the skilled person in the art can set the determination preset hotness value according to actual needs, and the present application does not limit it.
[0049] In the embodiment of the present application, the hot area is screened and marked by a preset heat threshold, the high-risk paragraph in the rejected document set is accurately locked, the range of subsequent refined detection is greatly reduced, blind processing of the risk-free area is avoided, resource consumption is reduced, detection resources are focused on the core target, and the targeting of sensitive word positioning and the overall process efficiency are significantly improved.
[0050] S7: performing multi-granularity parallel detection operation on the hot area to obtain core trigger words and sensitive type classification, and completing sensitive word positioning.
[0051] In one possible implementation, S7 specifically includes sub-steps S701 to S706:
[0052] S701: performing multi-granularity parallel segmentation on the hot area. The multi-granularity parallel segmentation specifically includes natural paragraph segmentation, sentence boundary segmentation, and fixed Token window segmentation.
[0053] It should be noted that the multi-granularity parallel segmentation of natural paragraph, sentence boundary, and fixed Token window realizes full coverage of text segments in different dimensions, avoids sensitive entity truncation and missed detection caused by single-granularity segmentation, and captures deep sensitive associations through multi-view complementation, thereby providing rich and comprehensive basic samples for subsequent accurate sampling and positioning, and balancing detection integrity and effectiveness.
[0054] S702: predicting the rejection probability of the segmented hot area by a lightweight proxy model, and obtaining the minimum granularity segment by an uncertainty sampling strategy.
[0055] The lightweight proxy model refers to a locally deployed binary classifier with simple structure and low computational cost, and its core function is to quickly predict the probability of each text segment of the segmented hot area triggering LLM rejection, to provide a basis for uncertainty sampling, to avoid blind calling of real LLM, and to reduce detection cost.
[0056] Further, a paragraph-level rejection predictor is trained by the lightweight proxy model.
[0057] Specifically, the calculation formula of the minimum granularity segment is:
[0058]
[0059] wherein, x * The minimum granularity segment is represented by argmax, which represents a mathematical operator that takes the independent variable that maximizes the value of the subsequent function, x The segmented hot area segment is represented by argmax, V 1 represents the semantic layer, i.e., natural paragraph segmentation, V 2 represents the syntax layer, i.e., sentence boundary segmentation, V3 represents a sliding window layer, that is, a fixed Token window segmentation, P proxy ( x ) represents a lightweight agent model to predict hot areas x trigger the rejection probability of a large language model, u represents uncertainty.
[0060] It should be noted that by quickly predicting the rejection probability through the lightweight agent model, the uncertainty sampling strategy is combined to focus on high-entropy fragments, which not only avoids blind traversal of all segmentation units and greatly reduces the calling cost of the real LLM, but also accurately locates the minimum granularity sensitive fragment, lays a precise foundation for subsequent causal perturbation positioning of core trigger words, and balances detection efficiency and targeting.
[0061] S703: Randomly replace the words at different positions in the minimum granularity fragment with neutral placeholders or general words to generate multiple random perturbation copies.
[0062] It should be noted that multiple random perturbation copies are generated by non-destructive replacement, which not only retains the original syntax structure and context of the minimum granularity fragment, but also covers different word position perturbation scenarios, providing sufficient and interference-free comparison samples for subsequent differential inspection, effectively avoiding the defects of traditional dichotomy destroying the context, and ensuring the accuracy and reliability of core trigger word positioning.
[0063] S704: Input each random perturbation copy into a large language model, and obtain the core trigger word through statistical test analysis.
[0064] Specifically, the copy set is batched into a large language model, and through statistical test (such as Fisher's exact test) analysis, which position's word is replaced after the LLM's state is significantly reversed from "refusal" to "acceptance", the word at that position is the core trigger word.
[0065] It should be noted that by inputting the random perturbation copy into the large language model and analyzing the response state difference through statistical test, objective data comparison is used instead of subjective judgment, which not only accurately locates the core trigger word that makes the model response reverse, but also uses statistical methods to guarantee the reliability and significance of the results, avoiding misjudgment caused by single sample perturbation, and providing a solid basis for subsequent sensitive type grading.
[0066] S705: Generate synonyms corresponding to the core trigger word through a controlled generator.
[0067] 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.
[0068] 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.
[0069] Specifically, the sensitivity classification includes: expression sensitivity and semantic sensitivity.
[0070] 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.
[0071] 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.
[0072] In one possible implementation, after S7, the following is also included:
[0073] 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.
[0074] S8: Construct a dynamic sensitive word database based on core trigger words and sensitivity classification.
[0075] The specific formula for the dynamic sensitive word database table is as follows:
[0076]
[0077] 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.
[0078] In the embodiment of the present application, a dynamic sensitive word library table is constructed based on core trigger words and sensitive types, which not only breaks the rigid limitations of traditional fixed word libraries and supports dynamic iterative updating with new sensitive scenarios, but also provides precise basis for differentiated desensitization through the association of trigger words and sensitive types, and the effective data deposited can be reused and optimized, significantly improving the adaptability and efficiency of subsequent document sensitive word positioning and desensitization.
[0079] S9: Obtain the safe document after desensitization by combining the dynamic sensitive word library table and the original document set.
[0080] Further, in the subsequent reasoning stage, the input text is automatically preprocessed according to the dynamic sensitive word library table. For the expression sensitive words, the safe replacement verified in the detection stage is directly replaced. For the semantic sensitive paragraph, the local model is called to perform summary or fuzzy rewriting.
[0081] In the embodiment of the present application, the dynamic sensitive word library table and the original document set are matched for desensitization, which not only adapts to new sensitive scenarios by means of the dynamic iterative characteristics of the word library, but also implements differentiated processing through the association of sensitive types, avoiding the risk of excessive desensitization or omission, while ensuring that the core semantics of the desensitized document are not damaged, realizing the unity of safety compliance and practical value.
[0082] The execution subject of the semantic perception-based black box large model sensitive word positioning method provided by the embodiment of the present application can be a semantic perception-based black box large model sensitive word positioning device. In the embodiment of the present application, the semantic perception-based black box large model sensitive word positioning method executed by the semantic perception-based black box large model sensitive word positioning device is taken as an example to illustrate the semantic perception-based black box large model sensitive word positioning device provided by the embodiment of the present application.
[0083] Referring to the accompanying drawings Figure 2 , a structure schematic diagram of a semantic perception-based black box large model sensitive word positioning system provided by an embodiment of the present application is shown.
[0084] The embodiment of the present application provides a semantic perception-based black box large model sensitive word positioning system 20, which comprises a processor 201 and a memory 202.
[0085] The memory 202 stores programs or instructions that can run on the processor 201. When the programs or instructions are executed by the processor 201, the steps of the above-mentioned semantic perception-based black box large model sensitive word positioning method are realized, and the same technical effects can be achieved. To avoid repetition, the present application will not be described again.
[0086] It is to be understood that the processor 201 in the embodiments of the present application can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0087] It is also to be understood that the memory 202 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) 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 random access memory (DRAM).
[0088] The above-described embodiments can be implemented in whole or in part by software, hardware (e.g., circuitry), firmware, or any combination of the three. When implemented in software, the above-described embodiments can be implemented in the form of one or more computer programs that are stored in a computer-readable storage medium. The computer-readable storage medium stores one or more computer instructions or computer programs that, when loaded into a computer, cause the computer to perform the processes or functions described in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, such as from a website, a computer, a server, or a data center to another website, computer, server, or data center, via a wired (e.g., infrared, wireless, microwave, etc.) or wireless transmission. The computer-readable storage medium can be any available medium or a collection of media accessible by a computer or a data storage device such as a server, data center, etc. that contains one or more available media collections. 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. The semiconductor medium can be a solid-state drive.
[0089] It should be understood that the size of the sequence number of each process described above in various embodiments of the present application does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0090] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the devices, apparatuses and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0092] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0093] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0094] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0095] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0096] The embodiment of the present application provides a readable storage medium, which includes: a program or instruction stored on the readable storage medium, the program or instruction is executed by a processor to realize the steps of the above-mentioned semantic perception-based black box large model sensitive word positioning method, and the same technical effect can be achieved. To avoid repetition, the present application will not be described again.
[0097] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, but not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present application should be covered within the protection scope of the present application.
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; 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.
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 black-box large 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.
4. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 3, characterized in that, The sensitivity classification specifically includes: expression sensitivity and semantic sensitivity.
5. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 3, 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.
6. The method for sensitive word localization based on semantic awareness in a black-box large 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.
7. The method for sensitive word localization based on semantic awareness in a large black-box model according to claim 6, 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.
8. 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 7.
9. 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 7.
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