Hidden encryption attack detection method and device, computer device and storage medium

By employing topic analysis and deep intent parsing methods, combined with clustering and anomaly detection, this approach identifies and prevents hidden encryption attacks, addressing the insufficient identification of concealed malicious content in large-scale content security and improving security and reliability.

CN122174230APending Publication Date: 2026-06-09SHANGHAI DOUXIANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI DOUXIANG INFORMATION TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to identify and prevent malicious instructions and cryptographic attacks hidden beneath normal text, especially in the field of large-scale content security, where traditional detection methods are insufficient to identify malicious content that is both covert and semantically complex.

Method used

By establishing content benchmarks through topic analysis, performing in-depth intent parsing and vectorization, and combining cluster analysis and anomaly detection, irrelevant intent information that deviates from the conventional intent is filtered out, and hidden encryption attacks are identified through instruction nature identification.

Benefits of technology

It enhances the ability to identify malicious content with high concealment and semantic complexity, effectively resists hidden command attacks, and improves the security and reliability of large models in content review and interactive generation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174230A_ABST
    Figure CN122174230A_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, computer device, and storage medium for detecting hidden encryption attacks. The method includes: performing topic analysis on input text content to determine the topic semantics of the text content; performing intent parsing on the text content to extract multiple intent information contained in the text content and obtain the intent semantics corresponding to each intent information; performing anomaly analysis based on multiple intent semantics to determine abnormal intent information; determining the semantic similarity between the intent semantics of the abnormal intent information and the topic semantics, and identifying abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information; and performing instruction nature identification on the irrelevant intent information to determine the hidden encryption attack detection result of the text content. Using this application can improve the ability to identify malicious content with high concealment and semantic complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of large-scale security technology, and in particular to a method, apparatus, computer device, and storage medium for detecting hidden encryption attacks. Background Technology

[0002] In the field of large-scale model content security technology, explicit risk review of input text (such as sensitive word filtering and rule matching) has become a basic protection measure, providing initial protection against obviously inappropriate content and attacks.

[0003] However, with the continuous evolution of adversarial attack methods, malicious commands and encryption attacks hidden under normal text are increasing, posing new challenges to existing detection methods.

[0004] Existing security detection technologies are significantly inadequate in identifying malicious content that is highly concealed and semantically complex. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, computer device, and storage medium for detecting hidden encryption attacks that can improve identification capabilities in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a method for detecting hidden encryption attacks, the method comprising: Perform topic analysis on the input text content to determine the topic semantics of the text content; Perform intent parsing on the text content, extract multiple intent information contained in the text content, and obtain the intent semantics corresponding to each intent information; Anomaly analysis is performed based on multiple intent semantics to determine abnormal intent information; Determine the semantic similarity between the intent semantics and topic semantics of abnormal intent information, and identify abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information; Identify the nature of instructions for irrelevant intent information to determine the detection results of hidden encryption attacks on text content.

[0007] In one embodiment, topic analysis is performed on the input text content to determine the topic semantics of the text content, including: The text content is segmented into multiple semantic segments; Based on multiple semantic fragments, extract the main keywords and / or topic summaries from the text content; The topic keywords and / or topic summaries are converted into vectorized data to obtain the topic semantics.

[0008] In one embodiment, intent parsing is performed on the text content to extract multiple intent information contained in the text content, including: Syntactic analysis is performed on each sentence in the text to extract the subject-verb-object structure and obtain multiple structured intent information.

[0009] In one embodiment, obtaining the intent semantics corresponding to each intent information includes: Each intent information is input into a pre-trained semantic encoding model to obtain the semantic vector corresponding to each intent information, which serves as the intent semantics.

[0010] In one embodiment, anomaly analysis is performed based on multiple intent semantics to determine anomalous intent information, including: Cluster analysis is performed on multiple intent semantics, and intent information that fails to belong to any cluster is identified as the first type of abnormal intent information; A preset anomaly detection algorithm is used to analyze multiple intent semantics, and the intent information corresponding to the anomalies obtained from the analysis is identified as the second type of abnormal intent information. The intersection of the first type of abnormal intent information and the second type of abnormal intent information is determined as abnormal intent information.

[0011] In one embodiment, determining the semantic similarity between the intent semantics and the topic semantics of the anomalous intent information includes: Obtain the semantic vector of the abnormal intent information and the semantic vector of the topic semantics; Semantic similarity is determined based on the cosine similarity between the semantic vector of abnormal intent information and the semantic vector of topic semantics.

[0012] In one embodiment, the method of identifying the nature of unrelated intent information to determine the result of hidden encryption attack detection of text content includes: Irrelevant intent information is matched with a preset list of command-type intent terms, which contains keywords of preset types of command-type intents. If a match is successful, it will identify that the irrelevant intent information contains a predefined type of instruction intent and determine that the text content contains a hidden encryption attack.

