Interaction monitoring method and system based on LLM security protection system
The LLM security protection system, which combines real-time capture and multi-dimensional data processing with a dynamic policy engine, solves the problems of insufficient real-time performance and accuracy of interactive monitoring in existing technologies. It achieves comprehensive monitoring of user interaction behavior and efficient anomaly identification, improving the system's stability and response speed in the face of new attacks and high-concurrency scenarios.
Patent Information
- Application Number
- CN202511293077.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing LLM system interaction monitoring technologies suffer from drawbacks such as limited data dimensions, reliance on fixed static rules, and low real-time monitoring performance, making it difficult to effectively identify and manage abnormal interaction behaviors between users and the LLM system.
By capturing real-time interaction data streams between users and the LLM security protection system, performing multi-dimensional data processing, and combining dynamic policy engines and machine learning models for parallel analysis, abnormal interaction behaviors are identified and risk levels are classified. Time series graph analysis technology is used to mine user behavior patterns and dynamically adjust security policies.
It improves the real-time performance and accuracy of interactive monitoring in the LLM system, enabling timely identification of abnormal behavior, enhancing the system's efficiency and stability in the face of new attacks or high-concurrency scenarios, and strengthening security protection capabilities.
Smart Images

Figure CN120781348B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to an interaction monitoring method and system based on an LLM security protection system. BACKGROUND
[0002] With the rapid development of large language model (LLM) technology, its application in natural language processing, intelligent dialogue, content generation and other fields is becoming increasingly widespread. However, the openness and interactivity of LLM systems also pose potential security risks, for example, malicious users may input harmful content, abuse system resources, or engage in other abnormal interaction behaviors, thereby threatening the security and stability of the system. Therefore, how to effectively monitor and manage the interaction behavior between users and LLM systems has become a problem to be solved in the current technical field.
[0003] Existing interaction monitoring technologies mainly focus on traditional network security fields, such as rule-based content filtering, behavior log analysis, etc. These methods, although able to identify abnormal behavior to some extent, have the defects of single data dimension for abnormal identification, reliance on fixed and unchanging static rules, and low real-time monitoring. Therefore, it is particularly important to provide a corresponding solution to address the deficiencies of existing technologies in handling LLM system interaction monitoring. SUMMARY
[0004] The present application provides an interaction monitoring method and system based on an LLM security protection system, which can improve the real-time monitoring, accuracy, and identification efficiency and accuracy of abnormal interaction behavior of LLM system interaction.
[0005] To solve the above technical problems, the present application discloses an interaction monitoring method based on an LLM security protection system in the first aspect, which comprises:
[0006] Real-time capture of interaction data streams between target users and the LLM security protection system, and execution of data extraction on the interaction data streams to obtain monitoring data corresponding to each preset target monitoring parameter; all the target monitoring parameters at least include text input, and all the target monitoring parameters further include at least one of output content, timestamp, and user identity identifier;
[0007] Performing multi-dimensional data processing on all the monitoring data to obtain multi-dimensional data processing results corresponding to all the monitoring data; the multi-dimensional data processing includes at least one of semantic label generation, behavior type identification, and risk level identification;
[0008] According to a preset dynamic strategy engine, combined with a preset matching rule and a machine learning model, parallel analysis is performed on the multi-dimensional data processing result to obtain a parallel analysis result corresponding to the multi-dimensional data processing result; the parallel analysis includes abnormal interaction identification and risk level division; the parallel analysis result is used to feed back to a manager of the LLM security protection system to show a use state of the target user for the LLM security protection system; the use state includes an abnormal interaction state of existing system interaction abnormality or a regular interaction state opposite to the abnormal interaction state.
[0009] As an optional implementation, in the first aspect of the application, the method further comprises:
[0010] Obtaining historical audit data corresponding to the target user; the historical audit data records historical interaction data flow of the target user accessing the LLM security protection system and a corresponding historical parallel analysis result;
[0011] According to a time sequence graph analysis technology, data mining is performed on the parallel analysis result and the historical audit data to obtain data mining information for the target user;
[0012] According to the data mining information, a user behavior portrait for the target user is constructed;
[0013] According to the user behavior portrait, parameter weight updating is performed on a target detection parameter in the machine learning model; the machine learning model includes a plurality of model detection parameters; each model detection parameter corresponds to an interaction behavior of a user with the LLM security protection system, and each model detection parameter has a corresponding parameter weight in the machine learning model; the plurality of model detection parameters include the target detection parameter, and the target detection parameter is only bound to the target user.
[0014] As an optional implementation, in the first aspect of the application, the multi-dimensional data processing performed on all the monitoring data to obtain multi-dimensional data processing results corresponding to all the monitoring data comprises:
[0015] According to a preset natural language processing model, entity extraction and intent recognition are performed on the monitoring data to obtain first processing data corresponding to the monitoring data; the entity extraction is used to extract keywords corresponding to the text input; the intent recognition is used to determine an interaction demand of the target user interacting with the LLM security protection system, and the interaction demand matches the keywords;
[0016] According to a predefined industry compliance rule library, content compliance judgment and label annotation operation are sequentially performed on the first processing data to obtain second processing data corresponding to the first processing data, wherein the label annotation operation corresponds to an annotation label including a compliance label or a non-compliance label; and the second processing data includes a label annotation result corresponding to the label annotation operation;
[0017] According to the label annotation result, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data;
[0018] The second processing data and the risk level division result are determined as a multi-dimensional data processing result corresponding to all the monitoring data.
[0019] As an optional implementation, in the first aspect of the present application, according to the label annotation result, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data, including:
[0020] According to a plurality of preset behavior characteristics, data extraction is performed on the historical audit data to obtain historical behavior data corresponding to each behavior characteristic; the plurality of behavior characteristics include time characteristics, frequency characteristics and path characteristics; the time characteristics include login time distribution and operation time interval; the frequency characteristics include operation times and access frequency; and the path characteristics include access path sequence and resource access order;
[0021] For historical behavior data corresponding to each behavior characteristic, a statistical quantity corresponding to the historical behavior data is calculated, and the statistical quantity includes at least one of mean value, standard deviation and distribution function;
[0022] According to statistical quantities corresponding to all the historical behavior data, a behavior baseline of the target user is determined, and the behavior baseline includes a sub-behavior baseline corresponding to each behavior characteristic;
[0023] According to the behavior baseline and the label annotation result, deviation calculation is performed on the second processing data to obtain a target deviation corresponding to the second processing data, and the target deviation includes a sub-deviation corresponding to each sub-behavior baseline and a comprehensive deviation corresponding to all the sub-deviations;
[0024] According to the target deviation, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data.
[0025] As an optional implementation, in the first aspect of the present application, the parallel analysis result and the historical audit data both include a plurality of target interaction events of the target user to the LLM security protection system, all the target interaction events include at least one first interaction event corresponding to the parallel analysis result and at least one second interaction event corresponding to the historical audit data;
[0026] According to the time sequence graph analysis technology, data mining is performed on the parallel analysis result and the historical audit data to obtain data mining information of the target user, including:
[0027] According to the time sequence graph analysis technology, a first data mining operation is performed on all the target interaction events to obtain a first data mining result corresponding to all the target interaction events; the first data mining operation includes time sequence node modeling, behavior sequence construction, and heterogeneous graph construction; the first data mining result at least includes a user behavior sequence corresponding to the behavior sequence construction and a user behavior graph corresponding to the heterogeneous graph construction;
[0028] A second data mining operation is performed on the first data mining result to obtain a second data mining result of the first data mining result; the second data mining operation includes a cross-session attack pattern recognition based on a preset neural network and a potential risk identification; the second data mining operation is used to identify and judge whether the target user is a potential malicious user;
[0029] The first data mining result and the second data mining result are determined as the data mining information of the target user.
[0030] As an optional implementation, in the first aspect of the present application, according to the time sequence graph analysis technology, a first data mining operation is performed on all the target interaction events to obtain a first data mining result corresponding to all the target interaction events, including:
[0031] Determine the node modeling information corresponding to each target interaction event, the node modeling information including event type, timestamp, and event weight; the event weight is used to indicate the risk level of the target interaction event;
[0032] According to the time sequence graph analysis technology, node modeling is performed on all the target interaction events in combination with the node modeling information corresponding to each target interaction event to obtain a target time sequence node corresponding to each target interaction event; all the target time sequence nodes include a first time sequence node corresponding to each first interaction event and a second time sequence node corresponding to each second interaction event;
[0033] perform time sorting on all the target interaction events according to the timestamp corresponding to each of the target time sequence nodes, to obtain a user behavior sequence for the target user;
[0034] perform heterogeneous graph construction on all the target time sequence nodes, to obtain a user behavior graph corresponding to all the target time sequence nodes;
[0035] determine the user behavior sequence and the user behavior graph as a first data mining result.
[0036] As an optional implementation, in the first aspect of the present application, the performing of the heterogeneous graph construction on all the target time sequence nodes to obtain a user behavior graph corresponding to all the target time sequence nodes comprises:
[0037] determine graph parameters for constructing the heterogeneous graph, and determine graph parameter data corresponding to the graph parameters from all the target time sequence nodes, wherein the graph parameters comprise node parameters and edge parameters; the node parameters comprise user nodes and resource nodes; the user nodes are used for user identification; the resource nodes are used for recording user access resources; the edge parameters comprise first edges, second edges and third edges; the first edges are used for recording user association information among a plurality of users; the second edges are used for recording access behaviors of the users for the access resources; and the third edges are used for recording resource association information among a plurality of the access resources;
[0038] perform edge weight calculation on each of the target interaction events according to node modeling information corresponding to the target interaction event, to obtain an edge weight value corresponding to the target interaction event;
[0039] construct the user behavior graph according to the graph parameters and the corresponding graph parameter data and all the edge weight values.
[0040] The second aspect of the present application discloses an interaction monitoring system based on an LLM security protection system, which comprises:
[0041] a data acquisition module, configured to capture an interaction data stream between a target user and the LLM security protection system in real time, and perform data extraction on the interaction data stream to obtain monitoring data corresponding to each of preset target monitoring parameters; all the target monitoring parameters at least comprise text input, and all the target monitoring parameters further comprise at least one of output content, a timestamp and a user identity;
[0042] The multi-dimensional data processing module is configured to perform multi-dimensional data processing on all the monitoring data to obtain multi-dimensional data processing results corresponding to all the monitoring data; the multi-dimensional data processing includes at least one of semantic label generation, behavior type identification, and risk level identification.
[0043] The parallel analysis module is configured to perform parallel analysis on the multi-dimensional data processing results according to a preset dynamic strategy engine, in combination with a preset matching rule and a machine learning model, to obtain parallel analysis results corresponding to the multi-dimensional data processing results; the parallel analysis includes abnormal interaction identification and risk level division; the parallel analysis results are used to feed back to a manager of the LLM security protection system to show a use state of the target user for the LLM security protection system; the use state includes an abnormal interaction state of existing system interaction abnormality or a normal interaction state opposite to the abnormal interaction state.
[0044] As an optional implementation, in the second aspect of the present application, the data acquisition module is further configured to acquire historical audit data corresponding to the target user; the historical audit data records historical interaction data flow of the target user accessing the LLM security protection system and corresponding historical parallel analysis results thereof;
[0045] The system further includes:
[0046] The data mining module is configured to perform data mining on the parallel analysis results and the historical audit data according to a time series graph analysis technique to obtain data mining information for the target user;
[0047] The portrait construction module is configured to construct a user behavior portrait for the target user according to the data mining information;
[0048] The weight updating module is configured to perform parameter weight updating on a target detection parameter in the machine learning model according to the user behavior portrait; the machine learning model includes a plurality of model detection parameters; each model detection parameter corresponds to an interaction behavior of a user with the LLM security protection system; each model detection parameter has a corresponding parameter weight in the machine learning model; the plurality of model detection parameters include the target detection parameter, and the target detection parameter is only bound to the target user.
[0049] As an optional implementation, in the second aspect of the present application, the multi-dimensional data processing module performs multi-dimensional data processing on all the monitoring data to obtain multi-dimensional data processing results corresponding to all the monitoring data in the following manner:
[0050] perform entity extraction and intent recognition on the monitoring data according to a preset natural language processing model, to obtain first processing data corresponding to the monitoring data; the entity extraction is used to extract keywords corresponding to the text input; and the intent recognition is used to determine an interaction demand of the target user interacting with the LLM security protection system, the interaction demand matching the keywords;
[0051] perform content compliance judgment and label annotation operation on the first processing data according to a predefined industry compliance rule library, to obtain second processing data corresponding to the first processing data, the label annotation operation corresponding to an annotation label including a compliance label or a non-compliance label; and the second processing data includes a label annotation result corresponding to the label annotation operation;
[0052] perform risk level division on the second processing data according to the label annotation result, to obtain a risk level division result corresponding to the second processing data;
[0053] determine the second processing data and the risk level division result as a multi-dimensional data processing result corresponding to all the monitoring data.
[0054] As an optional implementation, in the second aspect of the present application, the manner in which the multi-dimensional data processing module performs risk level division on the second processing data according to the label annotation result to obtain a risk level division result corresponding to the second processing data specifically includes:
[0055] perform data extraction on the historical audit data according to a plurality of preset behavior characteristics, to obtain historical behavior data corresponding to each of the behavior characteristics; the plurality of behavior characteristics include time characteristics, frequency characteristics and path characteristics; the time characteristics include login time distribution and operation time interval; the frequency characteristics include operation times and access frequency; and the path characteristics include access path sequence and resource access order;
[0056] for the historical behavior data corresponding to each of the behavior characteristics, calculate a statistical quantity corresponding to the historical behavior data, the statistical quantity including at least one of mean value, standard deviation and distribution function;
[0057] determine a behavior baseline of the target user according to the statistical quantities corresponding to all the historical behavior data, the behavior baseline including a sub-behavior baseline corresponding to each of the behavior characteristics;
[0058] According to the behavior baseline and the label annotation result, a deviation degree calculation is performed on the second processing data to obtain a target deviation degree corresponding to the second processing data, the target deviation degree including a sub-deviation degree corresponding to each of the sub-behavior baselines and a comprehensive deviation degree corresponding to all the sub-deviation degrees;
[0059] According to the target deviation degree, a risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data.
[0060] As an optional implementation, in the second aspect, the parallel analysis result and the historical audit data both include a plurality of target interaction events of the target user with respect to the LLM security protection system, all the target interaction events including at least one first interaction event corresponding to the parallel analysis result and at least one second interaction event corresponding to the historical audit data.
[0061] The data mining module performs data mining on the parallel analysis result and the historical audit data according to a time sequence graph analysis technology to obtain data mining information of the target user, and the manner of performing data mining on all the target interaction events according to the time sequence graph analysis technology to obtain a first data mining result corresponding to all the target interaction events includes:
[0062] performing a first data mining operation on all the target interaction events to obtain a first data mining result corresponding to all the target interaction events; the first data mining operation includes time sequence node modeling, behavior sequence construction, and heterogeneous graph construction; the first data mining result at least includes a user behavior sequence corresponding to the behavior sequence construction and a user behavior graph corresponding to the heterogeneous graph construction;
[0063] performing a second data mining operation on the first data mining result to obtain a second data mining result of the first data mining result; the second data mining operation includes a cross-session attack mode recognition based on a preset neural network and a potential risk recognition; the second data mining operation is used to identify and judge whether the target user is a potential malicious user;
[0064] determining the first data mining result and the second data mining result as the data mining information of the target user.
[0065] As an optional implementation, in the second aspect, the data mining module performs a first data mining operation on all the target interaction events according to a time sequence graph analysis technology to obtain a first data mining result corresponding to all the target interaction events, and the manner of performing the first data mining operation includes:
[0066] determine node modeling information corresponding to each of the target interaction events, the node modeling information including an event type, a timestamp, and an event weight; the event weight is used to indicate a risk level of the target interaction event;
[0067] perform node modeling on all the target interaction events according to the time sequence graph analysis technology and the node modeling information corresponding to each of the target interaction events, to obtain a target time sequence node corresponding to each of the target interaction events; all the target time sequence nodes include a first time sequence node corresponding to each of the first interaction events and a second time sequence node corresponding to each of the second interaction events;
[0068] perform time sorting on all the target interaction events according to the timestamp corresponding to each of the target time sequence nodes, to obtain a user behavior sequence for the target user;
[0069] perform heterogeneous graph construction on all the target time sequence nodes, to obtain a user behavior graph corresponding to all the target time sequence nodes;
[0070] determine the user behavior sequence and the user behavior graph as a first data mining result.
[0071] As an optional implementation, in the second aspect, the data mining module performs heterogeneous graph construction on all the target time sequence nodes to obtain a user behavior graph corresponding to all the target time sequence nodes, and the manner includes:
[0072] determine graph parameters for constructing the heterogeneous graph, and determine graph parameter data corresponding to the graph parameters from all the target time sequence nodes; the graph parameters include node parameters and edge parameters; the node parameters include a user node and a resource node; the user node is used for user identification; the resource node is used for recording a user's access resource; the edge parameters include a first edge, a second edge, and a third edge; the first edge is used for recording user association information between a plurality of users; the second edge is used for recording an access behavior of the user for the access resource; and the third edge is used for recording resource association information between a plurality of access resources;
[0073] perform edge weight calculation on each of the target interaction events according to the node modeling information corresponding to the target interaction event, to obtain an edge weight value corresponding to the target interaction event;
[0074] construct the user behavior graph according to the graph parameters and the corresponding graph parameter data and all the edge weight values.
[0075] A third aspect of the present application discloses another interaction monitoring device based on an LLM security protection system, the device comprising:
[0076] a memory storing executable program code;
[0077] a processor coupled with the memory;
[0078] The processor invokes the executable program code stored in the memory to execute the LLM security protection system-based interaction monitoring method disclosed in the first aspect of the present application.
[0079] The fourth aspect of the present application discloses a computer storage medium storing computer instructions, which are invoked to execute the LLM security protection system-based interaction monitoring method disclosed in the first aspect of the present application.
[0080] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0081] In the embodiments of the present application, an LLM security protection system-based interaction monitoring method is provided, which includes: capturing an interaction data stream of a target user with an LLM security protection system in real time, and performing data extraction on the interaction data stream to obtain monitoring data corresponding to each preset target monitoring parameter; all target monitoring parameters at least include text input, and all target monitoring parameters further include at least one of output content, a timestamp, and a user identity identifier; performing multi-dimensional data processing on all monitoring data to obtain a multi-dimensional data processing result corresponding to all monitoring data; the multi-dimensional data processing includes at least one of semantic label generation, behavior type identification, and risk level identification; performing parallel analysis on the multi-dimensional data processing result according to a preset dynamic strategy engine, in combination with a preset matching rule and a machine learning model, to obtain a parallel analysis result corresponding to the multi-dimensional data processing result; the parallel analysis includes abnormal interaction identification and risk level division; and the parallel analysis result is used to feed back to a manager of the LLM security protection system to show a use state of the target user for the LLM security protection system; the use state includes an abnormal interaction state of existing system interaction abnormality or a regular interaction state opposite to the abnormal interaction state. As can be seen, by capturing the interaction data stream of the user with the system in real time and combining the multi-dimensional data processing and the dynamic strategy engine, the present application can realize comprehensive monitoring and analysis of the user interaction behavior; specifically, by using the preset dynamic strategy engine in combination with the matching rule and the machine learning model, the security strategy can be dynamically adjusted according to the real-time monitoring data, which is beneficial to improving the response efficiency and flexibility of the system when facing new attacks or abnormal behaviors; and the multi-dimensional data processing result can be analyzed in parallel, the abnormal interaction behavior can be identified and the risk level can be divided, which is beneficial to improving the analysis efficiency of the multi-dimensional data processing result, and also beneficial to improving the stability and response speed of the system in a high-concurrency scenario. BRIEF DESCRIPTION OF DRAWINGS
[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on these drawings.
[0083] Figure 1 is a flow diagram of an interactive monitoring method based on an LLM security protection system disclosed by an embodiment of the present application;
[0084] Figure 2 is a flow diagram of another interactive monitoring method based on an LLM security protection system disclosed by an embodiment of the present application;
[0085] Figure 3 is a structural diagram of an interactive monitoring system based on an LLM security protection system disclosed by an embodiment of the present application;
[0086] Figure 4 is a structural diagram of another interactive monitoring system based on an LLM security protection system disclosed by an embodiment of the present application;
[0087] Figure 5 is a structural diagram of an interactive monitoring device based on an LLM security protection system disclosed by an embodiment of the present application. DETAILED DESCRIPTION
[0088] In order to make the person skilled in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0089] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but can optionally include steps or units not listed, or can optionally include other steps or units inherent to the process, method, product or end.
[0090] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that any of the embodiments described herein can be combined with any of the other embodiments unless specifically noted otherwise.
[0091] The application discloses an interactive monitoring method and system based on an LLM security protection system, which realizes comprehensive monitoring and analysis of user interactive behaviors by capturing user and system interactive data streams in real time and combining multi-dimensional data processing and a dynamic strategy engine; specifically, by combining matching rules and a machine learning model through a preset dynamic strategy engine, the interactive monitoring method and system can dynamically adjust security strategies according to real-time monitoring data, which is beneficial to improving the response efficiency and flexibility of the system when facing new attacks or abnormal behaviors; and the interactive monitoring method and system can also perform parallel analysis on multi-dimensional data processing results, identify abnormal interactive behaviors and divide risk levels, which is beneficial to improving the analysis efficiency of the multi-dimensional data processing results and the stability and response speed of the system in a high-concurrency scenario. The following will be described in detail.
[0092] Embodiment one
[0093] Please refer to Figure 1 , Figure 1 is a flowchart of an interactive monitoring method based on an LLM security protection system disclosed by the application. Wherein, Figure 1 The interactive monitoring method based on the LLM security protection system described above can be applied to an interactive monitoring device based on the LLM security protection system, and the application embodiments are not limited. As shown in Figure 1 The interactive monitoring method based on the LLM security protection system can include the following operations:
[0094] 101, capturing the interactive data stream of the target user and the LLM security protection system in real time, and performing data extraction on the interactive data stream to obtain monitoring data corresponding to each preset target monitoring parameter.
[0095] In the application embodiment, all target monitoring parameters at least include text input, and all target monitoring parameters further include at least one of output content, a timestamp, and a user identity.
[0096] In the application embodiment, by capturing the interactive data stream of the target user and the LLM security protection system in real time, it is ensured that the system can respond to the interactive behavior of the user in time, and potential security threats can also be found in time.
[0097] In the embodiment of the present application, the captured interaction data stream has rich corresponding data dimensions, which is beneficial to improve the comprehensiveness and integrity of the monitoring data.
[0098] In the embodiment of the present application, the execution object of the action of capturing the interaction data stream in real time is generally the LLM security protection system itself, or other supervision systems; when the execution object is other supervision systems, the other supervision systems at least have the permission of data interaction with the LLM security protection system, and the system management level corresponding to the other supervision systems is higher than the system management level of the LLM security protection system.
[0099] 102. Perform multi-dimensional data processing on all monitoring data to obtain multi-dimensional data processing results corresponding to all monitoring data; the multi-dimensional data processing includes at least one operation of semantic label generation, behavior type identification, and risk level identification.
[0100] In the embodiment of the present application, in the multi-dimensional data processing, the semantic analysis is performed on the monitoring data to generate semantic labels, which can help the system to understand the intention and context of the user input and improve the identification ability of abnormal interaction behavior.
[0101] In the embodiment of the present application, by setting the behavior type identification, the system can distinguish between normal operation and potential malicious behavior of the user, such as malicious input and abuse of system resources, thereby facilitating the enhancement of the security protection capability of the system.
[0102] In the embodiment of the present application, by setting the risk level identification, the system can automatically identify the risk level of different interaction behaviors according to the analysis result of the monitoring data, help the management personnel to quickly locate the high-risk behavior, and take corresponding protection measures.
[0103] 103. According to the preset dynamic strategy engine, the multi-dimensional data processing results are executed in parallel analysis combined with the preset matching rule and the machine learning model, to obtain parallel analysis results corresponding to the multi-dimensional data processing results.
[0104] In the embodiment of the present application, the parallel analysis includes abnormal interaction identification and risk level division; the parallel analysis result is used for feedback to the management personnel of the LLM security protection system to show the use state of the target user to the LLM security protection system; the use state includes an abnormal interaction state of existing system interaction abnormality or a normal interaction state opposite to the abnormal interaction state.
[0105] In the embodiment of the present application, by setting parallel analysis, the system can accurately identify abnormal interaction behaviors of the user, such as malicious input, abuse of system functions, etc., and timely feedback to the management personnel, thereby improving the discovery speed of the abnormal interaction behaviors; and the system can also divide the risk levels of the user interaction behaviors according to the analysis results, help the management personnel to quickly identify high-risk users or behaviors, and take corresponding protection measures, such as limiting user permissions, blocking malicious requests, etc.
[0106] In the embodiment of the present application, the dynamic policy engine can include a real-time rule filter and a deep learning classifier, wherein the real-time rule filter is used to load predefined blacklist keywords, regular expressions and access control policies; the deep learning classifier is used to perform text semantic vector extraction, interaction rating analysis and correlation analysis of conversation context.
[0107] It can be seen that the implementation Figure 1 The described interaction monitoring method based on the LLM security protection system can realize comprehensive monitoring and analysis of user interaction behaviors by capturing the interaction data stream of the user and the system in real time, combining multi-dimensional data processing and a dynamic policy engine; specifically, by combining matching rules and machine learning models through the preset dynamic policy engine, the security policy can be dynamically adjusted according to the real-time monitoring data, which is beneficial to improve the response efficiency and flexibility of the system when facing new attacks or abnormal behaviors; and the multi-dimensional data processing results can be analyzed in parallel, and abnormal interaction behaviors can be identified and risk levels can be divided, which is beneficial to improve the analysis efficiency of the multi-dimensional data processing results, and also beneficial to improve the stability and response speed of the system in a high-concurrency scenario.
[0108] Embodiment two
[0109] Please refer to Figure 2 , Figure 2 is another flowchart of the interaction monitoring method based on the LLM security protection system disclosed in the embodiment of the present application. Among them, Figure 2 The described interaction monitoring method based on the LLM security protection system can be applied to an interaction monitoring device based on the LLM security protection system, and the embodiment of the present application is not limited. As Figure 2 The interaction monitoring method based on the LLM security protection system can include the following operations:
[0110] 201, capturing the interaction data stream of the target user and the LLM security protection system in real time, and performing data extraction on the interaction data stream to obtain monitoring data corresponding to each preset target monitoring parameter.
[0111] 202. Perform multidimensional data processing on all monitoring data to obtain multidimensional data processing results corresponding to all monitoring data; multidimensional data processing includes at least one of the following operations: semantic tag generation, behavior type identification, and risk level identification.
[0112] 203. Based on the preset dynamic strategy engine, combined with the preset matching rules and machine learning model, perform parallel analysis on the multidimensional data processing results to obtain the parallel analysis results corresponding to the multidimensional data processing results.
[0113] For further descriptions of steps 201-203 in this embodiment of the invention, please refer to the other specific descriptions of steps 101-103 in Embodiment 1. These descriptions will not be repeated in this embodiment of the invention.
[0114] 204. Obtain historical audit data corresponding to the target user; historical audit data records the historical interaction data stream of the target user accessing the LLM security protection system and its corresponding historical parallel analysis results.
[0115] In this embodiment of the invention, by acquiring the target user's historical design data, it is possible to fully understand the user's long-term interaction behavior patterns when using the LLM security protection system, which is beneficial to improving the richness of analyzable data and the accuracy of data analysis.
[0116] 205. Based on time series graph analysis technology, perform data mining on the parallel analysis results and historical audit data to obtain data mining information for the target user.
[0117] 206. Based on data mining information, construct user behavior profiles for target users.
[0118] 207. Based on the user behavior profile, update the parameter weights of the target detection parameters in the machine learning model.
[0119] In this embodiment of the invention, the machine learning model includes multiple model detection parameters; each model detection parameter corresponds to an interaction behavior between a user and the LLM security protection system, and each model detection parameter has its corresponding parameter weight in the machine learning model; the multiple model detection parameters include target detection parameters, which are only bound to the target user.
[0120] In this embodiment of the invention, the target detection parameter is bound only to the target user, enabling the machine learning model to perform personalized detection based on the behavioral characteristics of a specific user, thereby further improving the accuracy of abnormal behavior identification.
[0121] It is evident that implementation Figure 2The described interaction monitoring method based on the LLM security protection system utilizes time sequence graph analysis technology to perform data mining on historical audit data and real-time parallel analysis results, can discover time correlation and potential rules of user behavior, thereby facilitating improvement of prediction accuracy of abnormal behavior; and can construct a personalized behavior portrait of a target user according to data mining information, improve determination accuracy of interaction habits, preferences and potential risk tendencies of the target user; meanwhile, the user behavior portrait can also be dynamically updated according to changes in user interaction behavior, further improving real-time performance and accuracy of the user behavior portrait.
[0122] In an optional embodiment, the manner in which the above-mentioned step 202 performs multi-dimensional data processing on all monitoring data to obtain multi-dimensional data processing results corresponding to all monitoring data specifically includes:
[0123] According to a preset natural language processing model, entity extraction and intent recognition are performed on the monitoring data to obtain first processing data corresponding to the monitoring data; the entity extraction is used to extract keywords corresponding to the text input; the intent recognition is used to determine an interaction demand of the target user for interacting with the LLM security protection system, and the interaction demand is matched with the keywords;
[0124] According to a predefined industry compliance rule library, content compliance judgment and label annotation operations are sequentially performed on the first processing data to obtain second processing data corresponding to the first processing data, and the annotation label corresponding to the label annotation operation includes a compliance label or a non-compliance label; the second processing data includes a label annotation result corresponding to the label annotation operation;
[0125] According to the label annotation result, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data;
[0126] The second processing data and the risk level division result are determined as the multi-dimensional data processing results corresponding to all monitoring data.
[0127] In this optional embodiment, the entity extraction performed on the monitoring data by the natural language processing model can accurately extract keywords in the text input, providing key data support for subsequent intent recognition and risk gaps; the setting of the intent recognition operation can accurately identify the real demand of the target user for interacting with the LLM security protection system, improving the depth and accuracy of understanding of user behavior.
[0128] In this optional embodiment, through the predefined industry compliance rule library, compliance judgment can be performed on user interaction content, ensuring that the interaction behavior conforms to industry specifications and laws and regulations, and reducing compliance risk; the label annotation operation can automatically annotate the first processing data, providing clear classification basis for subsequent risk level division.
[0129] It can be seen that in this optional embodiment, through multi-dimensional data processing operations such as entity extraction, intent recognition, compliance judgment, label annotation, and risk level division, the analysis comprehensiveness and processing accuracy of user interaction data are improved.
[0130] In another optional embodiment, the manner of performing risk level division on the second processing data according to the label annotation result to obtain a risk level division result corresponding to the second processing data specifically includes:
[0131] According to the preset plurality of behavior characteristics, data extraction is performed on the historical audit data to obtain historical behavior data corresponding to each behavior characteristic; the plurality of behavior characteristics include time characteristics, frequency characteristics, and path characteristics; the time characteristics include login time distribution and operation time interval; the frequency characteristics include operation times and access frequency; and the path characteristics include access path sequence and resource access order;
[0132] For the historical behavior data corresponding to each behavior characteristic, a statistical quantity corresponding to the historical behavior data is calculated, and the statistical quantity includes at least one of a mean value, a standard deviation, and a distribution function;
[0133] According to the statistical quantities corresponding to all the historical behavior data, a behavior baseline of the target user is determined, and the behavior baseline includes a sub-behavior baseline corresponding to each behavior characteristic;
[0134] According to the behavior baseline and the label annotation result, deviation calculation is performed on the second processing data to obtain a target deviation corresponding to the second processing data, and the target deviation includes a sub-deviation corresponding to each sub-behavior baseline and a comprehensive deviation corresponding to all the sub-deviations;
[0135] According to the target deviation, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data.
[0136] In this optional embodiment, the plurality of behavior characteristics can further include resource usage characteristics; and the resource usage characteristics include usage amounts of CPU, memory, and network bandwidth corresponding to user access to the LLM security protection system.
[0137] In this optional embodiment, after the behavior baseline of the target user is determined according to the statistical quantities corresponding to all the historical behavior data, the method further includes:
[0138] According to the time window, dynamic updating is performed on the behavior baseline of the target user.
[0139] In this optional embodiment, specifically, after the behavior baseline of the target user is determined, the behavior baseline can be updated at a preset update interval to ensure the timeliness of the behavior baseline.
[0140] In the optional embodiment, the manner of performing deviation calculation on the second processing data according to the behavior baseline combined with the label annotation result to obtain the target deviation corresponding to the second processing data specifically includes:
[0141] performing division on the second processing data according to the label annotation result to obtain a target data division set, the target data division set including a first data division set corresponding to the compliance label and a second data division set corresponding to the non-compliance label; the first data division set corresponding to a first deviation interval and the second data division set corresponding to a second deviation interval; the maximum deviation value of the first deviation interval being less than the minimum deviation value of the second deviation interval;
[0142] for each sub-division data in the target data division set, calculating a numerical difference between the sub-division data and the sub-behavior baseline corresponding to the sub-division data to obtain a sub-deviation;
[0143] performing a pre-design calculation on all sub-deviations corresponding to the sub-division data to obtain a comprehensive deviation corresponding to the sub-division data;
[0144] determining the sub-deviation and the comprehensive deviation corresponding to each sub-division data as the target deviation corresponding to the second processing data;
[0145] It should be noted that the first data division set and the second data division set can include at least one sub-division data, and each sub-division data has one or more corresponding sub-behavior baselines.
[0146] In the optional embodiment, the pre-design calculation includes average value calculation, weighted calculation, etc.
[0147] As can be seen, in the optional embodiment, through statistical analysis and deviation calculation of multi-dimensional behavior characteristics, the abnormality in user behavior can be more accurately identified, which is conducive to improving the accuracy of risk identification; and the behavior baseline established based on historical data can dynamically reflect the normal behavior pattern of the user, thereby quickly and accurately determining the behavior difference of the user, further improving the flexibility and accuracy of risk judgment; and through calculation of the sub-deviation and the comprehensive deviation, the risk degree of user behavior can be evaluated from multiple levels, providing more detailed risk level division, which is conducive to improving the fineness and accuracy of the risk level division.
[0148] In yet another optional embodiment, the parallel analysis result and the historical audit data both include a plurality of target interaction events of the target user with the LLM security protection system, and all the target interaction events include at least one first interaction event corresponding to the parallel analysis result and at least one second interaction event corresponding to the historical audit data;
[0149] The manner of performing data mining on the parallel analysis result and the historical audit data according to the time series graph analysis technology to obtain the data mining information for the target user specifically includes:
[0150] According to the time series graph analysis technology, a first data mining operation is performed on all target interaction events to obtain a first data mining result corresponding to all target interaction events; the first data mining operation includes time series node modeling, behavior sequence construction, and heterogeneous graph construction; the first data mining result at least includes a user behavior sequence corresponding to the behavior sequence construction and a user behavior graph corresponding to the heterogeneous graph construction;
[0151] A second data mining operation is performed on the first data mining result to obtain a second data mining result for the first data mining result; the second data mining operation includes cross-session attack pattern recognition based on a preset neural network and potential risk identification; the second data mining operation is used to identify and judge whether the target user is a potential malicious user;
[0152] The first data mining result and the second data mining result are determined as the data mining information for the target user.
[0153] In this optional embodiment, the manner of performing the second data mining operation on the first data mining result to obtain the second data mining result for the first data mining result specifically includes:
[0154] According to the first data mining result, independent behavior information and associated behavior information of the target user in different sessions are analyzed as a classification benchmark.
[0155] According to the independent behavior information and the associated behavior information, whether the target user has a potential risk of cross-session attack is identified to obtain a corresponding potential risk identification result.
[0156] The independent behavior information and the associated behavior information and the potential risk identification information are determined as the second data mining result.
[0157] As can be seen, in this optional embodiment, through the time series graph analysis technology, comprehensive time series modeling and behavior sequence construction of the interaction events of the target user can be performed, the dynamic changes and complex relationships of user behavior can be captured, and the comprehensiveness and accuracy of behavior analysis can be improved; in addition, the cross-session attack pattern recognition based on the preset neural network is set, which can effectively identify complex attack behaviors across sessions, enhance the detection capability of potential malicious users, and reduce security risks; furthermore, through the heterogeneous graph construction, different types of data (such as time series data and behavior sequence data) can be fused and analyzed, hidden associations in user behavior can be mined, and the depth and breadth of data analysis can be enhanced.
[0158] In another optional embodiment, the manner that the above-mentioned first data mining operation is performed on all target interaction events to obtain the first data mining result corresponding to all target interaction events according to the time sequence graph analysis technology specifically includes:
[0159] determining node modeling information corresponding to each target interaction event, the node modeling information including event type, timestamp, and event weight; the event weight is used to indicate the risk level of the target interaction event;
[0160] performing node modeling on all target interaction events according to the time sequence graph analysis technology in combination with the node modeling information corresponding to each target interaction event to obtain a target time sequence node corresponding to each target interaction event; all target time sequence nodes include a first time sequence node corresponding to each first interaction event and a second time sequence node corresponding to each second interaction event;
[0161] performing time sorting on all target interaction events according to the timestamp corresponding to each target time sequence node to obtain a user behavior sequence for the target user;
[0162] performing heterogeneous graph construction on all target time sequence nodes to obtain a user behavior graph corresponding to all target time sequence nodes;
[0163] determining the user behavior sequence and the user behavior graph as the first data mining result.
[0164] As can be seen, in this optional embodiment, the target interaction event is modeled into a time sequence node through the node modeling information (event type, timestamp, and event weight), which can accurately capture the time characteristics and risk level of the user behavior and is conducive to improving the efficiency of subsequent data analysis; the all target interaction events are sorted according to the timestamp to generate a user behavior sequence, which can intuitively reflect the dynamic change and time sequence relationship of the user behavior and is conducive to identifying abnormal behavior patterns; the different types of target time sequence nodes are integrated into a unified user behavior graph through heterogeneous graph construction, which can mine complex correlations and hidden patterns in the user behavior and is conducive to improving the depth and breadth of subsequent data analysis. In addition, the risk level of the target interaction event is quantified through the event weight, which can integrate risk information into time sequence modeling and heterogeneous graph construction, and is conducive to enhancing the identification and early warning capability of high-risk events.
[0165] In yet another optional embodiment, the manner that the above-mentioned heterogeneous graph construction is performed on all target time sequence nodes to obtain the user behavior graph corresponding to all target time sequence nodes specifically includes:
[0166] Determine a graph parameter for constructing a heterogeneous graph, and determine graph parameter data corresponding to the graph parameter from all target time sequence nodes, the graph parameter including node parameters and edge parameters; the node parameters include user nodes and resource nodes; the user nodes are used for user identification; the resource nodes are used for recording user access resources; the edge parameters include first edges, second edges and third edges; the first edges are used for recording user association information between multiple users; the second edges are used for recording user access behaviors for access resources; and the third edges are used for recording resource association information between multiple access resources;
[0167] According to the node modeling information corresponding to each target interaction event, perform edge weight calculation on the target interaction event to obtain an edge weight value corresponding to the target interaction event;
[0168] According to the graph parameter and the corresponding graph parameter and all edge weight values, construct a user behavior graph.
[0169] In this optional embodiment, the user nodes are used for user identification, and can be considered to store user login accounts / id / login addresses, etc.
[0170] As can be seen, in this optional embodiment, through the design of node parameters (user nodes and resource nodes) and edge parameters (first edges, second edges and third edges), multi-dimensional information of user behaviors can be comprehensively captured, including user identity, access resources, user association, access behaviors and resource association, improving the comprehensiveness and accuracy of data analysis; through edge weight calculation on each target interaction event, the strength and association of user behaviors can be quantified, so as to more accurately model user behavior patterns, providing data support for personalized recommendation, user clustering, etc.; and based on the graph parameter and the edge weight value, a user behavior graph can be automatically constructed, reducing manual intervention and improving data processing efficiency; finally, through the design of the first edges, the second edges and the third edges, the complex association between users, users and resources, and resources can be deeply mined, further improving the construction accuracy and fineness of the heterogeneous graph.
[0171] Embodiment three
[0172] Please refer to Figure 3 , Figure 3 is a structural schematic diagram of an interaction monitoring system based on an LLM security protection system disclosed by an embodiment of the present application. As shown in Figure 3 , the interaction monitoring system based on the LLM security protection system can include a data acquisition module 301, a multi-dimensional data processing module 302 and a parallel analysis module 303, wherein:
[0173] The data acquisition module 301 is configured to capture, in real time, an interaction data stream of a target user with the LLM security protection system, and perform data extraction on the interaction data stream to obtain monitoring data corresponding to each preset target monitoring parameter; all the target monitoring parameters at least include text input, and all the target monitoring parameters further include at least one of output content, a timestamp and a user identity identifier;
[0174] The multi-dimensional data processing module 302 is configured to perform multi-dimensional data processing on all the monitoring data to obtain a multi-dimensional data processing result corresponding to all the monitoring data; the multi-dimensional data processing includes at least one of semantic label generation, behavior type identification and risk level identification;
[0175] The parallel analysis module 303 is configured to perform parallel analysis on the multi-dimensional data processing result according to a preset dynamic strategy engine, in combination with a preset matching rule and a machine learning model, to obtain a parallel analysis result corresponding to the multi-dimensional data processing result; the parallel analysis includes abnormal interaction identification and risk level division; and the parallel analysis result is used to feed back to a manager of the LLM security protection system to show a use state of the target user for the LLM security protection system; the use state includes an abnormal interaction state of existing system interaction abnormality or a normal interaction state opposite to the abnormal interaction state.
[0176] It can be seen that the implementation Figure 3 The described interaction monitoring system based on the LLM security protection system realizes comprehensive monitoring and analysis of user interaction behaviors by capturing, in real time, an interaction data stream of a user with the system, in combination with multi-dimensional data processing and a dynamic strategy engine; specifically, by using a preset dynamic strategy engine in combination with a matching rule and a machine learning model, the system can dynamically adjust a security strategy according to real-time monitoring data, which is beneficial to improving the response efficiency and flexibility of the system when facing new attacks or abnormal behaviors; and the system can also perform parallel analysis on multi-dimensional data processing results, identify abnormal interaction behaviors and divide risk levels, which is beneficial to improving the analysis efficiency of the multi-dimensional data processing results, and also beneficial to improving the stability and response speed of the system in a high-concurrency scenario.
[0177] In an optional embodiment, the data acquisition module 301 is further configured to acquire historical audit data corresponding to the target user; the historical audit data records historical interaction data streams of the target user accessing the LLM security protection system and corresponding historical parallel analysis results thereof;
[0178] In addition, please refer to Figure 4 , Figure 4 is another structure schematic view of an interaction monitoring system based on the LLM security protection system according to an embodiment of the present application. As Figure 4As shown, the system further includes a data mining module 304, a portrait construction module 305, and a weight updating module 306, wherein:
[0179] The data mining module 304 is configured to perform data mining on the parallel analysis result and the historical audit data according to a time series graph analysis technology to obtain data mining information for the target user.
[0180] The portrait construction module 305 is configured to construct a user behavior portrait for the target user according to the data mining information.
[0181] The weight updating module 306 is configured to perform parameter weight updating on the target detection parameter in the machine learning model according to the user behavior portrait; the machine learning model includes a plurality of model detection parameters; each model detection parameter corresponds to an interaction behavior of a user with the LLM security protection system, and each model detection parameter has a corresponding parameter weight in the machine learning model; the plurality of model detection parameters include the target detection parameter, and the target detection parameter is only bound to the target user.
[0182] As can be seen, in this optional embodiment, the time series graph analysis technology is used to perform data mining on the historical audit data and the real-time parallel analysis result, which can discover the time correlation and potential rules of user behavior, thereby improving the prediction accuracy of abnormal behavior; in addition, the personalized behavior portrait of the target user can be constructed according to the data mining information, which improves the determination accuracy of the interaction habits, preferences, and potential risk tendencies of the target user; at the same time, the user behavior portrait can also be dynamically updated according to the changes in user interaction behavior, further improving the real-time and accuracy of the user behavior portrait.
[0183] In another optional embodiment, the multi-dimensional data processing module 302 performs multi-dimensional data processing on all the monitored data to obtain multi-dimensional data processing results corresponding to all the monitored data, and the manner includes:
[0184] According to a preset natural language processing model, entity extraction and intent recognition are performed on the monitored data to obtain first processing data corresponding to the monitored data; the entity extraction is used to extract keywords corresponding to the text input; the intent recognition is used to determine the interaction demand of the target user interacting with the LLM security protection system, and the interaction demand matches the keywords;
[0185] According to a predefined industry compliance rule library, content compliance judgment and label annotation operations are sequentially performed on the first processing data to obtain second processing data corresponding to the first processing data, and the annotation label corresponding to the label annotation operation includes a compliance label or a non-compliance label; the second processing data includes a label annotation result corresponding to the label annotation operation.
[0186] According to the label annotation result, the risk level division is performed on the second processing data, and a risk level division result corresponding to the second processing data is obtained.
[0187] The second processing data and the risk level division result are determined as the multi-dimensional data processing result corresponding to all the monitoring data.
[0188] It can be seen that in the optional embodiment, through multi-dimensional data processing operations such as entity extraction, intent recognition, compliance judgment, label annotation, and risk level division, the analysis comprehensiveness and processing accuracy of the user interaction data are improved.
[0189] In yet another optional embodiment, the manner in which the multi-dimensional data processing module 302 performs risk level division on the second processing data according to the label annotation result to obtain a risk level division result corresponding to the second processing data specifically includes:
[0190] According to a plurality of preset behavior characteristics, data extraction is performed on the historical audit data to obtain historical behavior data corresponding to each behavior characteristic; the plurality of behavior characteristics include time characteristics, frequency characteristics, and path characteristics; the time characteristics include login time distribution and operation time interval; the frequency characteristics include operation times and access frequency; and the path characteristics include access path sequence and resource access order;
[0191] For the historical behavior data corresponding to each behavior characteristic, a statistical quantity corresponding to the historical behavior data is calculated, and the statistical quantity includes at least one of a mean value, a standard deviation, and a distribution function;
[0192] According to the statistical quantities corresponding to all the historical behavior data, a behavior baseline of the target user is determined, and the behavior baseline includes a sub-behavior baseline corresponding to each behavior characteristic;
[0193] According to the behavior baseline and the label annotation result, deviation degree calculation is performed on the second processing data to obtain a target deviation degree corresponding to the second processing data, and the target deviation degree includes a sub-deviation degree corresponding to each sub-behavior baseline and a comprehensive deviation degree corresponding to all the sub-deviation degrees;
[0194] According to the target deviation degree, risk level division is performed on the second processing data to obtain a risk level division result corresponding to the second processing data.
[0195] It can be seen that in the optional embodiment, through the statistical analysis and deviation calculation of multi-dimensional behavior characteristics, the abnormality in the user behavior can be more accurately identified, which is beneficial to improve the identification accuracy of the risk; and the behavior baseline established based on the historical data can dynamically reflect the normal behavior pattern of the user, so as to quickly and accurately determine the behavior difference of the user, further improve the flexibility and accuracy of the risk judgment; and through the calculation of the sub-deviation degree and the comprehensive deviation degree, the risk degree of the user behavior can be evaluated from multiple levels, a more fine risk level division is provided, which is beneficial to improve the fineness and accuracy of the risk level division.
[0196] In another optional embodiment, the parallel analysis result and the historical audit data both include a plurality of target interaction events of the target user to the LLM security protection system, and all the target interaction events include at least one first interaction event corresponding to the parallel analysis result and at least one second interaction event corresponding to the historical audit data.
[0197] The manner in which the data mining module 304 performs data mining on the parallel analysis result and the historical audit data according to the time series graph analysis technology to obtain the data mining information of the target user includes the following steps.
[0198] According to the time series graph analysis technology, a first data mining operation is performed on all the target interaction events to obtain a first data mining result corresponding to all the target interaction events; the first data mining operation includes time series node modeling, behavior sequence construction, and heterogeneous graph construction; the first data mining result at least includes a user behavior sequence corresponding to the behavior sequence construction and a user behavior graph corresponding to the heterogeneous graph construction.
[0199] A second data mining operation is performed on the first data mining result to obtain a second data mining result for the first data mining result; the second data mining operation includes a cross-session attack pattern recognition based on a preset neural network and a potential risk identification; the second data mining operation is used to identify and judge whether the target user is a potential malicious user.
[0200] The first data mining result and the second data mining result are determined as the data mining information of the target user.
[0201] It can be seen that, in the optional embodiment, through the time series graph analysis technology, the interactive events of the target user can be comprehensively time series modeled and behavior sequence constructed, the dynamic changes and complex relationships of the user behavior can be captured, and the comprehensiveness and accuracy of the behavior analysis can be improved. In addition, the cross-session attack mode recognition based on the preset neural network is set, the complex attack behavior across sessions can be effectively identified, the detection capability of the potential malicious user can be enhanced, and the security risk can be reduced. In addition, through the heterogeneous graph construction, different types of data (such as time series data and behavior sequence data) can be fused and analyzed, and the hidden association in the user behavior can be mined, which is beneficial to enhance the depth and breadth of data analysis.
[0202] In yet another optional embodiment, the manner in which the data mining module 304 performs the first data mining operation on all target interactive events to obtain the first data mining result corresponding to all target interactive events according to the time series graph analysis technology specifically includes:
[0203] determining node modeling information corresponding to each target interactive event, the node modeling information including event type, timestamp, and event weight; the event weight is used to indicate the risk level of the target interactive event;
[0204] performing node modeling on all target interactive events according to the time series graph analysis technology in combination with the node modeling information corresponding to each target interactive event to obtain a target time series node corresponding to each target interactive event; all target time series nodes include a first time series node corresponding to each first interactive event and a second time series node corresponding to each second interactive event;
[0205] performing time sorting on all target interactive events according to the timestamp corresponding to each target time series node to obtain a user behavior sequence for the target user;
[0206] performing heterogeneous graph construction on all target time series nodes to obtain a user behavior graph corresponding to all target time series nodes;
[0207] determining the user behavior sequence and the user behavior graph as the first data mining result.
[0208] It can be seen that, in the optional embodiment, the target interaction events are time-series node modeled by the node modeling information (event type, timestamp, event weight), which can accurately capture the time characteristics and risk levels of user behaviors, and is conducive to improving the efficiency of subsequent data analysis; and all the target interaction events are sorted based on the timestamp to generate user behavior sequences, which can intuitively reflect the dynamic changes and time-series relationship of user behaviors, and is conducive to identifying abnormal behavior patterns; and different types of target time-series nodes are integrated into a unified user behavior graph through heterogeneous graph construction, which can mine complex associations and hidden patterns in user behaviors, and is conducive to improving the depth and breadth of subsequent data analysis. In addition, the risk levels of the target interaction events are quantified by the event weight, which can integrate risk information in time-series modeling and heterogeneous graph construction, and is conducive to enhancing the identification and early warning capabilities of high-risk events.
[0209] In another optional embodiment, the manner in which the data mining module 304 performs heterogeneous graph construction on all target time-series nodes to obtain the user behavior graph corresponding to all target time-series nodes specifically includes:
[0210] determining graph parameters for constructing the heterogeneous graph, and determining graph parameter data corresponding to the graph parameters from all target time-series nodes, the graph parameters including node parameters and edge parameters; the node parameters including user nodes and resource nodes; the user nodes being used for user identification; the resource nodes being used for recording user access resources; the edge parameters including first edges, second edges and third edges; the first edges being used for recording user association information between multiple users; the second edges being used for recording access behaviors of users for access resources; and the third edges being used for recording resource association information between multiple access resources;
[0211] performing edge weight calculation on each target interaction event according to the node modeling information corresponding to the target interaction event to obtain an edge weight value corresponding to the target interaction event;
[0212] constructing the user behavior graph according to the graph parameters and the corresponding graph parameter data, and all edge weight values.
[0213] It can be seen that in the optional embodiment, through the design of node parameters (user nodes and resource nodes) and edge parameters (the first edge, the second edge and the third edge), the multi-dimensional information of user behavior can be comprehensively captured, including user identity, accessed resources, user association, access behavior and resource association, the comprehensiveness and accuracy of data analysis are improved; through the edge weight calculation of each target interaction event, the strength and association of user behavior can be quantified, so that the user behavior mode is more accurately modeled, and data support is provided for personalized recommendation, user grouping and the like; and based on the graph parameters and the edge weight values, the user behavior graph can be automatically constructed, manual intervention is reduced, and the data processing efficiency is improved; finally, through the design of the first edge, the second edge and the third edge, the complex association between users, users and resources, and resources can be deeply mined, and the construction accuracy and fineness of the heterogeneous graph are further improved.
[0214] Embodiment four
[0215] Please refer to Figure 5 , Figure 5 is a structure schematic view of an interaction monitoring device based on an LLM security protection system disclosed by the embodiment of the application. As shown in Figure 5 , the interaction monitoring device based on the LLM security protection system can include:
[0216] a memory 401 storing executable program codes;
[0217] a processor 402 coupled with the memory 401;
[0218] The processor 402 invokes the executable program codes stored in the memory 401 to execute the steps in the interaction monitoring method based on the LLM security protection system described in the embodiment one or the embodiment two of the application.
[0219] Embodiment five
[0220] The embodiment of the application discloses a computer storage medium, which stores computer instructions, and when the computer instructions are invoked, the steps in the interaction monitoring method based on the LLM security protection system described in the embodiment one or the embodiment two of the application are executed.
[0221] Embodiment six
[0222] The embodiment of the application discloses a computer program product, which includes a non-transitory computer storage medium storing a computer program, and the computer program is operable to make a computer execute the steps in the interaction monitoring method based on the LLM security protection system described in the embodiment one or the embodiment two.
[0223] The system embodiments and device embodiments described above are only illustrative, wherein the modules illustrated as separate components can or can not be physically separated, and the components illustrated as modules can or can not be physical modules, i.e., can be located in one place or distributed to multiple network modules. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0224] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be realized by means of software and necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, and the computer software products can be stored in computer storage media, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other computer readable medium capable of carrying or storing data.
[0225] Finally, it should be noted that: the disclosed method and system for interaction monitoring based on LLM security protection system disclosed by the embodiments of the present application are only the preferred embodiments of the present application, and are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that; the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An interactive monitoring method based on an LLM security protection system, characterized in that, The method includes: The system captures the interaction data stream between the target user and the LLM security protection system in real time, and performs data extraction on the interaction data stream to obtain monitoring data corresponding to each preset target monitoring parameter; all target monitoring parameters include at least text input, and all target monitoring parameters also include at least one of output content, timestamp, and user identity identifier; Perform multidimensional data processing on all the monitoring data to obtain multidimensional data processing results corresponding to all the monitoring data; the multidimensional data processing includes at least one of semantic tag generation, behavior type identification, and risk level identification. Based on a preset dynamic strategy engine, combined with preset matching rules and machine learning models, parallel analysis is performed on the multidimensional data processing results to obtain parallel analysis results corresponding to the multidimensional data processing results; the parallel analysis includes abnormal interaction identification and risk level classification; the parallel analysis results are used to feed back to the administrators of the LLM security protection system to show the target user's usage status of the LLM security protection system; the usage status includes abnormal interaction status with system interaction anomalies or normal interaction status opposite to the abnormal interaction status.
2. The interactive monitoring method based on an LLM security protection system according to claim 1, characterized in that, The method further includes: Obtain historical audit data corresponding to the target user; the historical audit data records the historical interaction data stream of the target user accessing the LLM security protection system and its corresponding historical parallel analysis results; Based on time-series graph analysis technology, data mining is performed on the parallel analysis results and the historical audit data to obtain data mining information for the target user. Based on the data mining information, a user behavior profile for the target user is constructed; Based on the user behavior profile, the target detection parameters in the machine learning model are updated with parameter weights; the machine learning model includes multiple model detection parameters; each model detection parameter corresponds to an interaction behavior between a user and the LLM security protection system, and each model detection parameter has its corresponding parameter weight in the machine learning model; the multiple model detection parameters include the target detection parameters, which are only bound to the target user.
3. The interactive monitoring method based on an LLM security protection system according to claim 2, characterized in that, The step of performing multidimensional data processing on all the monitoring data to obtain multidimensional data processing results corresponding to all the monitoring data includes: The monitoring data is subjected to entity extraction and intent recognition according to a preset natural language processing model to obtain first processed data corresponding to the monitoring data; the entity extraction is used to extract keywords corresponding to the text input; the intent recognition is used to determine the interaction needs of the target user to interact with the LLM security protection system, and the interaction needs are matched with the keywords. Based on a predefined industry compliance rule library, the first processed data is sequentially subjected to content compliance judgment and tag labeling operations to obtain the second processed data corresponding to the first processed data. The tag labels corresponding to the tag labeling operations include compliant tags or non-compliant tags; the second processed data includes the tag labeling results corresponding to the tag labeling operations. Based on the labeling results, risk level classification is performed on the second processed data to obtain the risk level classification results corresponding to the second processed data; The second processed data and the risk level classification result are determined as the multidimensional data processing result corresponding to all the monitoring data.
4. The interactive monitoring method based on an LLM security protection system according to claim 3, characterized in that, The step of performing risk level classification on the second processed data based on the labeling results to obtain the risk level classification result corresponding to the second processed data includes: Based on multiple preset behavioral characteristics, data extraction is performed on the historical audit data to obtain historical behavioral data corresponding to each behavioral characteristic; these multiple behavioral characteristics include time characteristics, frequency characteristics, and path characteristics; the time characteristics include login time distribution and operation time interval; the frequency characteristics include operation count and access frequency; the path characteristics include access path sequence and resource access order; For each of the aforementioned behavioral features, calculate the corresponding statistic for the historical behavioral data, wherein the statistic includes at least one of the mean, standard deviation, and distribution function. Based on the statistics corresponding to all the historical behavioral data, the behavioral baseline of the target user is determined, and the behavioral baseline includes sub-behavioral baselines corresponding to each of the behavioral features; Based on the behavioral baseline and the labeling results, deviation calculation is performed on the second processed data to obtain the target deviation corresponding to the second processed data. The target deviation includes the sub-deviation corresponding to each sub-behavioral baseline and the comprehensive deviation corresponding to all sub-deviations. Based on the target deviation, the second processed data is classified into risk levels to obtain the risk level classification result corresponding to the second processed data.
5. The interactive monitoring method for an LLM-based security protection system according to any one of claims 2-4, characterized in that, Both the parallel analysis results and the historical audit data include multiple target interaction events of the target user with respect to the LLM security protection system. All target interaction events include at least one first interaction event corresponding to the parallel analysis results and at least one second interaction event corresponding to the historical audit data. The step involves performing data mining on the parallel analysis results and the historical audit data using time-series graph analysis technology to obtain data mining information for the target user, including: Based on time-series graph analysis technology, a first data mining operation is performed on all the target interaction events to obtain a first data mining result corresponding to all the target interaction events; the first data mining operation includes time-series node modeling, behavior sequence construction, and heterogeneous graph construction; the first data mining result includes at least a user behavior sequence corresponding to the behavior sequence construction and a user behavior graph corresponding to the heterogeneous graph construction. A second data mining operation is performed on the first data mining result to obtain a second data mining result based on the first data mining result; the second data mining operation includes cross-session attack pattern identification and potential risk identification based on a preset neural network; the second data mining operation is used to identify and determine whether the target user is a potential malicious user. The first data mining result and the second data mining result are determined as data mining information for the target user.
6. The interactive monitoring method based on an LLM security protection system according to claim 5, characterized in that, The step of performing a first data mining operation on all the target interaction events based on time-series graph analysis technology to obtain first data mining results corresponding to all the target interaction events includes: Determine the node modeling information corresponding to each target interaction event, the node modeling information including event type, timestamp, and event weight; the event weight is used to indicate the risk level of the target interaction event. Based on time-series graph analysis technology, and combined with the node modeling information corresponding to each target interaction event, node modeling is performed on all target interaction events to obtain target time-series nodes corresponding to each target interaction event; all target time-series nodes include a first time-series node corresponding to each first interaction event and a second time-series node corresponding to each second interaction event; Based on the timestamp corresponding to each target time node, all target interaction events are sorted by time to obtain a user behavior sequence for the target user. Heterogeneous graph construction is performed on all the target time-series nodes to obtain user behavior graphs corresponding to all the target time-series nodes; The user behavior sequence and the user behavior graph are identified as the first data mining result.
7. The interactive monitoring method for an LLM-based security protection system according to claim 6, characterized in that, The step of constructing a heterogeneous graph for all the target time-series nodes to obtain a user behavior graph corresponding to all the target time-series nodes includes: The graph parameters for constructing the heterogeneous graph are determined, and graph parameter data corresponding to the graph parameters are determined from all the target time-series nodes. The graph parameters include node parameters and edge parameters; the node parameters include user nodes and resource nodes; the user nodes are used for user identification; the resource nodes are used to record the resources accessed by the user; the edge parameters include a first edge, a second edge, and a third edge; the first edge is used to record user association information between multiple users; the second edge is used to record the user's access behavior for the accessed resources; and the third edge is used to record resource association information between multiple accessed resources. Based on the node modeling information corresponding to each target interaction event, the edge weight calculation is performed on the target interaction event to obtain the edge weight value corresponding to the target interaction event. A user behavior graph is constructed based on the graph parameters and their corresponding graph parameters, as well as the edge weight values.
8. An interactive monitoring system based on an LLM security protection system, characterized in that, The system includes: The data acquisition module is used to capture the interaction data stream between the target user and the LLM security protection system in real time, and to perform data extraction on the interaction data stream to obtain monitoring data corresponding to each preset target monitoring parameter; all target monitoring parameters include at least text input, and all target monitoring parameters also include at least one of output content, timestamp, and user identity identifier; A multidimensional data processing module is used to perform multidimensional data processing on all the monitoring data to obtain multidimensional data processing results corresponding to all the monitoring data; the multidimensional data processing includes at least one of semantic tag generation, behavior type recognition, and risk level recognition. The parallel analysis module is used to perform parallel analysis on the multidimensional data processing results according to a preset dynamic strategy engine, combined with preset matching rules and machine learning models, to obtain parallel analysis results corresponding to the multidimensional data processing results; the parallel analysis includes abnormal interaction identification and risk level classification; the parallel analysis results are used to feed back to the administrators of the LLM security protection system to show the target user's usage status of the LLM security protection system; the usage status includes abnormal interaction status with system interaction anomalies or normal interaction status opposite to the abnormal interaction status.
9. An interactive monitoring device based on an LLM security protection system, characterized in that, The device includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the interactive monitoring method based on the LLM security protection system as described in any one of claims 1-7.
10. A computer storage medium, characterized in that, The computer storage medium stores computer instructions, which, when invoked, are used to execute the interactive monitoring method based on the LLM security protection system as described in any one of claims 1-7.
Citation Information
Patent Citations
Content verification method and system based on LLM security protection
CN120257301A
System and method for a digital advisor using specialized language models and adaptive avatars
US20250225587A1