Large model security protection system and method, electronic equipment and storage medium

By implementing real-time analysis and lightweight detection through a layered protection architecture, the problem of high resource consumption in large-scale security protection systems is solved, achieving a balance between efficient security protection and throughput performance.

CN121144005APending Publication Date: 2025-12-16BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511109909.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing large-scale model security protection systems consume excessive computing resources, reduce overall system throughput, and drastically increase operating costs when performing deep security checks on every user input.

Method used

It adopts a layered protection architecture, including a real-time analysis module and a semantic analysis module. It quickly matches and blocks obvious malicious requests through a preset protection rule base, identifies suspicious requests with a lightweight detection algorithm, and optimizes resource allocation by combining priority calculation and scheduling circuit breaker mechanism.

Benefits of technology

It significantly reduced the consumption of computing resources, ensured the stability of the overall system throughput performance, and achieved a balanced optimization of security protection and operational performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144005A_ABST
    Figure CN121144005A_ABST
Patent Text Reader

Abstract

According to the large model security protection system and method, the electronic equipment and the storage medium provided by the embodiment of the invention, the large model security protection system effectively solves the resource efficiency problem caused by a traditional full-amount detection mode through an innovative layered protection architecture. The system adopts a layered protection mechanism to realize accurate protection, specifically, a real-time analysis module quickly intercepts obvious malicious requests through rule base matching, most of the requests are quickly released in a microsecond-level delay manner, and a subsequent complicated semantic analysis process is not needed; the semantic analysis module adopts a lightweight detection algorithm, and context semantic threat recognition can be completed by consuming less computing power resources for a small number of doubt requests so as to realize interception; the hierarchical processing mechanism ensures the stability of the overall throughput performance of the system while obviously reducing the occupation of computing resources, and realizes the balance optimization of safety protection and operation performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of security protection technology, and in particular to a large-scale security protection system, method, electronic device and storage medium. Background Technology

[0002] Large AI models, or simply large models, refer to a class of artificial intelligence models with a large number of parameters built from artificial neural networks. A relatively new concept that has emerged in the last decade, large AI models typically undergo pre-training on massive datasets using self-supervised or semi-supervised learning. Their performance and capabilities are then further optimized through fine-tuning of instructions and human alignment. Large models are characterized by a large number of parameters, large training data sets, and significant computational resources. They possess the ability to solve general tasks, follow human instructions, and perform complex reasoning. The main categories of large AI models include: large language models, large visual models, multimodal large models, and large basic science models.

[0003] Currently, large-scale models have been widely applied in various fields, including search engines, intelligent agents, related vertical industries, and basic science, driving the intelligent development of various industries. However, with the accelerated implementation of these technologies, malicious attacks targeting large-scale models are growing exponentially. Mainstream industry defense solutions generally employ a full-request deep review mechanism, which involves performing deep security checks on every user input through the security protection system. This indiscriminate deep analysis of all requests consumes massive amounts of computing resources, leading to a decrease in overall system throughput and a sharp increase in operating costs. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a large-scale model security protection system, method, electronic device, and storage medium, which can effectively solve the above-mentioned technical problems.

[0005] In a first aspect, embodiments of the present invention provide a large model security protection system, which includes: a request receiving module, a real-time analysis module, a semantic analysis module, and a request sending module connected in sequence;

[0006] The request receiving module is used to receive user requests sent by users in real time, perform business analysis on the request big model, and send the user requests to the real-time detection module.

[0007] The real-time analysis module is used to match user requests with each protection rule in the preset protection rule library to obtain matching results. The matching results are then detected. If a high-risk result is detected, the user request is blocked. If a clean result is detected, the user request is sent to the request sending module to be sent to the big model. If a suspicious result is detected, the user request is sent to the semantic detection module.

[0008] The semantic analysis module is used to perform semantic risk detection on user requests, obtain the risk level, detect whether the risk level is high-risk, block the user request when the risk level is high-risk, and send the user request to the request sending module when the risk level is not high-risk, so as to send it to the large model.

[0009] In one possible implementation, the semantic analysis module includes a semantic analysis model;

[0010] Perform semantic risk detection on user requests to obtain risk levels, including:

[0011] The user request is input into the semantic analysis model, which compares the user request with the content of each preset attack pattern, calculates each similarity value, and uses the highest similarity value to determine the risk level from the risk level storage table. The semantic analysis model outputs the risk level; the risk level storage table stores the correspondence between similarity value ranges and risk levels.

[0012] In one possible implementation, the request sending module includes a connection priority calculation unit and a scheduling circuit breaker unit;

[0013] The priority calculation unit is used to determine the priority score based on the user request and send the priority score to the scheduling circuit breaker unit;