[0013] Secondly, this application also provides a hidden encryption attack detection device, the device comprising: The topic analysis module is used to perform topic analysis on the input text content and determine the topic semantics of the text content; The intent parsing module is used to parse the intent of text content, extract multiple intent information contained in the text content, and obtain the intent semantics corresponding to each intent information. The anomaly analysis module is used to perform anomaly analysis based on multiple intent semantics to determine abnormal intent information; The similarity analysis module is used to determine the semantic similarity between the semantics of the intent information and the semantics of the topic, and to identify the abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information. The detection result determination module is used to identify the instruction nature of irrelevant intent information and determine the detection result of hidden encryption attacks on text content.

[0014] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0015] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0016] The hidden encryption attack detection method, apparatus, computer equipment, and storage medium provided in this application establish a content benchmark through topic analysis; deconstruct text into computable semantic units through deep intent parsing and vectorization; furthermore, it can filter out unconventional intents through dual-verification anomaly analysis; accurately locate "detached" intents unrelated to the main theme through topic correlation filtering; and complete the final determination of malicious attacks through instruction nature identification. Thus, a comprehensive defense system from semantic understanding to anomaly detection to security determination can be formed. Compared with existing technologies, this application can enhance the ability to identify malicious content with high concealment and semantic complexity, effectively resist hidden instruction attacks embedded through semantic transformation and contextual obfuscation, and improve the security and reliability of large models in scenarios such as content review and interactive generation, thereby improving the ability to identify malicious content with high concealment and semantic complexity. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a method for detecting hidden encryption attacks provided in an embodiment of this application; Figure 2 A flowchart illustrating the steps for determining the topic semantics of text content is provided in this application embodiment. Figure 3 This application provides a flowchart illustrating the steps for determining abnormal intent information in an embodiment of the present application. Figure 4 A flowchart illustrating the steps for determining the detection result of a hidden encryption attack on text content, provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a hidden encryption attack detection device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0020] With the widespread application of large-scale models in content generation, automated moderation, and semantic understanding, cybersecurity risks are also constantly evolving. In recent years, an increasing number of attackers have used "hidden encryption" techniques to embed invisible or difficult-to-detect malicious instructions into text content, thereby inducing large-scale models to deviate from their original design goals during generation or moderation tasks. For example, attackers may insert covert control instructions into articles, comments, and other texts, misleading large-scale model automated moderation systems to make incorrect judgments, resulting in the approval of non-compliant content, or even causing the model's output to be controlled by specific intentions.

[0021] This type of hidden encryption attack not only threatens the content security and credibility of large-scale models, but may also cause serious consequences such as the leakage of sensitive information and the spread of malicious content, posing data security and compliance risks to enterprises and users. As the application scenarios of large-scale models continue to expand, attack methods are becoming increasingly covert and intelligent, making it difficult for traditional detection methods to detect hidden malicious instructions in text.

[0022] Therefore, effectively identifying and preventing malicious instructions hidden in text content has become a crucial issue that urgently needs to be addressed in the field of large-scale model content security. This patent proposes a method for detecting hidden encryption attacks based on topic analysis and intent detection. By comprehensively analyzing text topics, sentence intents, intent clustering, and anomaly analysis, this method accurately identifies hidden attacks that are unrelated to the content topic but have an instructional nature, thereby effectively improving the security and reliability of large-scale models in content generation and review scenarios.

[0023] Current security detection methods for large model input content primarily focus on the review of explicit content, such as sensitive word filtering, rule matching, and simple text classification. While these methods are effective in preventing obvious attacks and inappropriate content, they have the following shortcomings when dealing with hidden encryption attacks: Limited ability to detect hidden instructions: Existing technologies mainly focus on the surface features of text, making it difficult to detect hidden malicious instructions embedded through invisible characters, semantic transformations, or text obfuscation.

[0024] Lack of in-depth semantic association analysis: Most detection methods cannot effectively analyze the semantic association between intent and topic in text, and it is difficult to distinguish between normal sentences and abnormal instructions that are "detached" from the topic.

[0025] Therefore, existing technologies have significant shortcomings in addressing hidden encryption attacks during the content transfer process of large-scale models, making it difficult to meet the actual needs of content security and compliance for large-scale models. There is an urgent need for a hidden encryption attack detection method to improve the ability to identify and defend against complex and covert attacks, ensuring the secure and reliable operation of large-scale model systems.

[0026] In one exemplary embodiment, Figure 1 This is a flowchart illustrating a method for detecting hidden encryption attacks provided in an embodiment of this application, as shown below. Figure 1 As shown, a method for detecting hidden encryption attacks is provided. This example illustrates the method's application to a server; however, it can also be applied to terminals and systems including both terminals and servers, and is implemented through interaction between the terminal and server. Terminals can be, but are not limited to, various personal computers, laptops, smartphones, and tablets. Servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services. In this embodiment, the method includes the following steps S101 to S105: Wherein: S101. Perform topic analysis on the input text content to determine the topic semantics of the text content.

