Method, device, storage medium and electronic device for sensitive detection
By combining vector semantic recall and progressive large language model with variation rules to identify sensitive content in English text, this technology solves the problem of missed detection in English variation recognition in existing technologies, and achieves efficient and low-cost English text review.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-06-16
AI Technical Summary
Existing content moderation systems are unable to effectively identify variant circumvention techniques in English texts, leading to missed detections and compliance risks for cross-border e-commerce platforms. There is a lack of variant recognition technology that targets the characteristics of English word formation.
By transforming English text into semantic vectors through a vector semantic recall architecture, sensitive entities with similar semantics are obtained. Then, a progressive large language model and variant rules are used to call the large language model for recognition in stages, and a reverse verification mechanism based on variant rules is combined to prevent false judgments.
It improves the recall rate of English text recognition, reduces API costs, prevents false positives, fills the gap in English variant recognition technology, and has commercial value and industrial promotion prospects.
Smart Images

Figure CN122220904A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to artificial intelligence technology, and particularly to a method, device, storage medium and electronic device for sensitive detection. Background Art
[0002] The current content review system only supports two modes for text content recognition: 1. Exact keyword matching: requires the input to be exactly the same as the words in the word library; 2. Matching with the Chinese phonetic and character structure variant library: recognition based on the variants of Chinese pinyin and character structure (e.g., "village" → "cun" → "wooden inch"). The current content review system highly relies on the Chinese phonetic and character structure variant library and cannot recognize the unique variant avoidance means in English (such as digital wordification, hyphen shift, initialism, etc.). The Chinese solution is not applicable to English, and the Chinese phonetic and character structure variant library cannot be migrated to the English scenario. There is a lack of variant recognition technology for English word formation characteristics in the industry. Cross-border e-commerce platforms are forced to conduct manual reviews or allow undetected cases, resulting in compliance risks, regulatory inquiries, and undetected risks in international business. Summary of the Invention
[0003] The purpose of the embodiments of this specification is to provide a method, device, storage medium and electronic device for sensitive detection.
[0004] The embodiments of this specification provide a method for sensitive detection. Through a vector semantic recall architecture, before rule comparison, the English text to be detected is first converted into a semantic vector to obtain candidate sensitive entities similar in semantics to it, providing a high-value candidate set for subsequent rule comparison, which can improve the recall rate. For variant types that do not exist in Chinese at all, such as digital wordification, hyphen processing, and initialism unique to English, by constructing variant rules, the English text, sensitive entities, and variant rules are input into a progressive large language model. By calling the large language model in stages, the API cost can be effectively reduced while ensuring the recognition effect, avoiding cost waste caused by full-scale calls. Moreover, due to the openness of English variants (unlimited abbreviation possibilities), the large language model is prone to hallucinations. Considering the formalizable definition characteristics of English variant rules (such as "digital variants must contain numbers"), a variant rule reverse verification mechanism is designed to verify the self-consistency of the large language model's reasoning with program logic, which can prevent misjudgments, fill the gap in the industry's English variant recognition technology, and can be directly applied to the review of cross-border e-commerce products, with clear commercial value and industrial promotion prospects. The method includes: Obtaining multiple sensitive entities similar in semantics to the English text to be detected; <Obtain at least one variant rule, input the English text, the sensitive entity, and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage. The English text and the variant type are input into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
[0005] Furthermore, obtaining multiple sensitive entities that are semantically similar to the English text to be detected includes: Obtain the semantic vector corresponding to the English text to be detected; Based on the semantic vector, multiple sensitive entities that are semantically similar to the English text are obtained.
[0006] Furthermore, obtaining multiple sensitive entities that are semantically similar to the English text based on the semantic vector includes: Based on the semantic vector, a search is performed in the vector database to obtain a preset number of sensitive entities with the highest semantic similarity to the English text.
[0007] Furthermore, the method also includes: Filter at least one sensitive entity from the plurality of sensitive entities whose semantic similarity to the English text is less than or equal to a preset similarity threshold.
[0008] Furthermore, the method also includes: If the similarity between the English text and the first sensitive entity among the plurality of sensitive entities meets the first preset condition, the English text is intercepted, and the sensitivity detection result corresponding to the English text is determined to be a failed detection.
[0009] Furthermore, the method also includes: If the matching degree between the English text and the second sensitive entity among the plurality of sensitive entities meets the second preset condition, and the similarity between the English text and the easily confused entity corresponding to the second sensitive entity meets the third preset condition, the English text is allowed, and the sensitivity detection result corresponding to the English text is determined to be passed.
[0010] Furthermore, obtaining at least one variant rule includes: Based on the business scenario corresponding to the English text, at least one variant rule corresponding to the English text is determined from a set of preset variant rules.
[0011] Further, determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text includes: Based on the business scenario corresponding to the English text and the rule popularity corresponding to the preset multiple variant rules, at least one variant rule corresponding to the English text is determined from the preset multiple variant rules.
[0012] Furthermore, the method also includes: If the first result indicates that it is irrelevant, the first sensitivity detection result corresponding to the English text is determined to be a pass detection, so that the progressive large language model outputs the first sensitivity detection result.
[0013] Furthermore, the step of causing the progressive large language model to output the variant type corresponding to the English text in the second stage includes: This enables the progressive large language model to output the variant type corresponding to the English text and the first confidence level corresponding to the variant type in the second stage; The step of inputting the English text and the variant type into the target large language model includes: If the first confidence level meets the fourth preset condition, the English text and the variant type are input into the target large language model.
[0014] Furthermore, the method also includes: If the first confidence level meets the fifth preset condition, the second sensitivity detection result corresponding to the English text is determined to be a pass detection, so that the progressive large language model outputs the second sensitivity detection result.
[0015] Furthermore, the step of enabling the target large language model to verify whether the English text satisfies at least one necessary feature corresponding to the variant type includes: This causes the target large language model to call the feature validator corresponding to the variant type to verify whether the English text satisfies at least one necessary feature corresponding to the variant type.
[0016] Further, obtaining the sensitivity detection result corresponding to the English text based on the feature verification result includes: This enables the target language large model to output the feature verification result corresponding to the English text and / or the confidence level corresponding to the feature verification result; Based on the feature verification results and / or the confidence level, determine the sensitivity detection result corresponding to the English text.
[0017] This specification also provides an embodiment of a device for sensitive detection, comprising: The sensitive entity acquisition module is used to acquire multiple sensitive entities that are semantically similar to the English text to be detected; A variant type output module is used to obtain at least one variant rule, input the English text, the sensitive entity and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage. The sensitivity detection result acquisition module is used to input the English text and the variant type into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
[0018] This specification also provides a storage medium storing a computer program adapted to be loaded by a processor and to execute the steps of the method described above.
[0019] This specification also provides an electronic device, including a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the steps of the method described above.
[0020] This specification also provides a computer program product that stores at least one instruction, characterized in that the at least one instruction, when executed by a processor, implements the steps of the above-described method.
[0021] According to the embodiments of this specification, the vector semantic recall architecture converts the English text to be detected into semantic vectors before rule comparison, obtaining candidate sensitive entities with similar semantics. This provides a high-value candidate set for subsequent rule comparison, which can improve the recall rate. For variant types unique to English, such as numeric wording, hyphen processing, and acronyms, which do not exist in Chinese, variant rules are constructed. The English text, sensitive entities, and variant rules are input into a progressive large language model. By calling the large language model in stages, the API cost can be effectively reduced while ensuring the recognition effect, avoiding the cost waste caused by full calls. In addition, considering the openness of English variants (arbitrary abbreviations) which makes the large language model prone to illusions, a reverse verification mechanism for variant rules is designed to address the formally definable characteristic of English variant rules (such as "numerical variants must contain numbers"). The program logic verifies the self-consistency of the large language model's reasoning, which can prevent misjudgment. This can fill the gap in English variant recognition technology in the industry and can be directly applied to cross-border e-commerce product review, with clear commercial value and industrial promotion prospects. Attached Figure Description
[0022] Figure 1 A schematic flowchart illustrating a method for sensitive detection provided in an embodiment of this specification; Figure 2 A schematic diagram of a device for sensitive detection provided in an embodiment of this specification; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0024] Please see Figure 1 This is a schematic flowchart illustrating a method for sensitive detection provided in an embodiment of this specification. In this embodiment, the method for sensitive detection is applied to the sensitive detection apparatus (hereinafter referred to as the "sensitive detection apparatus") or an electronic device equipped with a sensitive detection apparatus. The following will focus on... Figure 1 The process shown will be described in detail. The method for sensitive detection may specifically include the following steps: S102, obtain multiple sensitive entities that are semantically similar to the English text to be detected.
[0025] In some embodiments, the English text includes, but is not limited to, any form of English text, such as product names, organization names, transaction descriptions, etc., and this example embodiment does not impose any special limitations on it. In some embodiments, it is necessary to search the English text to be detected in a vector database to obtain a plurality of sensitive entities whose semantic similarity with the English text meets a preset condition. The preset condition may refer to the semantic similarity between the plurality of sensitive entities and the English text being greater than or equal to a preset similarity threshold, or it may refer to the plurality of sensitive entities being a preset number of sensitive entities in the vector database with the highest semantic similarity to the English text.
[0026] S104, obtain at least one variant rule, input the English text, the sensitive entity, and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage.
[0027] In some embodiments, English variant words refer to words obtained by modifying English text using avoidance methods based on the characteristics of English word formation. These include, but are not limited to, digitization, hyphen shifting, abbreviation, and character shape replacement. These are completely different from Chinese sound changes in terms of generation mechanism and detection method. Variant rules include, but are not limited to, digitization (e.g., an English variant example of "136↔one-three-six"), hyphen processing (e.g., an English variant example of "sha-hed↔shahed"), acronyms (e.g., an English variant example of "Al-Qaeda↔AQ"), and synonym conversion (e.g., an English variant example of "drone↔UAV"). This example embodiment does not impose any special limitations on these. In some embodiments, obtaining at least one variant rule from a set of pre-defined variant rules can be based on the rule popularity of each variant rule (i.e., the statistical value of the contribution ratio of each variant rule in historical hit cases), obtaining at least one preset number of variant rules with the highest rule popularity from a set of pre-defined variant rules. According to the embodiments of this specification, dynamic pruning of multiple pre-defined variant rules based on rule popularity distinguishes it from the fixed pinyin mapping of Chinese sound changes. In some embodiments, a progressive large language model refers to a large language model that adopts a phased, progressively challenging, and gradually enhanced training or adaptation strategy. Through multi-stage progressive learning, it gradually expands the model's capabilities or structure, continuously learning new tasks and knowledge while retaining its original capabilities, achieving stable performance improvement and efficient iteration. This type of large language model is called in stages. In some embodiments, English text, multiple sensitive entities, and at least one variant rule are input into the progressive large language model. The progressive large language model outputs a first result in the first stage, indicating whether the English text is related to at least one of the multiple sensitive entities. The first result is a ternary judgment result, that is, the first result includes three results: related, irrelevant, and uncertain. In some embodiments, the progressive large language model will only output the variant type (i.e. the variant rule specifically involved in the English text) in the second stage if the first result output in the first stage indicates relevance or uncertainty. That is, the first stage is a lightweight preliminary screening of relevance, and the second stage is a deep discrimination.
[0028] S106, input the English text and the variant type into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
[0029] In some embodiments, the discrimination of the progressive large language model relies on the semantic reasoning ability of the large language model to identify complex variations. However, the large language model is susceptible to the risk of "illusion"—it may fabricate seemingly reasonable erroneous conclusions when uncertain. Therefore, taking advantage of the formally definable nature of English variation rules, a rule-backed consistency verification mechanism is designed to verify the self-consistency of AI (Artificial Intelligence) reasoning using program logic, preventing misjudgments. In some embodiments, English text and variation types are input into the target large language model. The target large language model and the progressive large language model described above can be the same large language model, or they can be two different large language models. This example embodiment does not impose any special limitations on this. In some embodiments, the necessary features corresponding to each variant type are determined based on the formally definable nature of English variant rules, meaning that each variant type can be precisely defined and possesses objectively verifiable necessary features. By inputting English text and variant types into a target large language model, the target large language model parses the variant types, determines at least one necessary feature corresponding to each variant type based on the parsing results, verifies whether the English text satisfies at least one necessary feature, obtains the corresponding feature verification result, and then obtains the sensitivity detection result corresponding to the English text based on the feature verification result. For example, the target large language model can output the feature verification result and then determine the sensitivity detection result corresponding to the English text based on the feature verification result; alternatively, the target large language model can directly determine the sensitivity detection result corresponding to the English text based on the feature verification result and then output the sensitivity detection result. In some embodiments, if the feature verification result is "verification failed," the corresponding sensitivity detection result is "passed." In some embodiments, if the feature verification result is "verification passed," the corresponding sensitivity detection result is "failed." In some embodiments, the target large language model outputs feature verification results and their corresponding confidence scores. If the feature verification result is a pass, the corresponding confidence score is used to determine the sensitive detection result. For example, if the confidence score is greater than or equal to the first threshold (e.g., 0.9), the sensitive detection result is determined to be a fail detection. If the confidence score is between the first and second thresholds (e.g., 0.7), the feature verification result needs to be manually reviewed. If the confidence score is less than or equal to the second threshold, the sensitive detection result is determined to be a pass detection, and the English text is added to the difficult example library so that the target large language model can iterate the model based on the difficult example library.
[0030] According to the embodiments of this specification, the vector semantic recall architecture converts the English text to be detected into semantic vectors before rule comparison, obtaining candidate sensitive entities with similar semantics. This provides a high-value candidate set for subsequent rule comparison, which can improve the recall rate. For variant types unique to English, such as numeric wording, hyphen processing, and acronyms, which do not exist in Chinese, variant rules are constructed. The English text, sensitive entities, and variant rules are input into a progressive large language model. By calling the large language model in stages, the API cost can be effectively reduced while ensuring the recognition effect, avoiding the cost waste caused by full calls. In addition, considering the openness of English variants (arbitrary abbreviations) which makes the large language model prone to illusions, a reverse verification mechanism for variant rules is designed to address the formally definable characteristic of English variant rules (such as "numerical variants must contain numbers"). The program logic verifies the self-consistency of the large language model's reasoning, which can prevent misjudgment. This can fill the gap in English variant recognition technology in the industry and can be directly applied to cross-border e-commerce product review, with clear commercial value and industrial promotion prospects.
[0031] In some embodiments, obtaining multiple sensitive entities that are semantically similar to the English text to be detected includes: obtaining a semantic vector corresponding to the English text to be detected; and obtaining multiple sensitive entities that are semantically similar to the English text based on the semantic vector. In some embodiments, it is necessary to first obtain the semantic vector corresponding to the English text to be detected. For example, the English text to be detected is converted into a corresponding semantic vector through an embedding model, and then multiple sensitive entities similar to the semantic vector are obtained by searching a vector database based on the semantic vector of the English text to be detected. For example, the similarity between the semantic vectors of the multiple sensitive entities and the semantic vector of the English text to be detected is greater than or equal to a preset similarity threshold.
[0032] In some embodiments, obtaining a plurality of sensitive entities that are semantically similar to the English text based on the semantic vector includes: searching a vector database based on the semantic vector to obtain a predetermined number of sensitive entities with the highest semantic similarity to the English text. In some embodiments, an approximate nearest neighbor search is performed in the vector database based on the semantic vector of the English text to be detected to obtain a predetermined number of sensitive entities with the highest semantic similarity to the semantic vector of the English text to be detected.
[0033] In some embodiments, the method further includes: filtering at least one sensitive entity from the plurality of sensitive entities whose semantic similarity to the English text is less than or equal to a preset similarity threshold. In some embodiments, filtering at least one sensitive entity from the plurality of sensitive entities whose semantic similarity to the semantic vector of the English text to be detected is less than or equal to a preset similarity threshold, that is, while filtering candidates with extremely low similarity, recalling as many candidate words (i.e., candidate sensitive entities) as possible can improve the recall rate and provide a high-value candidate set for subsequent rule comparison.
[0034] In some embodiments, the method further includes: if the similarity between the English text and a first sensitive entity among the plurality of sensitive entities meets a first preset condition, intercepting the English text and determining that the sensitivity detection result corresponding to the English text is a failed detection. In some embodiments, the English text to be detected is subjected to similarity matching in a standard form positive example lexicon including the plurality of sensitive entities. If the similarity between the English text and the first sensitive entity among the plurality of sensitive entities meets the first preset condition, the English text is intercepted, and the sensitivity detection result corresponding to the English text is directly determined to be a failed detection. Subsequently, it is not necessary to input the English text into the progressive large language model. The first preset condition can be a similarity of 1 or 100% (i.e., a perfect match), or it can be a similarity greater than or equal to a preset first similarity threshold. This example embodiment does not specifically limit this.
[0035] In some embodiments, the method further includes: if the matching degree between the English text and the second sensitive entity among the plurality of sensitive entities meets a second preset condition, and the similarity between the English text and the easily confused entity corresponding to the second sensitive entity meets a third preset condition, then the English text is allowed, and the sensitivity detection result corresponding to the English text is determined to be a pass detection. In some embodiments, considering the strong sensitivity of English model numbers and the easily confused characteristics of abbreviations, the English text to be detected is subjected to similarity matching in a negative example dictionary including multiple easily confused word pairs. Each easily confused word pair includes one sensitive entity among the plurality of sensitive entities and the non-sensitive easily confused entity corresponding to the sensitive entity. If the matching degree between the English text and the second sensitive entity in an easily confused word pair meets the second preset condition, and the similarity between the English text and the easily confused entity corresponding to the second sensitive entity in the easily confused word pair meets the third preset condition, then the English text is allowed, and the sensitivity detection result corresponding to the English text is directly determined to be a pass detection, without further processing. The English text is input into a progressive large language model. The second preset condition can be a similarity greater than or equal to a preset second similarity threshold, and the third preset condition can be a similarity greater than or equal to a preset third similarity threshold. This example embodiment does not specifically limit this. Similarity can refer to the edit distance between the English text and the second sensitive entity or easily confused entity. Edit distance is a classic algorithmic metric for measuring the similarity between two strings, defined as the minimum number of single-character editing operations (including insertion, deletion, and replacement) required to convert one string into another. The smaller the edit distance, the greater the similarity; the greater the edit distance, the smaller the similarity. In some embodiments, the negative example dictionary stores three types of easily confused English pairs: one type consists of different models within the same product series (e.g., Shahed-136 and Shahed-131); another type consists of characters that are similar but refer to different entities (e.g., Al-Qaeda and Al-Jazeera, with coincident initials); and the third type consists of automatically accumulated historical misjudgment cases (e.g., AQ referring to other organizations in a specific context). Unlike the single-library matching of Chinese sound change libraries, the solution in this specification is designed for the characteristics of English model differences (e.g., 136 ≠ 131) and easily confused abbreviations (e.g., AQ may have multiple meanings). It pioneered a dual-library architecture with positive and negative examples. The negative example library is specially used to store English word pairs that are "similar in character but different in entity", which solves the problem of high false positive rate unique to English scenarios.
[0036] In some embodiments, obtaining at least one variant rule includes: determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text. In some embodiments, based on the business scenario involved in the English text, the variant rule matching the business scenario can be selected from a set of preset variant rules as at least one variant rule corresponding to the English text. Business scenarios include, but are not limited to, synchronous scenarios (e.g., business scenarios that require waiting for risk control results to be returned before completing a transaction), high-efficiency scenarios (e.g., real-time transaction review and other business scenarios that do not require waiting for risk control results to be returned), regular scenarios, and in-depth review scenarios. This example embodiment does not impose any special limitations on these scenarios. For example, synchronous scenarios correspond to keyword matching variant rules, and in-depth review scenarios correspond to all variant rules. In some embodiments, it is necessary to first determine the corresponding selection strategy based on the business scenario involved in the English text, and then select at least one variant rule corresponding to the English text from a set of preset variant rules according to the selection strategy. The selection strategy refers to the strategy of dynamically selecting the set of variant rules according to the timeliness requirements of different business scenarios. For example, in the cross-border remittance scenario, there is generally no product name, so the variant rule "hyphen processing" is selected from the set of preset variant rules. In the cross-border e-commerce scenario, there are more drug models, so the variant rule "digit wordization" is selected additionally.
[0037] In some embodiments, determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text includes: determining at least one variant rule corresponding to the English text from the set of preset variant rules based on the business scenario corresponding to the English text and the rule popularity corresponding to each of the preset variant rules. For example, if the business scenario is a high-time-efficiency scenario, then at least one variant rule corresponding to the English text is the first preset number (e.g., 5) of variant rules with the highest rule popularity among the preset variant rules. As another example, if the business scenario is a regular scenario, then at least one variant rule corresponding to the English text is the first preset number (e.g., 8) of variant rules with the highest rule popularity among the preset variant rules.
[0038] In some embodiments, the method further includes: if the first result indicates that the English text is irrelevant, determining that the first sensitivity detection result corresponding to the English text is a pass detection, and causing the progressive large language model to output the first sensitivity detection result. In some embodiments, if the first result indicates that the English text is irrelevant to the plurality of sensitive entities, the first sensitivity detection result corresponding to the English text can be directly determined to be a pass detection, and there is no need to input the English text into the target large language model for necessary feature verification. The progressive large language model will directly output the first sensitivity detection result.
[0039] In some embodiments, causing the progressive large language model to output the variant type corresponding to the English text in the second stage includes: causing the progressive large language model to output the variant type corresponding to the English text and the first confidence level corresponding to the variant type in the second stage; wherein, inputting the English text and the variant type into the target large language model includes: inputting the English text and the variant type into the target large language model if the first confidence level satisfies a fourth preset condition. In some embodiments, in addition to outputting the variant type corresponding to the English text, the progressive large language model also outputs the first confidence level corresponding to the variant type in the second stage. In some embodiments, the English text and its corresponding variant type are only input into the target large language model if the first confidence level corresponding to the variant type satisfies the fourth preset condition, wherein the fourth preset condition may be that the first confidence level is greater than or equal to a preset first confidence level threshold, which is not specifically limited in this example embodiment.
[0040] In some embodiments, the method further includes: if the first confidence level meets a fifth preset condition, determining that the second sensitivity detection result corresponding to the English text is a pass detection, and causing the progressive large language model to output the second sensitivity detection result. In some embodiments, if the first confidence level corresponding to the variant type meets the fifth preset condition, the second sensitivity detection result corresponding to the English text can be directly determined to be a pass detection, and there is no need to input the English text into the target large language model for necessary feature verification. The progressive large language model will directly output the second sensitivity detection result. The fifth preset condition can be that the first confidence level is less than or equal to a preset second confidence level threshold. This example embodiment does not specifically limit this. In some embodiments, if the first confidence level corresponding to the variant type meets the fifth preset condition, the English text will also be added to the difficult example library so that the progressive large language model can iterate the model based on the difficult example library. In some embodiments, if the first confidence level does not meet either the fourth or the fifth preset condition, for example, if the first confidence level is between a preset first confidence threshold and a preset second confidence threshold, the English text needs to be manually reviewed.
[0041] In some embodiments, the step of having the target large language model verify whether the English text satisfies at least one necessary feature corresponding to the variant type includes: having the target large language model call the feature validator corresponding to the variant type to verify whether the English text satisfies at least one necessary feature corresponding to the variant type. In some embodiments, the target large language model parses the variant type corresponding to the English text, determines the feature validator corresponding to the variant type based on the parsing result, and calls the feature validator to verify whether the English text satisfies at least one necessary feature corresponding to the variant type. Here, the feature validator refers to a module, function, or sub-model specifically used in the large model training, inference, or evaluation phase to detect and verify whether the model's internal features or output results conform to preset standards, rules, formats, or facts.
[0042] In some embodiments, obtaining the sensitivity detection result corresponding to the English text based on the feature verification result includes: causing the target language model to output the feature verification result and / or the confidence level corresponding to the feature verification result; and determining the sensitivity detection result corresponding to the English text based on the feature verification result and / or the confidence level. In some embodiments, if the feature verification result is a failure, the sensitivity detection result corresponding to the English text can be directly determined as a pass. In some embodiments, if the feature verification result is a pass, the target language model will output the confidence level corresponding to the feature verification result in addition to the feature verification result. Then, the sensitivity detection result corresponding to the English text is determined based on the confidence level. For example, if the confidence level is greater than or equal to a first threshold (e.g., 0.9), the sensitivity detection result can be determined as a failure. If the confidence level is less than or equal to a second threshold (e.g., 0.7), the sensitivity detection result can be determined as a pass, and the English text is added to the difficult example library so that the target language model can iterate based on the difficult example library. If the confidence level is between the first and second thresholds, the feature verification result needs to be manually reviewed.
[0043] Figure 2 This is a schematic diagram of a device for sensitive detection provided in an embodiment of this specification. This device (hereinafter referred to as "sensitive detection device 1") can be implemented as all or part of an electronic device through software, hardware, or a combination of both. According to some embodiments, the sensitive detection device 1 includes a sensitive entity acquisition module 11, a variant type output module 12, and a sensitive detection result acquisition module 13.
[0044] Sensitive entity acquisition module 11 is used to acquire multiple sensitive entities that are semantically similar to the English text to be detected; The variant type output module 12 is used to obtain at least one variant rule, input the English text, the sensitive entity and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage. The sensitivity detection result acquisition module 13 is used to input the English text and the variant type into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
[0045] In some embodiments, obtaining multiple sensitive entities that are semantically similar to the English text to be detected includes: obtaining a semantic vector corresponding to the English text to be detected; and obtaining multiple sensitive entities that are semantically similar to the English text based on the semantic vector.
[0046] In some embodiments, obtaining multiple sensitive entities that are semantically similar to the English text based on the semantic vector includes: searching a vector database based on the semantic vector to obtain a preset number of sensitive entities that have the highest semantic similarity to the English text.
[0047] In some embodiments, the sensitivity detection device 1 is further configured to: filter at least one sensitive entity among the plurality of sensitive entities whose semantic similarity to the English text is less than or equal to a preset similarity threshold.
[0048] In some embodiments, the sensitivity detection device 1 is further configured to: if the similarity between the English text and a first sensitive entity among the plurality of sensitive entities meets a first preset condition, intercept the English text and determine that the sensitivity detection result corresponding to the English text is a failed detection.
[0049] In some embodiments, the sensitivity detection device 1 is further configured to: if the matching degree between the English text and the second sensitive entity among the plurality of sensitive entities meets a second preset condition, and the similarity between the English text and the easily confused entity corresponding to the second sensitive entity meets a third preset condition, allow the English text to pass the detection and determine that the sensitivity detection result corresponding to the English text is a pass detection.
[0050] In some embodiments, obtaining at least one variant rule includes: determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text.
[0051] In some embodiments, determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text includes: determining at least one variant rule corresponding to the English text from the set of preset variant rules based on the business scenario corresponding to the English text and the rule popularity corresponding to the set of preset variant rules respectively.
[0052] In some embodiments, the sensitivity detection device 1 is further configured to: if the first result indicates that the English text is irrelevant, determine that the first sensitivity detection result is passed, and cause the progressive large language model to output the first sensitivity detection result.
[0053] In some embodiments, the step of causing the progressive large language model to output the variant type corresponding to the English text in the second stage includes: causing the progressive large language model to output the variant type corresponding to the English text and the first confidence level corresponding to the variant type in the second stage; wherein, the step of inputting the English text and the variant type into the target large language model includes: if the first confidence level satisfies a fourth preset condition, inputting the English text and the variant type into the target large language model.
[0054] In some embodiments, the sensitivity detection device 1 is further configured to: if the first confidence level satisfies a fifth preset condition, determine that the second sensitivity detection result corresponding to the English text is a pass detection, so that the progressive large language model outputs the second sensitivity detection result.
[0055] In some embodiments, the step of having the target large language model verify whether the English text satisfies at least one necessary feature corresponding to the variant type includes: having the target large language model call the feature validator corresponding to the variant type to verify whether the English text satisfies at least one necessary feature corresponding to the variant type.
[0056] In some embodiments, obtaining the sensitivity detection result corresponding to the English text based on the feature verification result of the English text includes: causing the target language large model to output the feature verification result and / or the confidence level corresponding to the feature verification result of the English text; and determining the sensitivity detection result corresponding to the English text based on the feature verification result and / or the confidence level.
[0057] The above-described apparatus embodiments correspond to the aforementioned method embodiments. For detailed descriptions, please refer to the description in the method embodiments section; further details will not be repeated here. The apparatus embodiments are derived from the corresponding method embodiments and have the same technical effects. For detailed descriptions, please refer to the corresponding method embodiments.
[0058] This specification also provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in this specification.
[0059] This specification also provides a computer program product that stores at least one instruction, which is loaded by the processor and executes the method described in this specification embodiment.
[0060] This specification also provides an electronic device, including a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and execute the method described in the embodiments of this specification.
[0061] The embodiments in this specification also provide Figure 3 The diagram shows the structure of the electronic device. Figure 3 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the above method.
[0062] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0063] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0064] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0065] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0066] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0067] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0068] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification 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.
[0069] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0070] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for sensitive detection, comprising: Obtain multiple sensitive entities that are semantically similar to the English text to be detected; Obtain at least one variant rule, input the English text, the sensitive entity, and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage. The English text and the variant type are input into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
2. The method according to claim 1, wherein obtaining multiple sensitive entities that are semantically similar to the English text to be detected includes: Obtain the semantic vector corresponding to the English text to be detected; Based on the semantic vector, multiple sensitive entities that are semantically similar to the English text are obtained.
3. The method according to claim 2, wherein obtaining multiple sensitive entities that are semantically similar to the English text based on the semantic vector includes: Based on the semantic vector, a search is performed in the vector database to obtain a preset number of sensitive entities with the highest semantic similarity to the English text.
4. The method according to claim 3, further comprising: Filter at least one sensitive entity from the plurality of sensitive entities whose semantic similarity to the English text is less than or equal to a preset similarity threshold.
5. The method according to claim 1, further comprising: If the similarity between the English text and the first sensitive entity among the plurality of sensitive entities meets the first preset condition, the English text is intercepted, and the sensitivity detection result corresponding to the English text is determined to be a failed detection.
6. The method according to claim 5, further comprising: If the matching degree between the English text and the second sensitive entity among the plurality of sensitive entities meets the second preset condition, and the similarity between the English text and the easily confused entity corresponding to the second sensitive entity meets the third preset condition, the English text is allowed, and the sensitivity detection result corresponding to the English text is determined to be passed.
7. The method according to claim 1, wherein obtaining at least one variant rule comprises: Based on the business scenario corresponding to the English text, at least one variant rule corresponding to the English text is determined from a set of preset variant rules.
8. The method according to claim 7, wherein determining at least one variant rule corresponding to the English text from a set of preset variant rules based on the business scenario corresponding to the English text includes: Based on the business scenario corresponding to the English text and the rule popularity corresponding to the preset multiple variant rules, at least one variant rule corresponding to the English text is determined from the preset multiple variant rules.
9. The method according to claim 1, further comprising: If the first result indicates that it is irrelevant, the first sensitivity detection result corresponding to the English text is determined to be a pass detection, so that the progressive large language model outputs the first sensitivity detection result.
10. The method according to claim 1, wherein causing the progressive large language model to output the variant type corresponding to the English text in the second stage includes: This enables the progressive large language model to output the variant type corresponding to the English text and the first confidence level corresponding to the variant type in the second stage; The step of inputting the English text and the variant type into the target large language model includes: If the first confidence level meets the fourth preset condition, the English text and the variant type are input into the target large language model.
11. The method of claim 10, further comprising: If the first confidence level meets the fifth preset condition, the second sensitivity detection result corresponding to the English text is determined to be a pass detection, so that the progressive large language model outputs the second sensitivity detection result.
12. The method according to claim 1, wherein the step of enabling the target large language model to verify whether the English text satisfies at least one necessary feature corresponding to the variant type includes: This causes the target large language model to call the feature validator corresponding to the variant type to verify whether the English text satisfies at least one necessary feature corresponding to the variant type.
13. The method according to claim 1 or 12, wherein obtaining the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text includes: This enables the target language large model to output the feature verification result corresponding to the English text and / or the confidence level corresponding to the feature verification result; Based on the feature verification results and / or the confidence level, determine the sensitivity detection result corresponding to the English text.
14. An apparatus for sensitive detection, comprising: The sensitive entity acquisition module is used to acquire multiple sensitive entities that are semantically similar to the English text to be detected; A variant type output module is used to obtain at least one variant rule, input the English text, the sensitive entity and the variant rule into the progressive large language model, so that the progressive large language model outputs a first result in the first stage to indicate whether the English text is related to the sensitive entity. If the first result indicates that it is related or uncertain, the progressive large language model outputs the variant type corresponding to the English text in the second stage. The sensitivity detection result acquisition module is used to input the English text and the variant type into the target large language model, so that the target large language model verifies whether the English text satisfies at least one necessary feature corresponding to the variant type, and obtains the sensitivity detection result corresponding to the English text based on the feature verification result corresponding to the English text.
15. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.
16. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the steps of the method as claimed in any one of claims 1 to 13.
17. A computer program product having at least one instruction stored thereon, characterized in that, When the at least one instruction is executed by the processor, it implements the steps of the method according to any one of claims 1 to 13.