[0014] The scheduling circuit breaker unit is used to obtain the current load of the large model system and send user requests to the large model according to the current load and priority score; where the large model system is the server that deploys the large model.

[0015] In one possible implementation, determining a priority score based on a user request includes:

[0016] The user request is parsed to extract the user's user identification information.

[0017] Retrieve the risk profile score corresponding to the user identification information from the profile storage table; the profile storage table stores the correspondence between user identification information and risk profile scores.

[0018] Retrieve the user credit score corresponding to the user identification information from the user credit storage table; the user credit storage table stores the correspondence between user identification information and user credit scores.

[0019] Input the user request into the pre-trained resource consumption model and receive the resource consumption value corresponding to the user request output by the resource consumption model;

[0020] The priority score is determined by weighting the resource consumption value, risk profile score, and user credit score.

[0021] In one possible implementation, sending user requests to the large model based on current load and priority score includes:

[0022] Detect whether the current load is higher than the preset load;

[0023] When the current load is detected to be higher than the preset load, user requests with priority scores higher than the preset scores are sent to the large model;

[0024] When the current load is detected to be no higher than the preset load, user requests are queued and sent to the large model according to their priority scores.

[0025] In one possible implementation, the large model security protection system also includes a risk data asynchronous distribution module connected to the semantic analysis module and the real-time analysis module, as well as a message queue connected to the risk data asynchronous distribution module.

[0026] The asynchronous risk data distribution module is used to send high-risk matching results, user requests with a high risk level, and corresponding behavior logs to the message queue.

[0027] In one possible implementation, the large model security protection system also includes an offline profile generation and update module and an offline credit generation and update module connected to a message queue;

[0028] The offline profile generation and update module is used to periodically retrieve behavior logs from the message queue, extract multiple user behavior risk quantification features from the behavior logs, input the multiple user behavior risk quantification features into the risk profile model, the risk profile model outputs the user's new risk profile score, and write the new risk profile score into the profile storage table for replacement and update; wherein, the user behavior risk quantification features include at least: frequency and intensity features, content and intent features, resource consumption features, and context and sequence features.

[0029] The offline credit generation and update module is used to periodically retrieve user requests from the message queue, obtain multiple user credit data of the user from the business system based on the user requests, convert each user credit data into a data score, perform a weighted calculation on multiple data scores to obtain the user's new user credit score, and write the new user credit score into the user credit storage table for replacement and update; wherein, the user credit data includes at least identity authentication level data, payment level data, account history data, and platform contribution data.

[0030] Secondly, embodiments of the present invention provide a method for large model security protection, which is applied to the aforementioned large model security protection system, and the method includes:

[0031] Real-time reception of user requests and analysis of large-scale user models;

[0032] The user request is matched against each protection rule in the preset protection rule base to obtain the matching result;

[0033] Perform result checks on the matching results;

[0034] If a high-risk matching result is detected, the user's request will be blocked.

[0035] If the detected matching result is innocent, the user request will be sent to the request sending module and then sent to the large model.

[0036] If a matching result is detected as suspicious, semantic risk detection is performed on the user request to obtain the risk level;

[0037] To determine whether the risk level is high-risk;

[0038] When a high-risk level is detected, steps are taken to block user requests.

[0039] If the detected risk level is not high-risk, the step of sending the user request to the request sending module is executed to send it to the large model.

[0040] Thirdly, embodiments of the present invention provide a device for large model security protection, which is applied to the aforementioned large model security protection system. The device includes:

[0041] The receiving module is used to receive user requests sent by users in real time and perform business analysis on the large model of user requests.

[0042] The matching module is used to match user requests with each protection rule in the preset protection rule base to obtain the matching results;

[0043] The first detection module is used to perform result detection on the matching results;

[0044] The blocking protection module is used to block user requests if a high-risk matching result is detected.

[0045] The sending module is used to send the user request to the request sending module when the detected matching result is innocent, so that it can be sent to the large model;

[0046] The semantic risk detection module is used to perform semantic risk detection on user requests and obtain the risk level if a suspicious matching result is detected.

[0047] The second detection module is used to detect whether the risk level is high-risk.

[0048] The first execution module is used to execute steps to block user requests when a high-risk level is detected.

[0049] The second execution module is used to execute the step of sending the user request to the request sending module to send it to the large model when the detected risk level is not high-risk.

[0050] Fourthly, embodiments of the present invention provide an electronic device, comprising: a processor and a memory, wherein the processor is configured to execute a program for large model security protection stored in the memory, so as to implement the above-described method for large model security protection.