[0027] Here, text content refers to any piece of natural language text to be security tested, such as an article, a comment, a prompt word, or a dialogue history. Topic analysis refers to the process of identifying, summarizing, and extracting the core theme or central idea from the text using natural language processing techniques. Topic semantics refers to the semantic representation of the core content of the text obtained through analysis, typically existing in the form of structured keywords, summary text, or semantic vectors.

[0028] For example, after receiving text content, the server system can preprocess and analyze the text content, extract its core theme by integrating the information of the whole text, and transform this theme into a machine-understandable and computable semantic form, so as to establish a benchmark for subsequent judgment on whether the micro-intention deviates from the theme.

[0029] As an example, you can first use NLP tools (such as spaCy) to segment the text into sentences, then use LDA topic models or large language models (such as ChatGLM) to extract topic keywords or generate summaries, and finally use models such as Sentence-BERT to convert topics into semantic vectors.

[0030] By first establishing the "topic semantics" of the text, a stable and reliable reference coordinate is provided for the entire detection process. This enables the system to distinguish between normal content expansion in the text and malicious, off-topic instruction insertions, fundamentally changing the limitations of traditional detection methods that lack deep semantic benchmarks and can only perform shallow matching, laying the foundation for accurate identification of covert attacks.

[0031] S102. Perform intent parsing on the text content, extract multiple intent information contained in the text content, and obtain the intent semantics corresponding to each intent information.

[0032] Intent parsing refers to the process of delving into the sentence level to identify and extract the specific purpose, goal, or action direction expressed in each sentence. Intent information refers to the structured representation of the core action logic of a single sentence, typically consisting of the action subject, the action itself, and the action object. Intent semantics refers to the deep meaning representation obtained after semantic encoding of each intent piece of information, usually presented in the form of a high-dimensional semantic vector.

[0033] For example, the server system can analyze each sentence in the text, strip away the modifying components, extract its core "subject-verb-object" action logic, and form structured intent information. Subsequently, this intent information can be transformed into semantic vectors through a semantic encoding model, so that the deeper meaning of each intent can be quantitatively represented and compared.

[0034] As an example, dependency parsing tools such as LTP can be used to extract the SVO structure of each sentence as intent information, and then models such as SimCSE can be used to transform these intent phrases into semantic vectors.

[0035] By deconstructing text into atomic units of intent and performing deep semantic encoding, a refined understanding of text content is achieved. This enables the system to discern the independent purpose of each sentence, making it possible to discover malicious instructions that are abruptly inserted into normal text and have intents distinct from other sentences, effectively overcoming the shortcomings of traditional methods in parsing hidden intents at the sentence level.

[0036] S103. Perform anomaly analysis based on multiple intent semantics to determine abnormal intent information.

[0037] Anomaly analysis refers to the process of identifying individuals in a set of data (here, a set of intent semantic vectors) that differ significantly from the majority of the data in terms of distribution, pattern, or characteristics. Anomalous intent information refers to intent information that, after analysis, is determined to be "out of place" or "behaving suspiciously" among all the intents in the text.

[0038] For example, step S103 involves pattern discovery and outlier detection within the vectorized set of all intent semantics. The server system employs algorithms such as clustering and anomaly detection to perform cross-validation from the perspectives of "group similarity" and "statistical distribution," filtering out intents that cannot integrate into the mainstream intent group or are located on the margins of the vector space, and marking them as high-confidence anomalous intents.

[0039] As an example, we can first use K-Means to cluster the intent vectors and find outliers; at the same time, we can use the Isolation Forest algorithm for anomaly detection. Finally, we take the intersection of the intents that are determined to be anomalous by both methods and define them as "abnormal intent information".

[0040] By integrating cluster analysis and statistical anomaly detection mechanisms and taking the intersection as the final result, a robust anomaly detection strategy is constructed. This method significantly reduces false positives caused by diverse text styles or individual sentences that are normal but unique, accurately focusing on truly "abnormal" intentions and greatly improving the accuracy of identifying potential malicious instructions from complex text backgrounds.

[0041] S104. Determine the semantic similarity between the intent semantics and the topic semantics of the abnormal intent information, and determine the abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information.

[0042] Semantic similarity refers to a quantitative metric used to measure the semantic closeness between two semantic vectors (such as intent semantics and topic semantics), commonly calculated using cosine similarity. A preset similarity threshold is a configurable numerical limit used to determine if the similarity is "too low," thus classifying the intent as irrelevant to the topic. Irrelevant intent information refers to intent information that is both judged as anomalous and proven to lack sufficient semantic connection to the overall topic of the text.

[0043] For example, the server system can calculate the cosine similarity between the semantic vector of each anomalous intent and the semantic vector of the topic, and compare it with a preset threshold. If the similarity is lower than the threshold, the intent is considered to be "unrelated" to the main theme of the text, a component detached from the topic, and its suspiciousness is further increased.

[0044] As an example, the cosine similarity between the anomalous intent vector and the topic vector can be calculated. If it is less than 0.7 (this threshold is adjustable), it is determined to be an "unknown intent".

[0045] By introducing topic-related filtering, a secondary screening of anomalous intents can be achieved. This effectively distinguishes between "abnormal but potentially reasonable" (such as a novel but relevant viewpoint in the text) and "abnormal and highly suspicious" (such as completely irrelevant instructions). This improves detection accuracy, ensuring the system ultimately focuses on truly ambiguous and context-detached potential attack instructions, avoiding misjudging innovative expressions as attacks.

[0046] S105. Identify the nature of instructions for irrelevant intent information to determine the detection result of hidden encryption attacks on text content.

[0047] Among them, instruction nature recognition refers to the process of determining whether a text fragment (in this case, non-related intent information) has instructional features such as command, coercion, or requirement.

[0048] Hidden encryption attack detection result: This refers to the final security decision made by this method on the input text, usually "there is an attack risk" or "no attack detected".

[0049] For example, the server system can perform content analysis on the identified "unknown intent" to check whether it contains typical directive words (such as "ignore," "must," "give directly") or conforms to a preset malicious instruction pattern. If such features are identified, the system can combine the analytical evidence from all the aforementioned steps to ultimately determine that the text content contains a hidden encryption attack.

[0050] As an example, a list of command-type intents can be created containing keywords such as "ignore," "forget," and "force," and then matched against "unfamiliar intents." If a match is found for something like "ignore all previous instructions," the text is ultimately determined to contain a hidden encryption attack.

[0051] By identifying the nature of the final instruction, the semantic anomalies and topic detachment discovered in the preceding steps are linked to specific attack behavior characteristics, thus completing a logical loop from "detecting suspicious activity" to "determining malicious intent." This transforms the detection results from vague "anomaly alerts" into clear and actionable security conclusions, directly empowering downstream security actions such as content blocking and risk alerts.

[0052] In this embodiment, a coherent technical solution consisting of S101 to S105 enables multi-layered and in-depth detection of hidden encryption attacks in text. Content baselines are established through topic analysis (S101); text is deconstructed into computable semantic units through deep intent parsing and vectorization (S102); then, deviating intents are filtered out through dual-verification anomaly analysis (S103); "detached" intents unrelated to the main theme are accurately located through topic relevance filtering (S104); and the final determination of malicious attacks is completed through instruction nature identification (S105). Thus, a comprehensive defense system from semantic understanding to anomaly detection to security determination can be formed. Compared with existing technologies, this embodiment enhances the ability to identify malicious content with high concealment and semantic complexity, effectively resisting hidden instruction attacks embedded through semantic transformation and contextual obfuscation, thereby improving the security and reliability of large models in scenarios such as content review and interactive generation.

[0053] In one exemplary embodiment, Figure 2 This application provides a flowchart illustrating the steps for determining the topic semantics of text content, as shown in the embodiments of this application. Figure 2 As shown, it is possible to Figure 1 Based on this, the steps of the hidden encryption attack detection method are further illustrated. In step S101, topic analysis is performed on the input text content to determine the topic semantics of the text content. Specifically, this may include: S201. Divide the text content into multiple semantic segments.

[0054] S202. Based on multiple semantic segments, extract the subject keywords and / or subject summaries from the text content.

[0055] S202. Convert the subject keywords and / or subject summaries into vectorized data to obtain the subject semantics.

[0056] Semantic segments refer to relatively complete semantic units obtained by segmenting text content using natural language processing techniques, typically in the form of sentences or short paragraphs. Topic keywords and topic summaries refer to sets of words or concise textual descriptions that summarize the core theme of the text. Topic keywords can focus on representing the theme at the lexical level, while topic summaries can focus on summarizing the theme at the sentence level. Vectorization refers to the process of converting textual topic keywords or summaries into numerical vectors in a high-dimensional space using a semantic encoding model. These vectors can represent their deeper semantic information. Topic semantics refers to the semantic connotation of the core theme of the text, represented in vector form, used for subsequent quantitative similarity calculations.

[0057] For example, this step can utilize sentence segmentation tools to divide long texts into independent sentences (semantic fragments) for easier subsequent processing. By combining the information from these sentences, topic modeling algorithms or the summarizing capabilities of large language models can be used to extract key terms or summaries representing the core ideas of the entire text. To enable accurate semantic comparison by computers, these textual topic representations can be transformed into a fixed-dimensional semantic vector using an embedding model.