[0051] Fifthly, embodiments of the present invention provide a storage medium, wherein the storage medium stores one or more programs, which can be executed by one or more processors to implement the above-described method for large model security protection.

[0052] The large-scale model security protection system, method, electronic device, and storage medium provided in this invention effectively solve the resource efficiency problem caused by the traditional full-scale detection mode through an innovative layered protection architecture. The system adopts a layered protection mechanism to achieve precise protection. Specifically, the real-time analysis module quickly intercepts obviously malicious requests through rule base matching, with the vast majority of requests being quickly allowed with a microsecond delay, eliminating the need for subsequent complex semantic analysis processes. The semantic analysis module uses a lightweight detection algorithm, consuming minimal computing resources to complete contextual semantic threat identification and interception for a small number of suspicious requests. This hierarchical processing mechanism significantly reduces computing resource consumption while ensuring the stability of the overall system throughput performance, achieving a balanced optimization of security protection and operational performance. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the structure of a large-scale model security protection system provided in an embodiment of the present invention;

[0054] Figure 2 This is a schematic diagram of another large-scale model security protection system provided in an embodiment of the present invention;

[0055] Figure 3 A flowchart illustrating an embodiment of a method for large-scale model security protection provided by this invention;

[0056] Figure 4A block diagram illustrating an embodiment of a device for large-scale model security protection provided by an embodiment of the present invention;

[0057] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0060] This invention provides a large-scale model security protection system, such as... Figure 1 The diagram shows a structural schematic of a large-scale model security protection system, which includes a request receiving module 101, a real-time analysis module 102, a semantic analysis module 103, and a request sending module 104 connected in sequence.

[0061] In specific implementation, the request receiving module is used to receive user requests sent by users in real time, perform business analysis on the request big model, and send the user requests to the real-time detection module.

[0062] The real-time analysis module matches user requests against each protection rule in the preset protection rule base to obtain matching results. It then performs result detection on the matching results. If a high-risk result is detected, the user request is blocked. If a clean result is detected, the user request is sent to the request sending module to be sent to the large model. If a questionable result is detected, the user request is sent to the semantic detection module. The semantic analysis module performs semantic risk detection on user requests to obtain a risk level. It checks whether the risk level is high-risk. If a high-risk level is detected, the user request is blocked. If a non-high-risk level is detected, the user request is sent to the request sending module to be sent to the large model.

[0063] The aforementioned request receiving module serves as the entry point for the large-scale security protection system. It is responsible for receiving original user requests carrying identification parameters such as user and device identification information, and establishing a request tracking link to ensure traceability. This module employs an asynchronous, non-blocking design to guarantee real-time performance in high-concurrency scenarios. These user requests are not limited to requests for answers to inquiries, technical support, after-sales service, and the integration of internal enterprise documents to provide employees with services such as information retrieval, report generation, and data analysis.

[0064] The real-time analysis module can quickly match a pre-defined protection rule base through the rule engine. This pre-defined rule base includes high-risk rules, questionable rules, and clean rules. High-risk rules refer to a set of content verified and confirmed by the security team that targets known malicious attack patterns or high-risk system vulnerabilities. Typical high-risk rules include sensitive word blacklists and API (Application Programming Interface) call frequency restrictions. Questionable rules refer to a set of content that does not yet constitute a clear attack but has the potential to pose a security threat. Typical questionable rules include low-frequency probing attacks and atypical access paths. Clean rules refer to a set of content that completely lacks malicious attack patterns or high-risk system vulnerabilities.

[0065] A multi-level caching mechanism is employed to accelerate rule matching. User requests that hit high-risk rules (i.e., those matching "high-risk results," such as those containing hint words) are immediately blocked from being sent to the main model. In practice, most user requests are quickly allowed through the real-time analysis module with a microsecond delay, without needing to enter the subsequent semantic analysis process, thus ensuring extremely high system performance and user experience. User requests that hit questionable rules (i.e., those matching "questionable results") are sent to the semantic analysis module for further detection and analysis. User requests that hit innocent rules (i.e., those matching "innocent results") can be directly sent to the request sending module to be sent to the main model.

[0066] The semantic analysis module uses a lightweight model to analyze the contextual semantics of questionable user requests, identifying advanced threats such as logical traps and homophonic variations. It outputs a risk level to provide data for deep detection. A high-risk level indicates a security risk in the user request, requiring blocking. A low-risk level indicates a safe user request, which does not require blocking and can be sent to the request sending module for transmission to the larger model.