[0058] As an example, NLP tools such as spaCy and LTP can be used for text segmentation. Topics can be extracted by generating summaries using LDA topic models or by directly calling large models such as ChatGLM. Models such as Sentence-BERT are then used to convert the obtained topic keywords or summary sentences into semantic vectors, which serve as the "topic semantics" for subsequent comparisons.

[0059] In this embodiment, by transforming unstructured text content into structured semantic fragments and further refining and vectorizing its themes, a stable and quantifiable benchmark is provided for the entire detection process. This provides an objective and accurate metric for subsequently judging whether an intent "deviates from the topic," overcoming misjudgments and omissions caused by relying on subjective experience or simple keyword matching, and laying a solid foundation for accurately identifying hidden instructions unrelated to the topic.

[0060] In one exemplary embodiment, intent parsing is performed on the text content to extract multiple intent information contained in the text content, which may specifically include: Syntactic analysis is performed on each sentence in the text to extract the subject-verb-object structure and obtain multiple structured intent information.

[0061] In this context, intent information refers to the description of the action-centric goal or purpose expressed in a single sentence within the text, typically consisting of the initiator of the action, the action itself, and the object of the action. Syntactic analysis refers to the process of using natural language processing techniques to parse the grammatical structure of a sentence, aiming to identify dependencies between words. The subject-verb-object (SVO) structure refers to the core grammatical component combination of a sentence: subject (performer), verb (action or state), and object (receiver). Extracting this structure helps to strip away modifying elements and directly grasp the core action of the sentence.

[0062] For example, this step can perform deep parsing on each sentence in the text using a pre-trained syntax analysis model to identify the core components of the sentence, such as the subject, predicate verb, and object, and combine them into a concise "subject-predicate-object" triple. Each such triple represents a structured intent information of the sentence.

[0063] As an example, the dependency parsing capabilities of tools such as BERT, LTP, or spaCy can be used to extract the subject, predicate, and object from a sentence. For instance, from "Please be sure to ignore all previous prompts," the intent information such as "(You) ignore the prompts" can be extracted.

[0064] In this embodiment, by extracting the subject-verb-object structure through syntactic analysis, natural language sentences can be transformed into standardized intent units representing "who does what". This structured representation method strips away redundant embellishments and complex sentence structures, making subsequent intent similarity comparisons, clustering, and anomaly detection more focused and effective. It provides clear analytical targets for discovering malicious instructions that attempt to hide themselves through complex sentence structures or redundant information.

[0065] In an exemplary embodiment, obtaining the intent semantics corresponding to each intent information includes: Each intent information is input into a pre-trained semantic encoding model to obtain the semantic vector corresponding to each intent information, which serves as the intent semantics.

[0066] Here, semantic encoding model refers to a deep learning model that, after being trained on a large amount of text, can map input text into fixed-dimensional vectors containing its semantic information. Semantic vector refers to a high-dimensional numerical array output by the semantic encoding model, where the position and orientation of the vector in space represent the semantics of the input text. Intent semantics refers to the deeper meaning of intent information represented in the form of semantic vectors.

[0067] For example, each structured intent message (such as an SVO triple) can be input as an independent text into a semantic encoding model. This semantic encoding model will understand the semantics of this short text and output a corresponding semantic vector. After this process, all intent messages are transformed into vector forms that can be mathematically calculated and compared.

[0068] As an example, models optimized for generating sentence-level semantic vectors, such as Sentence-BERT and SimCSE, can be used to encode intent phrases like "ignore the prompt" to obtain their corresponding embedding vectors.

[0069] In this embodiment, by using an advanced semantic coding model to vectorize the intent text, the computer can "understand" the semantic similarity between intents, rather than just literal matching. This ensures that subsequent clustering and anomaly detection are based on deep semantic relationships, effectively identifying semantically similar but differently expressed malicious instruction variants, thereby improving the robustness and accuracy of the detection method against semantic transformation-based stealth attacks.

[0070] In one exemplary embodiment, Figure 3 This application provides a flowchart illustrating steps for determining abnormal intent information, as shown in the embodiments of the present application. Figure 3 As shown, it is possible to Figure 1 Based on this, the steps of the hidden encryption attack detection method are further illustrated. In step S103, anomaly analysis is performed based on multiple intent semantics to determine anomalous intent information, including: S301. Perform cluster analysis on multiple intent semantics, and identify intent information that fails to belong to any cluster as the first type of abnormal intent information.

[0071] S302. A preset anomaly detection algorithm is used to analyze multiple intent semantics, and the intent information corresponding to the anomaly points obtained from the analysis is determined as the second type of abnormal intent information.