[0067] This large-scale security protection system effectively solves the resource efficiency problem caused by the traditional full-scale detection mode through an innovative layered protection architecture. The system adopts a layered protection mechanism to achieve precise protection. Specifically, the real-time analysis module quickly intercepts obviously malicious requests through rule base matching, and the vast majority of requests are quickly allowed with a microsecond delay, without the need for subsequent complex semantic analysis processes; the semantic analysis module uses a lightweight detection algorithm, which can complete the contextual semantic threat identification and interception for a small number of suspicious requests with minimal computing resources; this hierarchical processing mechanism significantly reduces the consumption of computing resources while ensuring the stability of the overall system throughput performance, achieving a balanced optimization of security protection and operational performance.

[0068] In practical applications, the aforementioned semantic analysis module 103 utilizes its included semantic analysis model to perform semantic risk detection on user requests and obtain risk levels. The specific implementation process is as follows: the user request is input into the semantic analysis model, the semantic analysis model compares the user request with the content of each preset attack mode, calculates each similarity value, uses the highest similarity value to determine the risk level from the risk level storage table, and the semantic analysis model outputs the risk level.

[0069] It should be noted that user requests are input into the semantic analysis model in vector form, and the content of each preset attack mode is also in vector form. In this embodiment, semantic cosine similarity can be calculated between the user request and the content of each preset attack mode to obtain the similarity value between the user request and each preset attack mode content.

[0070] The aforementioned risk level storage table stores the correspondence between similarity value ranges and risk levels. This risk level storage table may be a database table, an Excel spreadsheet, a configuration file, or other data structure; no specific limitation is made here. For ease of understanding, we will take a similarity value in the 0-1 range as an example, as shown in Table 1:

[0071] Table 1

[0072] Similarity value range Risk level [0.7,1.0] High risk level [0,0.7) Low risk level

[0073] It should be noted that the above-described mapping relationship between similarity value ranges and risk levels is only an example. The specific mapping relationship between similarity value ranges and risk levels can be set according to actual needs, and is not limited here.

[0074] Since a higher similarity value indicates a greater security risk, the highest similarity value is found from multiple similarity values. Then, Table 1 is consulted to determine the risk level of the user's request, and the semantic analysis model outputs the retrieved risk level. The above description explains the implementation principle of the semantic analysis model outputting the risk level. Typically, this semantic analysis model is trained using a set of historical user requests labeled with risk levels on a semantic model (such as a neural network, a long short-term memory network temporal model, or a series of Transformer-based bidirectional encoder representation models).

[0075] exist Figure 1 On this basis, Figure 2 A schematic diagram of another large-scale security protection system is shown, such as... Figure 2 As shown, the request sending module 104 includes a priority calculation unit 201 and a scheduling circuit breaker unit 202. These two units are used to send user requests to the large model. Specifically, the priority calculation unit is used to determine the priority score based on the user request and send the priority score to the scheduling circuit breaker unit. The scheduling circuit breaker unit is used to obtain the current load of the large model system and send the user request to the large model according to the current load and the priority score. The large model system is the server that deploys the large model.

[0076] In practical applications, determining priority scores based on user requests includes: parsing the user request to extract the user's identifier information; searching for the risk profile score corresponding to the user identifier information in the profile storage table (wherein, the profile storage table stores the correspondence between user identifier information and risk profile scores); searching for the user credit score corresponding to the user identifier information in the user credit storage table (wherein, the user credit storage table stores the correspondence between user identifier information and user credit scores); inputting the user request into a pre-trained resource consumption model and receiving the resource consumption value corresponding to the user request output by the resource consumption model; and performing a weighted calculation on the resource consumption value, risk profile score, and user credit score to determine the priority score.

[0077] User identification information is a unique identifier for a user and can be either a User ID (Identity Document) or a username; no specific restriction is imposed here. In practical applications, the user identification information for each user is used as the primary key, and its corresponding risk profile score is stored in a profile storage table. Therefore, by requesting the user's corresponding user identification information, the risk profile score associated with that user identification information can be retrieved from the profile storage table. This can be understood as the risk profile score representing the user's dynamic behavioral risk; a higher score indicates a greater risk associated with the user's request, and vice versa.

[0078] Similarly, by using each user's identifier as the primary key and storing their corresponding credit score in a user credit storage table, a user's credit score can be retrieved from the user credit storage table based on their user identifier. This can be understood as the user's credit score representing their static identity and business value; a high credit score indicates the user is more important to the platform, and their requests should be prioritized, and vice versa.

[0079] The resource consumption model described above is trained using a set of historical user requests labeled with resource consumption values. When a user request is input into this model, it can accurately output the corresponding resource consumption value. This value accurately reflects the amount of computational resources required by the large model system to process the user request; a higher value indicates more technical resources are needed, and vice versa.