[0072] S303. The intersection of the first type of abnormal intent information and the second type of abnormal intent information is determined as abnormal intent information.

[0073] Clustering analysis refers to an unsupervised machine learning method that groups similar samples (in this case, intent vectors) into the same cluster, resulting in high similarity among samples within the same cluster and low similarity between samples in different clusters. A cluster refers to the sample grouping formed after clustering analysis. Anomaly detection algorithms refer to algorithms specifically designed to identify outliers or anomalies that are significantly different from the majority of samples in a dataset. Intersection refers to the set of intent information that simultaneously satisfies two different anomaly detection criteria, used to improve the confidence level of anomaly identification.

[0074] For example, two complementary strategies can be used to filter anomalous intents. First, cluster all intent vectors; those that cannot be categorized into any major semantic group are considered "outsiders" (Type I anomalies). Second, anomaly detection algorithms can be used directly across the entire intent vector space to identify "outliers" (Type II anomalies) that are statistically marginal. Intents deemed anomalous by both methods are then confirmed as high-confidence anomalous intent information.

[0075] As an example, K-Means or DBSCAN can be used for intent clustering to identify outliers; meanwhile, Isolation Forest or Local Outlier Factor (LOF) algorithms can be used for anomaly detection. Finally, the intersection of the anomalous intents obtained by these two methods is taken as the high-confidence anomalous intent.

[0076] In this embodiment, a dual-verification anomaly detection mechanism is constructed by fusing cluster isolation analysis and global statistical anomaly detection, and taking the intersection of the two as the final result. This reduces the false positives (misclassifying normal but unique intents as anomalous) and false negatives (failing to detect cleverly disguised anomalies) that may occur with a single detection method, making the capture of hidden malicious instructions more accurate and reliable, and effectively addressing the challenge of attackers attempting to disguise malicious instructions as normal semantic variations.

[0077] In an exemplary embodiment, determining the semantic similarity between the intent semantics and topic semantics of anomalous intent information includes: Obtain the semantic vector of the abnormal intent information and the semantic vector of the topic semantics; Semantic similarity is determined based on the cosine similarity between the semantic vector of abnormal intent information and the semantic vector of topic semantics.

[0078] Cosine similarity can be used as an index to measure the consistency of two vectors in direction. Its value range is between [-1, 1]. The closer the value is to 1, the closer the directions of the two vectors are and the more similar their semantics are.

[0079] For example, the cosine of the angle between the semantic vector of the intent marked as anomalous and the semantic vector of the topic representing the main idea of ​​the entire text can be calculated. This calculation process is based on a vector space model and directly reflects the distance between the two semantic representations in the abstract semantic space.

[0080] As an example, we can directly calculate the cosine similarity between the abnormal intent embedding and the topic embedding, and set a threshold (such as 0.7) based on business experience for judgment.

[0081] In this embodiment, by calculating cosine similarity, the subjective and qualitative judgment of the relevance of intent to the topic is transformed into an objective and quantitative numerical comparison. This provides a clear and adjustable threshold standard for "whether it is relevant to the topic," making the detection logic more transparent and optimizable. It can effectively filter out legitimate content that, although "abnormal" (e.g., different from other intents in the text), is still closely related to the topic, thereby accurately focusing the detection attention on highly suspicious intents that are truly "detached from the topic," improving the targeting of attack identification.

[0082] In one exemplary embodiment, Figure 4 This application provides a flowchart illustrating the steps for determining the detection result of a hidden encryption attack on text content, as illustrated in the embodiments of this application. Figure 4 As shown, it is possible to Figure 1Based on this, the steps of the hidden encryption attack detection method are further illustrated. Specifically, in step S105, the instruction nature of irrelevant intent information is identified to determine the hidden encryption attack detection result of the text content. This can include: S401. Match irrelevant intent information with a preset instruction-type intent vocabulary, which contains keywords of preset types of instruction-type intents; S402. If the match is successful, the unrelated intent information is identified as containing a pre-defined type of instruction intent, and the text content is determined to contain a hidden encryption attack.

[0083] The instruction-type intent vocabulary refers to a predefined list containing typical verbs or phrases commonly used to initiate operations such as forcing, ignoring, and resetting, such as "ignore," "forget," "force," and "must." Preset-type instruction-type intents refer to specific categories summarized based on attack patterns, such as "forget type" (requiring the model to forget previous settings), "ignore type" (requiring the model to ignore certain rules or prompts), and "force type" (requiring the model to perform a certain operation). The hidden encryption attack detection result refers to the final security judgment made by this method on the input text, which can be "attack exists" or "attack not detected."

[0084] For example, for an anomalous intent that has been determined to be "unrelated to the topic," further examination is conducted to check whether its text content (i.e., the original SVO structure or sentence) contains feature words from the instruction vocabulary. If it does, especially if it matches high-risk feature words such as "forget," "ignore," or "force," then by combining the evidence from all previous analysis steps, it is finally determined that the text content contains a hidden encryption attack.