[0080] Priority scores, a crucial metric for request scheduling, directly determine the order in which requests are sent to the large model: higher-scoring user requests will enter the large model first, while lower-scoring requests may be dropped or downgraded. Priority scores can be calculated using the following formula: Priority Score = Weight 1 * Resource Consumption Value + Weight 2 * Risk Profile Score + Weight 3 * User Credit Score; where the weight values ​​can be set according to actual needs and are not limited here. This mechanism ensures that high-priority tasks receive timely responses.

[0081] The above-mentioned method of sending user requests to the large model based on current load and priority scores includes:

[0082] Detect whether the current load is higher than the preset load; if the current load is higher than the preset load, send user requests with priority scores higher than the preset scores to the large model; if the current load is not higher than the preset load, queue user requests according to their priority scores and send them to the large model.

[0083] The preset load is the maximum load that the large model system can operate normally under pre-defined conditions. When the current load is higher than the preset load, it indicates that the large model system is overloaded. In order to ensure the completion of core requests, only user requests with priority scores higher than the preset score are allowed to be sent to the large model for processing. When the current load is higher than the preset load, it indicates that the large model system is in a normal state. The priority queue can be enabled to sort all user requests from high to low scores and send them to the large model for processing according to the first-in-first-out principle.

[0084] like Figure 2As shown, the large model security protection system also includes a risk data asynchronous distribution module 203 connected to the semantic analysis module 103 and the real-time analysis module 102, and a message queue 204 connected to the risk data asynchronous distribution module 203.

[0085] The aforementioned asynchronous risk data distribution module is used to send high-risk matching results, user requests with a high-risk level, and corresponding behavior logs to the message queue. This is used for the generation and updating of offline risk profile scores and user credit scores. In practical applications, the generation and updating of these offline risk profile scores and user credit scores can be implemented by the offline profile generation and update module 205 and the offline credit score generation and update module 206, which are connected to the message queue 204.

[0086] Specifically, the offline profile generation and update module is used to periodically retrieve behavior logs from the message queue, extract multiple user behavior risk quantification features from the behavior logs, input these features into the risk profile model, and output a new risk profile score for the user. The new risk profile score is then written into the profile storage table for replacement and update. The user behavior risk quantification features include at least: frequency and intensity features, content and intent features, resource consumption features, and context and sequence features. The offline credit generation and update module is used to periodically retrieve user requests from the message queue, retrieve multiple user credit data from the business system based on the user requests, convert each user credit data into a data score, perform a weighted calculation on the multiple data scores to obtain a new user credit score, and write the new user credit score into the user credit storage table for replacement and update. The user credit data includes at least identity authentication level data, payment level data, account history data, and platform contribution data.

[0087] The offline profile generation and update module consumes and aggregates the behavior logs of all high-risk users from a message queue (such as Kafka). This module does not directly use the raw logs; instead, it performs feature engineering to extract quantifiable metrics that describe the risk of user behavior. These quantifiable risk features serve as input to the risk profile model.

[0088] Key feature examples:

[0089] 1. Frequency and intensity characteristics:

[0090] 1) req_per_minute: The request rate in recent times (e.g., the past 5 minutes).

[0091] 2) suspicious_req_ratio: The proportion of requests that are judged as "suspicious" out of the total number of requests.

[0092] 3) blocked_req_count: The number of requests that have been directly blocked by the system recently.

[0093] 2. Content and Intent Characteristics:

[0094] 1) prompt_similarity_avg: The average semantic similarity between consecutive prompts to the user. A high similarity may indicate fine-tuning of aggressive prompts.

[0095] 2) prompt_perplexity_avg: The average complexity or "unnaturalness" of the prompt words. Calculated by a semantic model, highly confusing or meaningless text will score higher.

[0096] 3) topic_entropy: The entropy of the topic asked by the user. Extremely low entropy indicates that the same question is asked repeatedly, while extremely high entropy indicates that the topic jumps very quickly. Both may indicate anomalies.

[0097] 3. Resource consumption characteristics:

[0098] 1) resource_pred_avg: The average value of resource consumption for all user requests.

[0099] 2) resource_pred_max: The highest resource consumption value in the user's historical requests.

[0100] 4. Context and sequence features:

[0101] 1) session_length: The average length of a user's session (continuous requests over a period of time).

[0102] 2) attack_pattern_match: The degree of matching with a known attack behavior sequence (such as "ask a normal question first -> then perform prompt injection -> change the statement after injection fails").

[0103] In practical applications, the offline profile generation and update module will use risk profile models generated by different algorithms to analyze the above features in order to obtain new risk profile scores.

[0104] 1. The risk profile model generated by the clustering algorithm is used to obtain a new risk profile score for a user by grouping users with similar behavioral characteristics into one category. If a group is found to have a large number of malicious behaviors, the risk profile score of newly added users to that group will be increased to a preset value. This achieves the identification of "gang-related crimes".