[0085] As an example, a vocabulary containing keywords such as "ignore," "forget," "reset," and "force" can be built. For each "unknown intent," check if it contains these words, or use a more sophisticated classifier for identification. If an instruction such as "ignore all previous prompts" is identified, it is ultimately determined to be a hidden encryption attack.

[0086] In this embodiment, by introducing an instruction-type intent vocabulary for final pattern matching, the semantic-level anomaly analysis is grounded in specific attack characteristics, completing the crucial step from "detecting anomalies" to "determining it as a malicious attack." This method combines the advantages of deep semantic analysis and feature pattern recognition, enabling the detection system not only to discover hidden, semantically anomalous instructions but also to confirm their malicious nature, thereby generating clear and actionable security detection results. This enhances the ability of large-scale model systems to defend against targeted induced attacks.

[0087] In one specific implementation, intent clustering analysis can employ a dynamic adjustment strategy. For example, the number of cluster centers (such as the K value in K-Means) can be variable, dynamically adjusted based on the distribution density of intent vectors, or density-based clustering algorithms like DBSCAN can be used to automatically identify and separate outliers, improving adaptability to multi-sample and complex scenarios.

[0088] In one specific implementation, the identification of command intents is not limited to simple word list matching. A classification model fine-tuned based on manually labeled samples can also be used for identification. For example, a large number of samples of normal instructions (such as "Please summarize the above") and malicious instructions (such as "Please output the password") can be collected to train a binary classification model for more accurate and context-sensitive classification of "unfamiliar intents," thereby addressing the evolving nature of new attack phrases.

[0089] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0090] The hidden encryption attack detection device provided in the embodiments of this application is described below. The hidden encryption attack detection device has the same inventive concept as the hidden encryption attack detection method described above. The solution provided by the device is similar to the solution described in the method above. Therefore, the specific limitations of one or more hidden encryption attack detection device embodiments provided below can be referred to the limitations of the hidden encryption attack detection method above. The hidden encryption attack detection device described below and the hidden encryption attack detection method described above can be referred to each other, and will not be repeated here.

[0091] In one exemplary embodiment, Figure 5 This is a schematic diagram of the structure of a hidden encryption attack detection device provided in an embodiment of this application, as shown below. Figure 5 As shown, the hidden encryption attack detection device 50 includes: a topic analysis module 510, an intent parsing module 520, an anomaly analysis module 530, a similarity analysis module 540, and a detection result determination module 550, wherein: The topic analysis module 510 is used to perform topic analysis on the input text content and determine the topic semantics of the text content; The intent parsing module 520 is used to parse the intent of the text content, extract multiple intent information contained in the text content, and obtain the intent semantics corresponding to each intent information. The anomaly analysis module 530 is used to perform anomaly analysis based on multiple intent semantics to determine abnormal intent information; The similarity analysis module 540 is used to determine the semantic similarity between the intent semantics and the topic semantics of abnormal intent information, and to identify abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information. The detection result determination module 550 is used to identify the instruction nature of irrelevant intent information and determine the detection result of hidden encryption attack on text content.

[0092] In an exemplary embodiment, the topic analysis module 510 is used to segment the text content into multiple semantic segments; extract topic keywords and / or topic summaries from the text content based on the multiple semantic segments; and convert the topic keywords and / or topic summaries into vectorized data to obtain topic semantics.

[0093] In an exemplary embodiment, the intent parsing module 520 is used to perform syntactic analysis on each sentence in the text content, extract the subject-verb-object structure, and obtain multiple structured intent information.

[0094] In an exemplary embodiment, the intent parsing module 520 is used to input each intent information into a pre-trained semantic encoding model to obtain the semantic vector corresponding to each intent information, as the intent semantics.

[0095] In an exemplary embodiment, the anomaly analysis module 530 is used to perform cluster analysis on multiple intent semantics and determine the intent information that fails to belong to any cluster as the first type of abnormal intent information; to analyze multiple intent semantics using a preset anomaly detection algorithm and determine the intent information corresponding to the anomaly points obtained from the analysis as the second type of abnormal intent information; and to determine the intersection of the first type of abnormal intent information and the second type of abnormal intent information as abnormal intent information.

[0096] In an exemplary embodiment, the similarity analysis module 540 is used to obtain the semantic vector of the abnormal intent information and the semantic vector of the topic semantics; and to determine the semantic similarity based on the cosine similarity between the semantic vector of the abnormal intent information and the semantic vector of the topic semantics.