[0105] 2. The risk profile model generated by the anomaly detection algorithm is used to obtain a new risk profile score for a user. The process is as follows: This algorithm does not rely on labels and can directly identify "outlier" users whose behavior patterns differ from the vast majority of normal users. For example, if a user's request rate, topic entropy, and predicted resource consumption values ​​are combined to form an outlier in a multidimensional space, the user will be marked as high-risk, and their risk profile score will be increased to a preset value.

[0106] 3. The risk profile model generated by the classification model is used to obtain a new risk profile score for a user. The process is as follows: 1) Data labeling: Labeled data is required. These labels can come from: attacks confirmed by the real-time analysis module and semantic analysis module; malicious users confirmed by the manual security operations team; and behaviors reported and verified by users. Samples are labeled as "malicious" (1) or "normal" (0). 2) Model training: Using the features extracted above as input (X) and the labels (Y), a classification model is trained. 3) Risk prediction: After the model is trained, for any user, their latest behavioral features can be input into the model. The model will output a probability value (e.g., between 0 and 1), which is directly used or transformed as the user's new risk profile score. This new risk profile score represents "the possibility that the user will exhibit malicious behavior in the future". The calculation and updating of the risk profile score is a dynamic process. This mechanism ensures that the score reflects both long-term history and recent behavior.

[0107] The calculation of user credit scores aims to quantify a user's trustworthiness and business value. The data source typically comes from business systems (such as CRM (Customer Relationship Management) or user centers), rather than the large-scale security protection system in this embodiment. The calculation method is usually a weighted summation of user information data.

[0108] The calculation of user credit scores will take into account the following dimensions of user credit data, which need to be standardized into data scores (e.g., normalized to the [0,1] range):

[0109] 1. Regarding the identity authentication level (V_identity) data:

[0110] 1) Unverified (temporary ID only): The corresponding converted data score is 0.1;

[0111] 2) Verified email address / phone number: The corresponding conversion score is 0.5;

[0112] 3) Complete real-name authentication (individual or enterprise): The corresponding conversion score is 0.9;

[0113] 4) Associated with trusted enterprise accounts (such as employees logging in via SSO): The corresponding conversion score is 1.0.

[0114] 2. Regarding paid tier (V_tier) data

[0115] 1) Anonymous / Visitor Users: The corresponding conversion score is 0.1;

[0116] 2) Free registered users: The corresponding conversion score is 0.3;

[0117] 3) Paid personal version users: The corresponding conversion score is 0.7;

[0118] 4) Paid enterprise version users / API large customers: The corresponding conversion data score is 1.0.

[0119] 3. Regarding account historical data:

[0120] 1) Account registration duration (e.g., in months, logarithmically converted or binned to prevent old users' scores from increasing indefinitely): The corresponding converted data score is 0.7.

[0121] 2) Historical payment records: The corresponding conversion data score is 0.5.

[0122] 4. Platform contribution data (V_contribution):

[0123] Active contributors to the community and those who have submitted high-quality feedback: the corresponding conversion score is 0.3.

[0124] The process of converting user credit data described above can be achieved by querying a score table, which stores the correspondence between user credit data and data scores.

[0125] After obtaining the converted data scores from the aforementioned user credit data, these scores are weighted and calculated to arrive at a new user credit score. The weight of each dimension is determined by the business strategy, and the business can adjust the weights according to its needs. For example, for public cloud platforms, the weight of paid tier data may be very high. The calculation and updating of user credit scores is also a dynamic process. This mechanism more accurately reflects the user's current credit status and can be used in real-time in the priority score calculation when the user makes the next request, forming a closed-loop defense mechanism.

[0126] This invention provides a method for large model security protection, which is applied to the aforementioned large model security protection system. (See also...) Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of a method for large-scale model security protection provided by an embodiment of the present invention. Figure 3The process shown may include the following steps:

[0127] Step 301: Receive user requests sent by users in real time and perform business analysis on the large model of requests;

[0128] Step 302: Match the user request with each protection rule in the preset protection rule base to obtain the matching result;

[0129] Step 303: Perform result detection on the matching results;

[0130] Step 304: If a high-risk matching result is detected, the user request will be blocked.

[0131] Step 305: If the detected matching result is an innocent result, the user request is sent to the request sending module to be sent to the large model;

[0132] Step 306: If the matching result is detected as suspicious, perform semantic risk detection on the user request to obtain the risk level;

[0133] Step 307: Check whether the risk level is high-risk;

[0134] When the risk level is detected as high, the step of blocking and protecting the user request in step 304 is executed; when the risk level is not detected as high, the step of sending the user request to the request sending module in step 305 is executed to send it to the large model.

[0135] The implementation process of the above method can be found in the description of the large-scale security protection system, and will not be repeated here.

[0136] The large-scale model security protection method provided in this invention adopts a layered protection mechanism to achieve precise protection. Specifically, it quickly intercepts obviously malicious requests through rule base matching, with the vast majority of requests being allowed through microsecond-level delays without the need for subsequent complex semantic analysis processes. For suspicious user requests, a lightweight detection algorithm is used, which can complete contextual semantic threat identification and interception for a small number of suspicious requests with minimal computing resources. This hierarchical processing mechanism significantly reduces the consumption of computing resources while ensuring the stability of the overall system throughput performance, achieving a balanced optimization of security protection and operational performance.

[0137] This invention provides a device for large model security protection, which is applied to the aforementioned large model security protection system. (See also...) Figure 4 This is a block diagram illustrating an embodiment of a large-model safety protection device provided by an embodiment of the present invention. Figure 4 As shown, the device includes:

[0138] The receiving module 401 is used to receive user requests sent by users in real time for business analysis of the request model;

[0139] The matching module 402 is used to match the user request with each protection rule in the preset protection rule base to obtain the matching result;

[0140] The first detection module 403 is used to perform result detection on the matching results;

[0141] The blocking protection module 404 is used to block user requests if a high-risk matching result is detected.

[0142] The sending module 405 is used to send the user request to the request sending module to send it to the large model if the detected matching result is a clean result;

[0143] The semantic risk detection module 406 is used to perform semantic risk detection on the user request and obtain the risk level if the detected matching result is a suspicious result.

[0144] The second detection module 407 is used to detect whether the risk level is high-risk.

[0145] The first execution module 408 is used to execute steps to block and protect user requests when the risk level is detected to be high.

[0146] The second execution module 409 is used to execute the step of sending the user request to the request sending module to send it to the large model when the detected risk level is not high-risk.

[0147] The large-scale security protection device provided in this invention adopts a layered protection mechanism to achieve precise protection. Specifically, it quickly intercepts obviously malicious requests through rule base matching, with the vast majority of requests being allowed through microsecond-level delays without the need for subsequent complex semantic analysis processes. For suspicious user requests, a lightweight detection algorithm is used, which can complete contextual semantic threat identification and interception for a small number of suspicious requests with minimal computing resources. This hierarchical processing mechanism significantly reduces the consumption of computing resources while ensuring the stability of the overall system throughput performance, achieving a balanced optimization of security protection and operational performance.

[0148] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 5The illustrated electronic device 1200 includes at least one processor 1201, a memory 1202, at least one network interface 1204, and other user interfaces 1203. The various components in the electronic device 1200 are coupled together via a bus system 1205. It is understood that the bus system 1205 is used to implement communication between these components. In addition to a data bus, the bus system 1205 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 5 The general labeled all buses as Bus System 1205.

[0149] The user interface 1203 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0150] It is understood that the memory 1202 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1202 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0151] In some implementations, memory 1202 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 12021 and application program 12022.

[0152] The operating system 12021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 12022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 12022.

[0153] In this embodiment of the invention, the processor 1201 executes the method steps provided in each method embodiment by calling the program or instructions stored in the memory 1202, specifically the program or instructions stored in the application program 12022.

[0154] The methods disclosed in the above embodiments of the present invention can be applied to processor 1201, or implemented by processor 1201. Processor 1201 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 1201 or by instructions in the form of software. The processor 1201 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1202. Processor 1201 reads the information in memory 1202 and completes the steps of the above method in conjunction with its hardware.

[0155] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0156] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0157] The electronic device provided in this embodiment may be as follows: Figure 5 The electronic device shown can perform the following: Figure 3 All steps of the method for security protection of large and medium-sized models, thereby achieving... Figure 3 For details on the technical effectiveness of the large-scale model security protection method shown, please refer to [link / reference]. Figure 3 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0158] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.

[0159] The above-mentioned large-scale security protection method can be implemented when one or more programs in the storage medium can be executed by one or more processors.

[0160] The processor is used to execute programs stored in memory for large model security protection, in order to implement the steps of a method for large model security protection.

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