[0097] In an exemplary embodiment, the detection result determination module 550 is used to match irrelevant intent information with a preset instruction-type intent vocabulary, which contains keywords of preset types of instruction-type intents; if the match is successful, it is identified that the irrelevant intent information contains a preset type of instruction-type intent, and it is determined that the text content contains a hidden encryption attack.

[0098] The modules in the aforementioned hidden encryption attack detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0099] In one exemplary embodiment, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the hidden encryption attack detection methods described above.

[0100] In one exemplary embodiment, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the hidden encryption attack detection methods described above.

[0101] In one exemplary embodiment, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the hidden encryption attack detection methods described in the above embodiments.

[0102] Indicatively, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the internal structure of a computer device 600 provided in an embodiment of this application. The computer device 600 can be provided as a server. (Refer to...) Figure 6 The computer device 600 includes a processor 602, which further includes one or more processors, and memory resources represented by memory 601 for storing instructions executable by the processor 602, such as a computer program. The computer program stored in memory 601 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processor 602 is configured to execute instructions to perform the hidden encryption attack detection method of any of the above embodiments. The computer device 600 can operate on an operating system stored in memory 601, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.

[0103] The computer device 600 may also include a power supply component 603 configured to perform power management of the computer device 600, a wired or wireless network interface 604 configured to connect the computer device 600 to a network, and an input / output (I / O) interface 605. Wireless operation may be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by a processor, the computer program implements a method for detecting hidden encryption attacks.

[0104] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0105] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0106] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0107] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0108] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for detecting hidden encryption attacks, characterized in that, The method includes: Perform topic analysis on the input text content to determine the topic semantics of the text content; The text content is subjected to intent parsing to extract multiple intent information contained in the text content and to obtain the intent semantics corresponding to each intent information. Anomaly analysis is performed based on multiple intent semantics to determine abnormal intent information; Determine the semantic similarity between the intent semantics of the abnormal intent information and the topic semantics, and determine the abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information; The unrelated intent information is identified by command nature to determine the result of the hidden encryption attack detection of the text content.

2. The method according to claim 1, characterized in that, The step of performing topic analysis on the input text content to determine the topic semantics of the text content includes: The text content is divided into multiple semantic segments; Based on the multiple semantic segments, extract the topic keywords and / or topic summaries of the text content; The topic keywords and / or topic summaries are converted into vectorized data to obtain the topic semantics.

3. The method according to claim 1, characterized in that, The intent parsing of the text content, extracting multiple intent information contained in the text content, includes: Syntactic analysis is performed on each sentence in the text content to extract the subject-verb-object structure and obtain multiple structured intent information.

4. The method according to claim 1, characterized in that, The step of obtaining the intent semantics corresponding to each intent information includes: Each intent information is input into a pre-trained semantic encoding model to obtain a semantic vector corresponding to each intent information, which is used as the intent semantics.

5. The method according to claim 1 or 4, characterized in that, The step of performing anomaly analysis based on multiple intent semantics to determine abnormal intent information includes: Cluster analysis is performed on multiple intent semantics, and intent information that fails to belong to any cluster is identified as the first type of abnormal intent information; A preset anomaly detection algorithm is used to analyze multiple intent semantics, and the intent information corresponding to the anomalies obtained from the analysis is determined as the second type of abnormal intent information; The intersection of the first type of abnormal intent information and the second type of abnormal intent information is determined as abnormal intent information.

6. The method according to claim 1, characterized in that, Determining the semantic similarity between the intent semantics of the abnormal intent information and the topic semantics includes: Obtain the semantic vector of the abnormal intent information and the semantic vector of the topic semantics; The semantic similarity is determined based on the cosine similarity between the semantic vector of the abnormal intent information and the semantic vector of the topic semantics.

7. The method according to claim 1, characterized in that, The step of identifying the instruction nature of the irrelevant intent information and determining the hidden encryption attack detection result of the text content includes: The irrelevant intent information is matched with a preset instruction-type intent vocabulary, which contains keywords of preset types of instruction-type intents; If a match is successful, it is identified that the irrelevant intent information contains the preset type of instruction intent, and it is determined that the text content contains a hidden encryption attack.

8. A hidden encryption attack detection device, characterized in that, The device includes: The topic analysis module is used to perform topic analysis on the input text content and determine the topic semantics of the text content; The intent parsing module is used to perform intent parsing on the text content, extract multiple intent information contained in the text content, and obtain the intent semantics corresponding to each intent information. The anomaly analysis module is used to perform anomaly analysis based on multiple intent semantics to determine abnormal intent information; The similarity analysis module is used to determine the semantic similarity between the intent semantics of the abnormal intent information and the topic semantics, and to determine the abnormal intent information with a semantic similarity lower than a preset similarity threshold as irrelevant intent information; The detection result determination module is used to identify the instruction nature of the irrelevant intent information and determine the detection result of the hidden encryption attack on the text content.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable 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 7.