[0162] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0163] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A large-scale model security protection system, characterized in that, The large-scale model security protection system includes: a request receiving module, a real-time analysis module, a semantic analysis module, and a request sending module connected in sequence; The request receiving module is used to receive user requests sent by users in real time for business analysis of the request model, and send the user requests to the real-time detection module. The real-time analysis module is used to match the user request with each protection rule in the preset protection rule base to obtain the matching result, and to perform result detection on the matching result. If the matching result is detected as a high-risk result, the user request is blocked. If the matching result is detected as an innocent result, the user request is sent to the request sending module to be sent to the large model. If the matching result is detected as a questionable result, the user request is sent to the semantic detection module. The semantic analysis module is used to perform semantic risk detection on the user request, obtain a risk level, detect whether the risk level is high-risk, block the user request when the risk level is detected to be high-risk, and send the user request to the request sending module when the risk level is detected to be not high-risk, so as to send it to the large model.

2. The large-scale model security protection system according to claim 1, characterized in that, The semantic analysis module includes a semantic analysis model; The step of performing semantic risk detection on the user request to obtain a risk level includes: The user request is input into the semantic analysis model, which compares the user request with the content of each preset attack mode, calculates each similarity value, and determines the risk level from the risk level storage table using the highest similarity value. The semantic analysis model outputs the risk level; wherein, the risk level storage table stores the correspondence between similarity value ranges and risk levels.

3. The large-scale model security protection system according to claim 1, characterized in that, The request sending module includes a connection priority calculation unit and a scheduling circuit breaker unit; The priority calculation unit is used to determine a priority score based on the user request and send the priority score to the scheduling circuit breaker unit; The scheduling circuit breaker unit is used to obtain the current load of the large model system and send the user request to the large model according to the current load and the priority score; wherein, the large model system is the server that deploys the large model.

4. The large model security protection system according to claim 3, characterized in that, The process of determining the priority score based on the user request includes: The user request is parsed to extract the user's user identification information from the user request; The risk profile score corresponding to the user identification information is retrieved from the profile storage table; wherein, the profile storage table stores the correspondence between user identification information and risk profile scores; The user credit score corresponding to the user identification information is retrieved from the user credit storage table; wherein, the user credit storage table stores the correspondence between user identification information and user credit scores; The user request is input into a pre-trained resource consumption model, and the resource consumption value corresponding to the user request is received from the output of the resource consumption model. The priority score is determined by weighting the resource consumption value, the risk profile score, and the user credit score.

5. The large model security protection system according to claim 3, characterized in that, Sending the user request to the large model based on the current load and the priority score includes: Detect whether the current load is higher than the preset load; When the current load is detected to be higher than the preset load, user requests with priority scores higher than the preset scores are sent to the large model; When the current load is detected to be no higher than the preset load, the user requests are queued and sent to the large model according to their priority scores.

6. The large model security protection system according to claim 4, characterized in that, The large model security protection system also includes a risk data asynchronous distribution module connected to the semantic analysis module and the real-time analysis module, as well as a message queue connected to the risk data asynchronous distribution module; The asynchronous risk data distribution module is used to send the matching result as high-risk, the user request with the risk level as high-risk, and the behavior log corresponding to the user request to the message queue.

7. The large model security protection system according to claim 6, characterized in that, The large model security protection system also includes an offline profile generation and update module and an offline credit generation and update module connected to the message queue; The offline profile generation and update module is used to periodically retrieve the behavior logs from the message queue, extract multiple user behavior risk quantification features from the behavior logs, input the multiple user behavior risk quantification features into the risk profile model, the risk profile model outputs a new risk profile score for the user, and write the new risk profile score into the profile storage table for replacement and update; wherein, the user behavior risk quantification features include at least: frequency and intensity features, content and intent features, resource consumption features, and context and sequence features; The offline credit generation and update module is used to periodically retrieve user requests from the message queue, obtain multiple user credit data of the user from the business system based on the user requests, convert each user credit data into a data score, perform a weighted calculation on the multiple data scores to obtain the user's new user credit score, and write the new user credit score into the user credit storage table for replacement and update; wherein, the user credit data includes at least identity authentication level data, payment level data, account history data, and platform contribution data.

8. A method for security protection of large models, characterized in that, The method is applied to the large model security protection system according to any one of claims 1 to 7, and the method includes: Real-time reception of user requests and analysis of large-scale user models; The user request is matched against each protection rule in the preset protection rule base to obtain the matching result; Perform result detection on the matching results; If the matching result is detected as a high-risk result, the user request will be blocked. If the matching result is detected as innocent, the user request is sent to the request sending module, and then sent to the large model; If the matching result is detected as a questionable result, semantic risk detection is performed on the user request to obtain the risk level. Detect whether the risk level is high-risk; When the risk level is detected to be high, the step of blocking the user request is executed; When the risk level is detected to be not the high-risk level, the step of sending the user request to the request sending module is executed to send it to the large model.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a program for large model security protection stored in the memory to implement the method for large model security protection as described in claim 8.

10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the large model security protection method as described in claim 8.