A data security processing method, device and medium based on artificial intelligence
By collecting and analyzing users' mouse movement trajectories and text selection data, a multimodal behavior baseline model is established to monitor and identify abnormal behaviors in real time. This solves the problem of high false alarm rates caused by device changes in existing technologies and achieves more efficient data security protection.
Patent Information
- Application Number
- CN202610754884.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-11-17
AI Technical Summary
Existing data security protection methods rely on static authentication and traditional anomaly detection, which are difficult to identify account theft and internal threats. Furthermore, mouse trajectory characteristics are easily affected by device changes, resulting in a high false alarm rate.
Collect user mouse movement trajectories and text selection data on the target dataset, extract kinematic and semantic features, establish a multimodal behavior baseline model, monitor and match the current user's operation behavior in real time, and identify abnormal behavior through artificial intelligence models.
It effectively reduces the false alarm rate, improves the sensitivity of identifying account theft and abnormal behavior, adapts to the upgrading of user devices, and has stronger robustness and practicality.
Smart Images

Figure CN123116242A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security processing technology, and in particular to a data security processing method, device and medium based on artificial intelligence. Background Technology
[0002] Current data security protection methods mainly rely on static access control (such as user authentication and role-based access control) or rule-based anomaly detection (such as operation frequency limits). However, once static authentication methods (passwords, fingerprints, etc.) are stolen or copied, attackers can completely impersonate legitimate users. Traditional anomaly detection often only focuses on operation type or frequency, ignoring the deep behavioral habits of users during data content interaction, making it difficult to effectively identify account theft or internal threats. In recent years, although methods using biometric behavioral characteristics such as mouse trajectories for identity recognition have emerged, mouse trajectories are heavily dependent on specific hardware devices (such as mouse DPI, sampling rate, and grip shape). Device changes will cause significant drift in trajectory features, resulting in a large number of false positives. In addition, most existing methods do not consider users' text selection habits when reading data (such as conscious or unconscious selection of numbers and summary statements). These habits are highly individualized and hardware-independent, but have not yet been systematically incorporated into security decisions. Therefore, there is an urgent need for a data security processing method that can integrate multiple behavioral modalities, resist the impact of device changes, and extract personalized habits at the semantic level. Summary of the Invention
[0003] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:
[0004] According to a first aspect of this application, a data security processing method based on artificial intelligence is provided, the method comprising the following steps:
[0005] S100, acquire the operation behavior data of the authorized user on the target data set; the operation behavior data includes mouse movement trajectory data and text selection data; the text selection data includes the content selected by the authorized user by long-pressing and dragging the left mouse button when viewing the target data set.
[0006] S200, feature extraction is performed on the acquired operation behavior data; wherein, kinematic features are extracted from the mouse movement trajectory data, and semantic features are extracted from the text selection data; the semantic features include the content category, length, position of the selected text, and the context information of the text in the document;
[0007] S300, use the extracted features to train an artificial intelligence model, and establish a corresponding behavioral baseline model for each authorized user; the behavioral baseline model includes the distribution of the corresponding authorized user's selection habits on different semantic content;
[0008] S400, Real-time monitoring of the user's actions on the target data set;
[0009] S500: If the current user's operation is detected as a dangerous operation, the feature corresponding to the current user's operation data within the most recent preset time window is obtained.
[0010] S600, input the features corresponding to the current user's operation behavior data in the most recent preset time window into the preset artificial intelligence model to obtain the matching degree between the current user's behavior and the behavior baseline model;
[0011] S700 determines whether the current user is an authorized user based on the matching degree of the current user;
[0012] S800: If the current user is an unauthorized user, then the current user's operation will be blocked.
[0013] According to another aspect of this application, a non-transitory computer-readable storage medium is also provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described artificial intelligence-based data security processing method.
[0014] According to another aspect of this application, an electronic device is also provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0015] The present invention has at least the following beneficial effects:
[0016] The AI-based data security processing method of this invention, compared with existing technologies, effectively overcomes the feature drift problem caused by mouse trajectory changes due to device replacement by collecting and analyzing users' text selection data (including the semantic category, length, position, and contextual information of the selected content) of a target data set, and extracting personalized reading habit features independent of hardware. This significantly reduces the false alarm rate. By combining mouse kinematic features with text selection semantic features to construct a multimodal behavioral baseline model, it can more comprehensively and accurately characterize the operation fingerprint of authorized users, improving the sensitivity of identifying abnormal behaviors such as account theft and script attacks. Real-time monitoring of dangerous operations and extraction of behavioral features within a preset time window for matching degree calculation upon triggering achieves dynamic, low-latency protection against high-risk operations, avoiding the performance overhead of continuous full-data analysis. Fourth, by selecting highly discriminative features during the training phase (such as eliminating common behaviors based on mutual information), the individual recognition capability of the model is further improved, reducing redundant data interference. In summary, this invention can ensure data security while adapting to the actual situation of user device upgrades in real-world scenarios, possessing stronger robustness and practicality. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart of an artificial intelligence-based data security processing method provided in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be noted that, based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Furthermore, this device and / or practice the method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.
[0021] The following will refer to Figure 1 The flowchart shown introduces an AI-based data security processing method.
[0022] This solution is applicable to data access control scenarios that require distinguishing between trusted individuals and imposters. Authorized users refer to legitimate individuals (e.g., finance employee Zhang San) whose personalized behavioral baselines have been established through pre-collected operational behaviors (such as mouse movement patterns and text selection habits for specific semantic content). The current user refers to the real-time object performing the operation (which could be Zhang San himself or an attacker, Li Si, who has stolen the account). The system monitors all operations in real time. When a dangerous operation is detected (such as downloading, exporting, or network transmission), it immediately traces back the behavioral characteristics of the last 30 seconds and calculates the match rate against the baseline model of the authorized user corresponding to that account. If the match rate is high, the operation is allowed directly; if the match rate is medium, secondary verification is triggered; if the match rate is low, the current user is determined to be an unauthorized user, the operation is blocked, and an alarm is triggered. This achieves security protection so that even if the password is leaked, attackers cannot complete sensitive operations due to inconsistent behavioral habits.
[0023] This AI-based data security processing method may include the following steps:
[0024] S100, acquire the operation behavior data of the authorized user on the target data set; the operation behavior data includes mouse movement trajectory data and text selection data; the text selection data includes the content selected by the authorized user by long-pressing and dragging the left mouse button when viewing the target data set.
[0025] In this embodiment, when authorized users are using the protected data set (such as internal databases, document management systems, code repositories, etc.) normally, two types of raw data are continuously collected through front-end event tracking or client-side proxy:
[0026] Mouse movement trajectory data: The pixel coordinates (x, y) of the mouse cursor on the screen and the corresponding timestamp are recorded at a fixed sampling frequency (e.g., 20Hz, i.e., once every 50 milliseconds). To avoid privacy leaks and network congestion, data compression can be performed on the client side, uploading only keyframes or calculating derived features.
[0027] Text selection data: Listen for the browser's `selectionchange` event or the application's mouse release event. When the user presses the left mouse button and drags to select text, capture the selected plain text content, the start and end positions of the selection (DOM path or character offset), the timestamp of the selection operation, and whether actions such as copying or highlighting were performed after selection.
[0028] For example, when an authorized user named "Zhang San" is viewing a financial statement PDF, he uses his mouse to long-press and drag to select the text "net profit increased by 15.2%". The system records this text string, its coordinates in the document (page 3, line 12), the selection time of 0.8 seconds, and captures his subsequent Ctrl+C copy. This raw data is packaged and sent to the backend server and stored in the user behavior database.
[0029] This step lays the data foundation for subsequent extraction of hardware-independent personalized features by seamlessly collecting two complementary behavioral modalities—mouse trajectories reflecting movement style and text selection revealing content preferences—without interfering with the user's normal work.
[0030] S200, feature extraction is performed on the acquired operation behavior data; wherein, kinematic features are extracted from the mouse movement trajectory data, and semantic features are extracted from the text selection data; the semantic features include the content category, length, position of the selected text, and the context information of the text in the document.
[0031] Furthermore, step S200 includes the following steps:
[0032] S210, determine whether the selected text data is intentionally or unintentionally selected; wherein, the determination condition for intentional selection is: the length of the selected text is greater than the first threshold or the copy, highlight or comment operation is performed after selection; the determination condition for unintentional selection is: the length of the selected text is less than the second threshold and the selection duration is less than the third threshold and no subsequent operation is performed after selection.
[0033] In this embodiment, in the front-end tracking script, each time a mouseup event (i.e., the left mouse button is released) is captured and a text selection area exists, the following information is immediately recorded: the length of the selected text (number of characters), the duration of the selection (the time difference from mousedown to mouseup, in milliseconds), and whether subsequent operations such as copying (Ctrl+C or right-click menu copy), highlighting (calling the highlighting API) or adding comments have occurred within 500 milliseconds after selection.
[0034] The system presets three thresholds (which can be set experimentally or empirically, for example, the first threshold = 5 characters, the second threshold = 3 characters, and the third threshold = 300 milliseconds). Judgment logic:
[0035] If the selected text is longer than 5 characters or if copying / highlighting / commenting is performed after selection, it is considered a deliberate selection.
[0036] Otherwise, if the selected text length is less than 3 and the duration is less than 300ms and there is no subsequent operation, it is determined to be an unintentional selection.
[0037] Other cases (such as those with a length between 3 and 5 and no subsequent operations) can be temporarily marked as "unknown" and not used as primary features.
[0038] For example, if a user quickly scrolls over the word "profit" while reading a financial report (length 2, time 120ms, not copied), the system determines it as an unintentional selection; if the user then long-presses and drags "net profit growth 15%" (length 7, time 850ms, copied), it is determined as a conscious selection. This determination result will be appended to the selection event log.
[0039] This step automatically distinguishes between intentional, proactive selections and unconscious eye-following actions by considering three dimensions: length, time, and subsequent actions. This allows for the extraction of distinct features from each type of behavior: conscious selection reflects deeper reading preferences, while unconscious selection reveals the initial focus of attention. This distinction forms the basis for subsequent extraction of confirmation chain features, and it is completely seamless and requires no additional user labeling.
[0040] S220, Perform semantic analysis on the intentionally selected text and extract at least one of the following features: frequency of numerical content, frequency of summary keywords, frequency of proper nouns, sentiment polarity value, cosine similarity between the selected text and the preceding and following text, and the hierarchical position of the selected area in the document structure.
[0041] In this embodiment, for each text segment (usually a sentence or phrase) marked as intentionally selected, the system backend uses a lightweight natural language processing workflow to extract the following features (all or a subset can be selected; it is recommended to extract all features to enhance robustness):
[0042] Frequency of numeric content: Use the regular expression `\d+(\.\d+)?` to match all digits, including integers, decimals, percentages (with % sign), and currency amounts (with ¥ / $). Count the number of times digits appear and the percentage of digits in the total character count.
[0043] Summary keyword frequency: Pre-construct a dictionary of summary keywords, including "in conclusion," "therefore," "conclusion," "in summary," "we believe," "it is worth noting," etc. (both Chinese and English are acceptable). Count the number of these keywords appearing in the selected text and divide by the total number of words.
[0044] Proper noun frequency: Call a lightweight named entity recognition model (such as one based on conditional random fields or preset company name and person name patterns) to identify proper nouns (company names, product names, person names, place names) and count their occurrences.
[0045] Sentiment polarity value: Calculated using a sentiment dictionary (e.g., CNKI Sentiment Dictionary) as a weighted sum of positive and negative words, normalized to the range [-1, 1]. For example, "growth" and "positive news" are positive, while "decline" and "loss" are negative.
[0046] Cosine similarity between selected text and its surrounding context: The first 200 characters and the last 200 characters of the selected text are taken as the context. The selected text and its context are then vectorized using TF-IDF or pre-trained sentence vectors (such as all-MiniLM-L6-v2). The cosine similarity between the two vectors is then calculated. Normal users tend to select key parts that are significantly different from the surrounding content, resulting in a moderate to low similarity; while random selections result in a high similarity.
[0047] The selected area's hierarchical position within the document structure: This can be obtained through the DOM tree (for web pages) or the Document Object Model (PDF / Word), including the heading level (h1~h6), table row / column number, code function name, paragraph index, etc. For example, recording the row and column number in a table, or whether it is located within a comment or loop body in code.
[0048] After all features are standardized (subtract the mean and divide by the standard deviation), they are concatenated into a fixed-dimensional feature vector (e.g., 20-dimensional), which serves as one of the inputs to the subsequent model.
[0049] For example, selecting the text "Third quarter net profit increased by 15.2% year-on-year, exceeding expectations," the following features are extracted: the number appears twice (15.2 and two numerical units), there are no summary keywords, no proper nouns, the sentiment polarity value is +0.8 (positive), the similarity with the surrounding text is 0.35, and the position is in the 5th row of the table, in the "Financial Summary" column. These features collectively depict the user's habit of focusing on specific data and preferring positive information.
[0050] This step consciously selects features from simple text strings and transforms them into multi-dimensional feature vectors with semantic meaning. This allows the model to capture the user's cognitive focus while reading—for example, some users prefer data, while others prefer conclusive statements. These features are completely hardware-independent and remain unchanged even when the device is changed, effectively overcoming the hardware sensitivity of traditional mouse trajectory features. Simultaneously, the features are highly individual-specific, with significant differences in distribution among different users, providing a strong signal for accurate identity recognition.
[0051] S230, extract character-level N-gram hash fingerprints from the unconsciously selected text, and count whether there is a conscious selection that intersects or is adjacent to the unconsciously selected area in space within the fourth time threshold after the unconscious selection ends. If so, mark it as a confirmation chain feature. The confirmation chain feature includes the probability of confirmation chain occurrence and the average response time.
[0052] In this embodiment, for each unconsciously selected segment (usually very short, such as 2-4 characters), its character-level N-gram is extracted (e.g., N is 2 or 3, i.e., a substring composed of 2 or 3 adjacent characters). A hash value is calculated for each N-gram (e.g., using a hash function or taking the first 32 bits of MD5), and then all N-gram hash values within the segment are grouped into a set or multiset (preserving frequency). This set serves as the "fingerprint" of that unconscious selection. Furthermore, the fingerprints of all unconscious selections by the same user can be clustered (e.g., using MinHash) to obtain several typical unconscious word-selection patterns favored by the user (e.g., a preference for selecting "but," "this," etc.).
[0053] For each unintentional selection event, the system listens for a conscious selection event within a fourth time threshold (e.g., 2 seconds) after the event ends, and if the event simultaneously satisfies the conditions of spatial adjacency or intersection: that is, the conscious selection area (start offset, end offset) overlaps with the unintentional selection area, or the distance between the two in the document is less than a specified number of characters (e.g., 20 characters). If these conditions are met, the unintentional selection event is marked as "confirmed".
[0054] Based on the above statistics, calculate the characteristics of the two confirmation chains:
[0055] The probability of a confirmation chain occurring = the number of unconscious selections confirmed / the total number of unconscious selections (for a session or a sliding time window).
[0056] Average response time = the average time difference (in milliseconds) from the end of an unconscious selection to the start of an conscious selection across all confirmation chains.
[0057] For example, a user unconsciously selects "growth" (length 2, fingerprint hash set {"growth", "growth"}). 1.2 seconds later, they intentionally select "net profit growth 15.2%", and the selection completely contains the word "growth", thus forming a confirmation chain. The session had 10 unconscious selections, 6 of which were confirmed, so the confirmation chain probability is 0.6. The response times for the 6 selections were [850ms, 1100ms, 950ms, 1300ms, 1050ms, 1200ms], with an average response time of approximately 1075ms.
[0058] These features are added to the user behavior feature vector, alongside the consciously selected features.
[0059] This step reveals the text patterns that users subconsciously focus on through unintentionally selected fine-grained fingerprints (such as certain users frequently swiping over transition words or conjunctions), patterns that are difficult for attackers to imitate. The confirmation chain features characterize the cognitive delay and habits of users from "first glance" to "convinced action"—for example, attentive users may pause longer, while decisive users respond faster. These features exhibit extremely high individual stability and resistance to imitation, and are completely unaffected by changes in mouse hardware, greatly improving recognition accuracy in scenarios involving device replacement.
[0060] Furthermore, the kinematic features of the mouse movement trajectory extracted in step S200 include: the screen coordinate sequence of the mouse sampling points, and the instantaneous velocity component (v). x ,v y ), instantaneous acceleration component (a x ,a y ), trajectory curvature κ, jitter level J, and entropy of change in direction of movement H dir And the vertical alignment distance d between the mouse trajectory and the center line of the document text line. perp mean μ d and standard deviation σ d ;in:
[0061] ;
[0062] ;
[0063] v x and v y These represent the instantaneous movement speed of the mouse cursor along the X and Y axes of the screen, respectively; a x and a y These are the instantaneous accelerations of the mouse cursor along the X and Y axes, respectively; J = Var( ) 1 / 2 Var() is the variance function; i is the index of the direction interval, and n is the total number of discretized direction intervals; θ i The interval is the discretized direction angle between adjacent sampling points; The corner of the mouse movement direction at the 1st The probability within a discretized interval.
[0064] In this embodiment, all calculations are based on the mouse screen coordinate sequence recorded by the front end at a fixed sampling frequency (e.g., 20Hz, i.e., once every 50 milliseconds). ,in, The sampling time is specified. After sampling the original coordinates, the velocity and acceleration of each point are first calculated using the finite difference method, and then higher-order features are derived.
[0065] 1. Instantaneous velocity component
[0066] For the sampling points ( ), set time interval (Constant value at a fixed sampling frequency).
[0067] ;
[0068] To avoid noise, a simple moving average smoothing (window size 3) can be applied to the velocity sequence. The mean, standard deviation, percentile, etc. of the velocity within each time window (e.g., 30 seconds) are extracted as the final feature input, instead of the original time series.
[0069] For example: the mouse moves from (100, 200) to (110, 205). ,but pixels per second Pixels per second.
[0070] The velocity component directly reflects the user's agility and preferred direction when moving the mouse. Although the absolute velocity value is affected by the mouse DPI setting, its relative variation pattern (such as the skewness and kurtosis of the velocity distribution) has a certain degree of individual stability, and combining it with other features can improve the robustness of recognition.
[0071] 2. Instantaneous acceleration components
[0072] Based on the obtained velocity sequence, the acceleration is calculated using the central difference method:
[0073] ;
[0074] For the first and last points, use forward or backward differencing. Similarly, within the time window, calculate the mean, variance, and zero-crossing rate of acceleration.
[0075] For example: the previous moment The next moment , ,but Pixels per second².
[0076] Acceleration describes the "force" characteristic of a user's hand movements—whether it's a sudden stop and start or smooth acceleration and deceleration. This characteristic is less affected by mouse hardware (because even if the DPI changes, the user will still control the start and stop with similar muscle force), making it an effective indicator for distinguishing between manual operation and script simulation.
[0077] 3. Trajectory curvature
[0078] Curvature describes the degree of bending in the mouse trajectory. It is calculated by dividing the magnitude of the cross product of the velocity and acceleration vectors by the cube of the velocity magnitude:
[0079] ;
[0080] Calculate the instantaneous curvature for each sampling point (which must have both velocity and acceleration). To avoid the denominator being close to zero (when the mouse is stationary), calculation is only performed when the velocity magnitude is greater than a threshold (e.g., 5 pixels / second). The mean, maximum, and variance of the curvature are then calculated within the window.
[0081] For example: point (Horizontal to the right) (Vertical upward acceleration), then the molecules denominator curvature (Radians / pixel). If the velocity direction remains constant and the acceleration is perpendicular, the curvature reflects the severity of the turn.
[0082] Curvature characterizes the smoothness of the trajectory drawn by the user. The natural movement of a normal human hand produces continuously varying curvature, while scripts or mechanical simulations often exhibit piecewise straight lines or abrupt curvature. This feature remains stable when the user changes mice because the bending habit stems from the user's wrist rotation pattern.
[0083] 4. Shaking level J
[0084] The jitter level J is the reciprocal of the velocity variance. First, calculate the instantaneous rate. Then, the variance of the rate is calculated within each time window. ,but:
[0085] ;
[0086] in, It is a very small positive number (e.g.) This prevents division by zero. A greater degree of jitter indicates a smoother movement (smaller rate change), while a smaller degree indicates hand tremor or high sensor noise.
[0087] For example: the rate sequence within a certain window is [210, 215, 208, 212] pixels / second, with a small variance, for example... ,but Another window rate sequence [180, 250, 190, 270] has a large variance, such as... ,but .
[0088] The degree of jitter reflects the stability of a user's hand control. Long-term mouse users exhibit relatively fixed patterns of small muscle jitter, and even when changing mice (different DPIs or polling rates), their relative jitter levels remain consistent. This characteristic is particularly helpful in distinguishing between fine motorists (such as designers) and rough motorists (such as gamers).
[0089] 5. Entropy of change in direction of movement
[0090] Direction angle calculation: for two adjacent sampling points and Calculate the direction angle of movement Result range .
[0091] Discretization: to The range is divided into equal parts. intervals (e.g.) Each interval ).according to Values mapped to range indices .
[0092] Probability estimation: Within a time window, count the frequency of occurrence of each interval, divide by the total number of directional changes, and obtain the probability. .
[0093] Entropy calculation: ;
[0094] Using a base-2 logarithm, the unit of entropy is bits. When the distribution is uniform in all directions, the entropy is at its maximum. When the directions are completely concentrated, the entropy is 0.
[0095] For example: when a user reads text, 70% of the orientation angle is... The interval (horizontally shifted to the right), 20% is in (Horizontal left shift), the remaining intervals are few, so the probability distribution is concentrated. Smaller (e.g., 1.2 bits); if the attacker moves the mouse randomly, the directions are evenly distributed. near Bit.
[0096] Entropy of directional changes quantifies the regularity of user navigation behavior. Normal users browsing structured documents exhibit a clear bias in their movement direction (primarily moving horizontally along text lines), resulting in lower entropy; while abnormal operations or scripts often show irregular jitter, leading to higher entropy. This feature is not sensitive to hardware devices and reflects the user's reading strategy.
[0097] 6. Vertical alignment distance between the mouse trail and the center line of the document text line mean and standard deviation
[0098] Obtaining the center line of a text line: The front-end obtains the vertical coordinate of each line of text through the DOM API (web page) or a PDF parsing library. For code editors or tables, the center line of a cell or row can be used as a reference.
[0099] Calculate the vertical distance: for each mouse sampling point Find the nearest center line of the text line on the vertical axis. Then the vertical alignment distance .
[0100] Window statistics: Within a time window, calculate the corresponding statistics for all sampling points. arithmetic mean and sample standard deviation .
[0101] For example: A user frequently and precisely places the mouse cursor in the middle of a line of text. Pixels Pixels; another user habit is to place the cursor slightly below the center of the line. Pixels, but the offset is very stable. Pixels. When changing mice, the absolute offset values for two users may not change much (because the eye still guides the hand to align with the text), but if users intentionally simulate this, it is difficult to maintain the same value simultaneously. and combination.
[0102] This feature leverages the visual-motor coordination habits of humans when reading. Even if the mouse hardware or driver changes the absolute movement speed of the cursor, the user will still subconsciously align the cursor with the center of the line of text being read. and It exhibits strong hardware invariance. It is one of the key features for resisting false alarms related to device replacement, and it complements other semantic features (selection behavior).
[0103] The six kinematic features mentioned above collectively constitute the "motion fingerprint" of the mouse trajectory. Among them, speed and acceleration are relatively significantly affected by hardware, but curvature, orientation entropy, alignment distance, and jitter after normalizing the speed variance all exhibit varying degrees of hardware independence. Combining these features with text selection semantic features enables the model to maintain high recognition accuracy even after the user changes their mouse.
[0104] Furthermore, after step S200 and before step S300, the method further includes the following steps:
[0105] S240, Obtain historical operation behavior data of several authorized users, and construct a candidate feature pool F = (f1, f2, ..., f...). j , ..., f M ), j=1,2,…,M; where, f j Let f be the j-th candidate feature, and M be the number of candidate features; j It can be continuous or discrete.
[0106] Collect historical operation data from at least several hundred authorized users (e.g., 500 people), each with no fewer than 10 sessions. For each session, extract all possible raw features according to the S200 method, including but not limited to: mean and standard deviation of mouse speed, mean and variance of acceleration, mean trajectory curvature, jitter level, directional entropy, mean and standard deviation of vertical alignment distance, and text selection-related features (such as frequency of selected numbers, frequency of summary sentences, frequency of proper nouns, average length of conscious selection, probability of confirmation chain after unconscious selection, average response time, etc.). Perform preliminary sorting of these features, treating each feature as a candidate variable. Candidate features can be continuous (e.g., average mouse speed = 125 pixels / second) or discrete (e.g., whether a number has been selected, with a value of 0 or 1). Each feature value corresponds to a record, along with the user ID to which that record belongs.
[0107] This step establishes a candidate feature pool covering multiple behavioral modalities, providing a complete feature space for subsequent filtering. Because the feature pool contains multi-dimensional information such as mouse kinematics, text semantics, and temporal correlations, subsequent filtering can select features that truly have individual distinguishability without overlooking potential effective features.
[0108] S250: For f j Calculate f j Mutual information I(f) between user identity identifier U and user identity identifier U j ;U):
[0109] ;
[0110] Where U is a random variable representing the user's identity; u is the first summation variable; V j f j The set of all possible values; v is the second summation variable; f j The probability that the value is v and belongs to user u; When user identity is not considered, f j Values The probability of; Data belongs to the user The probability of.
[0111] In this embodiment, mutual information Measuring features With user identity The degree of dependency between them. The calculation steps are as follows:
[0112] Discretization: If For continuous features (such as average mouse speed), quantile discretization is used to map them to a finite number of value intervals. For example, the feature values of all users can be sorted from smallest to largest and divided into 10 equal-frequency intervals, with each interval corresponding to a discrete value. (e.g., "extremely slow", "slow", "medium", "fast", "extremely fast"). If If it is already discrete, then the original set of values can be used directly. .
[0113] Calculate joint probability : Statistically analyze all samples, features Values And the sample belongs to the user The number of samples is divided by the total number of samples.
[0114] Calculate marginal probabilities : Statistical analysis of features in all samples The number of samples divided by the total number of samples.
[0115] Calculate marginal probabilities : User statistics The number of samples divided by the total number of samples.
[0116] Substitute into the formula: for each user and each possible value ,calculate Then sum them. To avoid computational underflow, when the probability is 0, it is agreed that... .
[0117] Mutual information can quantify the effectiveness of features in distinguishing different users without presupposing any linear relationship, and is applicable to features with various distribution patterns. This step can automatically identify which behavioral features are truly individual-specific (such as the frequency of selecting specific semantic content) and which features are common to the group (such as average mouse speed), providing an objective mathematical basis for subsequent removal of redundant features.
[0118] S260: Retain mutual information values greater than a preset threshold I th Features that eliminate mutual information values below I th Common behavioral characteristics.
[0119] Preset mutual information threshold , This can be determined experimentally, for example, by taking the upper quartile of all feature mutual information values, or by directly setting it to 0.1 bits (an empirical value). For each candidate feature... ,Compare and The features are then filtered out, resulting in a subset with a dimension much smaller than the original M (e.g., reduced from 50 to 15). This subset of features, along with its corresponding mutual information values, is stored in a configuration file for use during the online inference phase. When significant changes occur in the user group (e.g., a large influx of new employees), S240-S260 can be re-run every few months to update the feature set.
[0120] This step significantly reduces the input dimensionality of subsequent models by eliminating common noise features, thereby reducing the risk of overfitting and accelerating training and inference. More importantly, because only the features most capable of distinguishing individual identities are retained, the model can still rely on these device-independent personalized habits (such as the frequency of selecting specific semantic content) to make accurate judgments when faced with hardware changes or environmental changes, thus reducing the false positive rate. Experiments show that after mutual information filtering, the recognition accuracy in mouse-changing scenarios can be improved from 85% to over 93%.
[0121] Furthermore, I th =0.1; F contains at least the following features: average mouse speed, standard deviation of mouse speed, frequency of selecting numeric content, frequency of selecting summary sentences, probability of confirmation chain after unconscious selection, average text length of conscious selection, mouse turning angle distribution entropy, and standard deviation of scroll step; wherein, the mutual information value of average mouse speed and standard deviation of scroll step is less than 0.1 and is discarded.
[0122] S300, use the extracted features to train an artificial intelligence model and establish a corresponding behavioral baseline model for each authorized user; the behavioral baseline model includes the distribution of the corresponding authorized user's selection habits on different semantic content.
[0123] In this embodiment, the feature vectors obtained in S200 are used as training samples, and each sample is accompanied by a user ID label. A two-stream Transformer model architecture is adopted:
[0124] First stream (mouse stream): Input a sequence of mouse kinematic features within a time window (shape [time step, feature dimension]), and extract the trajectory embedding vector h_mouse through one-dimensional convolution and Transformer encoder.
[0125] The second stream (event stream) is the sequence of text selection events within the same input window (each event is composed of semantic feature vectors and confirmation chain features), and the event embedding vector h_event is extracted by an independent Transformer encoder.
[0126] Cross-attention module: Multi-head cross-attention fusion of h_mouse and h_event is performed to obtain a comprehensive embedding vector h_fuse, which is then mapped to a 128-dimensional behavior embedding vector z through a fully connected layer.
[0127] Training employs contrastive learning: positive samples are paired with different session windows from the same user, while negative samples are paired with windows from different users or anomalous simulated windows from the same user. The loss function is Triplet Loss, which ensures that embedding vectors from the same user are close to each other, while embedding vectors from different users are far apart. After training, the center point z_center (i.e., the mean) of all normal session embedding vectors for each authorized user is calculated as the baseline model for that user's behavior. Optionally, a feature filtering step (see weight 4) is performed: by calculating the mutual information between each feature and the user ID, common features with mutual information below 0.1 (such as average mouse speed) are removed, retaining only high-discrimination features (such as selected digit frequency, confirmation chain probability, etc.) for model training.
[0128] For example, after training with data from Zhang San's past 100 conversations, his behavioral embedding center z_center=[0.12,-0.35,…,0.78] (128 dimensions) was obtained. This center reflects his typical reading habits: a preference for selecting numbers and summary sentences, a 70% probability of confirming text after unconsciously underlining words, and a relatively small curvature of mouse movement.
[0129] This step establishes a dynamic, multi-dimensional behavioral fingerprint for each user, which can capture the individual's unique preferences at the content semantic level; the combination of contrastive learning and mutual information filtering effectively suppresses common noise in the group, enabling the model to maintain high recognition accuracy even when facing new devices or a small number of samples.
[0130] S400, monitors in real time the operation behavior initiated by the current user on the target data set.
[0131] Deploy a real-time listener on the data access gateway or application front-end to continuously capture all operation events of the current session, including: mouse movement, text selection, scrolling, clicks, keyboard shortcuts, and operations that can trigger data flow (such as download button clicks, copying to clipboard, and network upload requests). All events are timestamped and temporarily stored in a circular buffer, with the buffer size covering operations over the most recent 10 minutes. The monitoring process does not perform model inference; it only caches raw data to minimize performance overhead.
[0132] This step enables low-latency, low-resource monitoring of user operations. By retaining the most recent context through a circular buffer, it provides a data foundation for backtracking collection when dangers are triggered, avoiding the computational burden caused by full-time, full-volume feature extraction.
[0133] S500: If the current user's operation is detected as a dangerous operation, the feature corresponding to the current user's operation data within the most recent preset time window is obtained.
[0134] Furthermore, step S500, determining whether an operation is dangerous, includes the following steps:
[0135] S510, predefine a set of hazardous operation types D = {download file, transmit data over network, batch export records, copy to external storage device}.
[0136] In this embodiment, the system administrator predefines a set of dangerous operation types through a configuration file or management interface based on the security policy of the protected data set. This collection contains categories of operations that could lead to data breaches or unauthorized dissemination. Typical elements include:
[0137] Download files: Save data to your local disk using a browser, FTP client, scp command, etc.
[0138] Data transfer over the network: sending data using HTTP POST, uploading email attachments, transferring files via instant messaging software, and synchronizing with cloud storage.
[0139] Batch export records: Execute SELECT INTO OUTFILE from the database, retrieve all records paginated via API, and generate CSV / Excel files using the export function.
[0140] Copy to external storage devices: Copy files to removable media such as USB flash drives, external hard drives, and SD cards.
[0141] Furthermore, other types can be added based on business needs, such as printing sensitive documents, taking screenshots, and copying large amounts of data via the clipboard. (Collection) It can be dynamically updated, for example, by adding "transfer via Bluetooth" after a new threat is detected. The system loads this collection at runtime and keeps it resident in memory for quick matching.
[0142] For example: a financial company defines "Export CSV", "Send Email to External Domain", "Print Documents Larger Than 10 Pages", "Copy to USB Device" This configuration is read when the system starts.
[0143] By predefining a set of dangerous operations, the system can focus on high-risk actions that could actually lead to data breaches, avoiding indiscriminate testing of all operations and thus significantly reducing computational overhead. At the same time, the configurability of the set allows security policies to be flexibly adapted to different industries and business scenarios with varying sensitivity levels, improving the portability of the solution.
[0144] S520: Obtain the current user's operation instruction ZL. If the operation type of ZL is D, it is determined to be a dangerous operation.
[0145] In this embodiment, every operation command triggered by the current user (such as clicking the "download" button, calling a network sending API, or executing a database export command) is captured in real time through operating system kernel hooks, application plugins, or browser extension layers. The captured command objects... It must include at least the following fields: operation type (e.g., DOWNLOAD, EMAIL_SEND, USB_COPY), operation parameters (e.g., file path, target email address, number of records to export), and timestamp. The system will... Operation type fields and predefined collections Compare:
[0146] like The operation type exists in In China (e.g.) If the operation type is "batch export records", it will be immediately identified as a dangerous operation and the subsequent steps will be triggered ("get the features corresponding to the current user's operation behavior data in the most recent preset time window" in S500).
[0147] If it does not exist In China (e.g.) If the operation type is "open file", then allow the operation and do not start the behavior collection and recognition process.
[0148] To balance performance, this matching process is typically implemented using a hash set (HashSet), with a time complexity of O(n log n). It will not cause any perceptible delay to normal operation.
[0149] For example: The current user attempts to execute "send email to an external domain", and the system captures... The operation type is EMAIL_SEND. Check. The data contained this type, therefore it was identified as a dangerous operation. The mouse trajectory and text selection data of the last 30 seconds were immediately reviewed for identification.
[0150] This step enables real-time, lightweight detection of dangerous operations, initiating a computationally intensive behavior matching process only when the operation crosses the line, thus avoiding continuous high-load computation. By directly comparing operation types rather than behavior patterns, it ensures low detection latency (typically within milliseconds) and effectively blocks non-interactive attacks such as automated scripts or API calls, as these attacks often lack real mouse and selection data during the feature extraction stage and are therefore naturally distinguishable.
[0151] S600, input the features corresponding to the current user's operation behavior data within the most recent preset time window into the preset artificial intelligence model to obtain the matching degree between the current user's behavior and the behavior baseline model.
[0152] The pre-trained two-stream Transformer model is invoked, using the feature vector sequence obtained from S500 as input. The model outputs the behavior embedding vector z_current for the current window. Then, the historical behavior embedding center z_center of the authorized user corresponding to the currently logged-in account is read from the system (pre-stored in the database). The cosine similarity between the two is calculated as the similarity score. The similarity range is between -1 and 1, with the closer to 1 indicating a greater consistency between the current behavior and the historical baseline. If feature filtering is used internally in the model, only the filtered subset of features is input into the model.
[0153] Furthermore, the artificial intelligence model used in step S600 is a two-stream Transformer model, including:
[0154] The mouse trajectory encoding stream takes as input a temporal sequence of mouse kinematic features within the preset time window and outputs a trajectory embedding vector h_mouse through multi-layer one-dimensional convolution and a Transformer encoder.
[0155] The input is a temporal sequence of mouse kinematic features extracted from the S500 within the most recent preset time window (e.g., 30 seconds). For each time step (sampling point), the feature vector includes: instantaneous velocity components. Instantaneous acceleration components trajectory curvature degree of shaking Entropy of change in direction of movement Vertical alignment distance Therefore, the input format is [T, D_mouse], where, D_mouse represents the number of time steps (e.g., 600 steps in 30 seconds at a sampling frequency of 20Hz). D_mouse represents the feature dimension for each time step (e.g., 12 dimensions).
[0156] The processing flow is as follows:
[0157] One-dimensional convolutional layer: First, two one-dimensional convolutional layers (kernel size 3, stride 1, number of output channels 64) are used to extract local features and reduce noise in the original time series while preserving the time order.
[0158] Positional encoding: Add learnable positional encoding (sinusoidal or trainable parameters) to enable the model to perceive the order of different moments in the sequence.
[0159] Transformer Encoder: Uses a stack of standard Transformer encoders (e.g., 4 layers, 8 attention heads per layer, 256 dimensions of the feedforward network). The input sequence passes through a multi-head self-attention network (masked or unmasked, since the entire sequence is available) and a positional feedforward network, outputting an encoded sequence representation.
[0160] Pooling: Global average pooling is performed on all time steps of the encoder output to obtain a fixed-dimensional trajectory embedding vector. .
[0161] Mouse trajectory encoding streams can effectively capture users' movement habits over time, such as changes in movement speed, curvature distribution, and stability of directional entropy. One-dimensional convolutional layers can extract local patterns (such as subtle pauses or accelerations), while the Transformer's self-attention mechanism can model long-range dependencies (such as the overall movement trend when scrolling from the top to the bottom of the page), enabling... It becomes a compact representation of mouse behavior style.
[0162] The event encoding stream takes as input a sequence of text selection events within the preset time window. Each event is composed of a semantic feature vector and a confirmation chain feature. The event embedding vector h_event is output by the Transformer encoder.
[0163] The input is a sequence of text selection events within the same time window. Each event contains a semantic feature vector (e.g., 20-dimensional) extracted from S220 and S230, along with confirmation chain features (e.g., 2-dimensional: confirmation probability, average response time). These are concatenated to obtain a representation vector for each event. (e.g., 22-dimensional). If multiple occurrences occur within the window... If a number of events are selected, the input shape will be [K, D_event]. Note that the events are ordered by occurrence time in the sequence, but the time intervals may not be uniform.
[0164] The processing flow is as follows:
[0165] Linear projection: Maps the original feature vector of each event to the model dimension (e.g., 128-dimensional) through a learnable linear layer.
[0166] Location encoding: Since events may occur at uneven times, use timestamp-based continuous location encoding (such as the sin(t) function) or learnable location embeddings.
[0167] Transformer encoder: Also uses a multi-layer Transformer encoder (parameters may differ from mouse flow), which captures the dependencies between events through self-attention (e.g., the association between unintentional selection and subsequent intentional selection, and the topic shift of multiple selected content).
[0168] Pooling: The encoding results of all events are averaged and pooled to obtain the event embedding vector. .
[0169] Event-encoded streams are specifically designed to model discrete, sparse selection behaviors with rich semantics. The Transformer's self-attention mechanism automatically learns the temporal and semantic relationships between different events (e.g., confirmation chains, topic shifts), rather than just the features of individual events. This allows the model to understand users' reading strategies—for example, some people habitually skim first (unconscious highlighting) and then read carefully (conscious selection), while others read carefully directly. This sequence pattern exhibits extremely high individual stability and is hardware-independent.
[0170] The cross-attention module is used to perform multi-head cross-attention fusion of h_mouse and h_event to obtain the fusion vector h_fuse.
[0171] Embed mouse trajectory into vector and event embedding vector Multimodal fusion is performed. A multi-head cross-attention mechanism is adopted, with two specific implementation methods (this solution uses the first one):
[0172] Using event streams as queries and mouse streams as keys: As a query, Using the key and value, calculate cross-attention and output a fused vector. This is equivalent to having the event characteristics query which time periods in the mouse trajectory are related to the event (e.g., whether the mouse is precisely aligned when the selection event occurs).
[0173] Bidirectional cross-attention: Calculate separately arrive and arrive The attention is then spliced or averaged.
[0174] This solution adopts the first approach because the events occur less frequently and are more suitable for guidance. The specific operation is as follows: [The rest of the text appears to be incomplete and requires further context.] Sequence (T time steps) and The sequence (K events) is transformed into Q, K, and V through linear transformations. Using... , , Attention weights are calculated and weighted summation is performed, followed by residual connections and layer normalization, and finally passed through a feedforward network to obtain the final result. .
[0175] The cross-attention module establishes a spatiotemporal correspondence between mouse movement and text selection. For example, when a user selects key data, the mouse becomes more stable and the alignment is more precise, or there is a brief hover before highlighting words. This cross-modal interaction information cannot be provided by a single modality, further improving the accuracy of individual recognition and its resistance to imitation. In addition, this module allows the model to tolerate partial modality loss (e.g., when there is no selection event within the window, the mouse flow can be used alone).
[0176] The output layer is used to map h_fuse through a fully connected layer into a 128-dimensional behavior embedding vector z.
[0177] fusion vector Input a fully connected layer (output dimension 128), then pass it through L2 normalization to obtain the final behavior embedding vector. ,satisfy After normalization, the cosine similarity of two vectors is equivalent to their dot product, which facilitates fast calculation.
[0178] The matching degree is the cosine similarity between the current user's behavior embedding vector z_current and the center of the historical behavior embedding vector z_center of the authorized user corresponding to the current user.
[0179] The dual-stream Transformer model, by separately encoding mouse trajectories and text selection event sequences and then fusing them with cross-attention, fully leverages the temporal structure, semantic content, and cross-modal associations in user actions to generate highly individual-specific behavioral embeddings. Compared to traditional single-stream models (using only mouse trajectories or only operation logs), this model significantly improves robustness to device replacement—because the semantic features and confirmation chain features in the event encoding stream are completely unaffected by mouse hardware, and the cross-attention module further allows the mouse stream to "learn" how to calibrate from the event stream. Furthermore, the Transformer's self-attention mechanism eliminates the need for manually designing feature combination rules, automatically discovering complex behavioral patterns, such as "users often unconsciously underline words and increase mouse alignment accuracy before selecting numbers." These technical characteristics enable this solution to consistently and accurately identify authorized users in real-world, dynamic office environments, effectively preventing account theft and internal threats.
[0180] S700 determines whether the current user is an authorized user based on the matching degree of the current user.
[0181] In this embodiment, a three-level threshold determination strategy can be adopted (the threshold is determined in advance through statistical analysis of historical data, for example, taking the 5% and 95% quantiles of the similarity distribution of positive and negative samples):
[0182] If the matching degree is greater than or equal to the first threshold (e.g., 0.85), the user is directly identified as an authorized user and allowed to perform dangerous operations.
[0183] If the second threshold ≤ matching degree < first threshold (e.g., 0.65 ≤ sim < 0.85), then a secondary verification step is initiated: a verification code is displayed, facial recognition is performed, or a dynamic code is sent to the registered mobile phone. If the verification passes, the user is temporarily allowed access, and this behavior is added to the online learning pool as a normal sample; if the verification fails, the user is determined to be an unauthorized user.
[0184] If the matching degree is less than the second threshold (e.g., 0.65), the user is directly identified as an unauthorized user.
[0185] During the cold start phase (when there are insufficient new user samples), all dangerous operations are forced to undergo secondary verification first, while the group baseline of users with the same role is used as an alternative model.
[0186] S800: If the current user is an unauthorized user, then the current user's operation will be blocked.
[0187] When the S700 determines that the user is unauthorized, it performs blocking actions: immediately suspending any ongoing dangerous operations (e.g., interrupting the download connection, displaying an "insufficient permissions" message, or closing the export dialog box). All context of this event is recorded in the audit log, including timestamp, login account, IP address, device fingerprint, match score, and a summary of the original behavioral characteristics.
[0188] Furthermore, the method also includes the following cold start processing steps:
[0189] S010, for newly registered authorized users, if the accumulated amount of operational behavior data is less than the preset sample size N. min In this case, the behavioral baseline model of the same user group is used as an alternative model.
[0190] When a new authorized user is added to the system (such as a newly hired employee), there is not enough historical operational data for that user to establish a personalized behavioral baseline model. The system presets a minimum sample size threshold. ,For example A complete operation session (each session lasting more than 5 minutes and containing at least 3 dangerous operation trigger windows). The amount of user-accumulated operation behavior data (i.e., the number of valid sessions meeting quality requirements) is less than... Previously, the system did not train a separate model for it, but instead used a baseline model of group behavior of users with the same role as a temporary substitute. The specific steps are as follows:
[0191] Role Grouping: The system pre-classifies authorized users into roles based on their job positions, departments, or functions (e.g., "Financial Analyst," "Software Development Engineer," "Sales Manager"). Each role group already possesses a large amount of historical behavioral data from experienced users, and the system has offline trained a "group baseline model" and corresponding group embedding center for that role group. .
[0192] Assigning new users: When a new user registers, the administrator needs to assign them a role. The system then embeds this role group into the central database. This serves as the initial baseline for the new user.
[0193] Matching degree calculation: During the cold start phase, when a new user triggers a dangerous operation, the system still executes the S500~S700 process, only calculating the matching degree. Replace with .
[0194] Data Accumulation: The system continuously collects the operational behavior of new users. Each valid session (containing sufficient mouse traces and text selection events) is added to the user's historical data cache. When the number of valid sessions reaches [a certain threshold], [the system continues to accumulate data]. Then, the system automatically triggers personalized model training, calculating a unique model for that user. And replace the group baseline.
[0195] This step addresses the "cold start" problem for new users lacking historical data. By utilizing common behavioral patterns among users in similar roles as a substitute model, it ensures basic security protection for new users from their first operation, avoiding the crude judgments of purely rule-based models. Furthermore, role grouping is business-rational—users in similar positions share similar operational habits (e.g., finance personnel generally prefer selecting numbers), guaranteeing a certain level of predictive accuracy for the group baseline, making it more targeted than random or company-wide uniform models.
[0196] S020, during the cold start phase, each dangerous operation triggers secondary authentication until enough operational behavior data is collected to establish a corresponding behavior baseline model.
[0197] During the cold start phase, the system uses a group substitution model rather than a user-personalized model, resulting in lower reliability of the matching score and a certain risk of misjudgment. To compensate for this deficiency, the system enforces a stricter verification strategy: for each dangerous operation, regardless of the matching score calculation result (even if the matching score is higher than the first threshold), the operation is not allowed directly, but is forced into a secondary authentication process.
[0198] The two-factor authentication method is configurable and includes, but is not limited to: facial recognition (via camera liveness detection), SMS / email dynamic verification code, TOTP (such as Google Authenticator), hardware token or fingerprint recognition.
[0199] Users must successfully pass two-factor authentication before dangerous operations are allowed; otherwise, even if the behavior matches the authentication criteria, the operation will still be blocked and the anomaly will be logged.
[0200] This mandatory verification policy continues to be executed until the system detects that the user's accumulated valid sessions have reached a certain number. And successfully trained a personalized baseline model.
[0201] This step, by enforcing two-factor authentication during the cold start phase, effectively mitigates security vulnerabilities that might arise from insufficient personalization in the group baseline model, ensuring that new user accounts are not compromised due to model misjudgments before they have been fully learned. Simultaneously, this progressive security strategy balances user experience and risk control—as user data accumulates, the security level gradually transitions from "conservative" to "intelligent," avoiding long-term disruptions and preventing early attackers from exploiting model uncertainties for breaches.
[0202] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0203] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.
[0204] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0205] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0206] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0207] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0208] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0209] The electronic device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments in this application.
[0210] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different system components (including memory and processor).
[0211] The memory stores program code that can be executed by the processor, causing the processor to perform the steps in the various embodiments described in this specification.
[0212] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).
[0213] The memory may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0214] A bus can represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus structures.
[0215] Electronic devices can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable user interaction with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be achieved through input / output (I / O) interfaces. Furthermore, electronic devices can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapters. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0216] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0217] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.
[0218] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention.
Claims
1. A data security processing method based on artificial intelligence, characterized in that, The method includes the following steps: S100, acquire the operation behavior data of the authorized user on the target data set; the operation behavior data includes mouse movement trajectory data and text selection data; the text selection data includes the content selected by the authorized user by long-pressing and dragging the left mouse button when viewing the target data set. S200, feature extraction is performed on the acquired operation behavior data; wherein, kinematic features are extracted from the mouse movement trajectory data, and semantic features are extracted from the text selection data; the semantic features include the content category, length, position of the selected text, and the context information of the text in the document; S300, use the extracted features to train an artificial intelligence model, and establish a corresponding behavioral baseline model for each authorized user; the behavioral baseline model includes the distribution of the corresponding authorized user's selection habits on different semantic content; S400, Real-time monitoring of the user's actions on the target data set; S500: If the current user's operation is detected as a dangerous operation, the feature corresponding to the current user's operation data within the most recent preset time window is obtained. S600, input the features corresponding to the current user's operation behavior data in the most recent preset time window into the preset artificial intelligence model to obtain the matching degree between the current user's behavior and the behavior baseline model; S700 determines whether the current user is an authorized user based on the matching degree of the current user; S800: If the current user is an unauthorized user, then the current user's operation will be blocked.
2. The data security processing method based on artificial intelligence according to claim 1, characterized in that, Step S200 includes the following steps: S210, determine whether the selected text data is intentionally or unintentionally selected; wherein, the determination condition for intentional selection is: the length of the selected text is greater than the first threshold or the copy, highlight or comment operation is performed after selection; the determination condition for unintentional selection is: the length of the selected text is less than the second threshold and the selection duration is less than the third threshold and no subsequent operation is performed after selection; S220, Perform semantic analysis on the intentionally selected text and extract at least one of the following features: frequency of numerical content, frequency of summary keywords, frequency of proper nouns, sentiment polarity value, cosine similarity between the selected text and the preceding and following text, and the hierarchical position of the selected area in the document structure. S230, extract character-level N-gram hash fingerprints from the unconsciously selected text, and count whether there is a conscious selection that intersects or is adjacent to the unconsciously selected area in space within the fourth time threshold after the unconscious selection ends. If so, mark it as a confirmation chain feature. The confirmation chain feature includes the probability of confirmation chain occurrence and the average response time.
3. The data security processing method based on artificial intelligence according to claim 2, characterized in that, The kinematic features of the mouse movement trajectory extracted in step S200 include: the screen coordinate sequence of the mouse sampling points, and the instantaneous velocity component (v). x ,v y ), instantaneous acceleration component (a x ,a y ), trajectory curvature κ, jitter level J, and entropy of change in direction of movement H dir And the vertical alignment distance d between the mouse trajectory and the center line of the document text line. perp mean μ d and standard deviation σ d ;in: ; ; v x and v y These represent the instantaneous movement speed of the mouse cursor along the X and Y axes of the screen, respectively; a x and a y These are the instantaneous accelerations of the mouse cursor along the X and Y axes, respectively; J = Var( ) 1 / 2 Var() is the variance function; i is the index of the direction interval, and n is the total number of discretized direction intervals; θ i The interval is the discretized direction angle between adjacent sampling points; The corner of the mouse movement direction at the 1st The probability within a discretized interval.
4. The data security processing method based on artificial intelligence according to claim 1, characterized in that, After step S200 and before step S300, the method further includes the following steps: S240, Obtain historical operation behavior data of several authorized users, and construct a candidate feature pool F = (f1, f2, ..., f...). j , ..., f M ), j=1,2,…,M; where, f j Let f be the j-th candidate feature, and M be the number of candidate features; j It can be continuous or discrete; S250: For f j Calculate f j Mutual information I(f) between user identity identifier U and user identity identifier U j ;U): ; Where U is a random variable representing the user's identity; u is the first summation variable; V j f j The set of all possible values; v is the second summation variable; f j The probability that the value is v and belongs to user u; When user identity is not considered, f j Values The probability of; Data belongs to the user The probability of; S260: Retain mutual information values greater than a preset threshold I th Features that eliminate mutual information values below I th Common behavioral characteristics.
5. The data security processing method based on artificial intelligence according to claim 4, characterized in that, I th =0.1; F contains at least the following features: average mouse speed, standard deviation of mouse speed, frequency of selecting numeric content, frequency of selecting summary sentences, probability of confirmation chain after unconscious selection, average text length of conscious selection, mouse turning angle distribution entropy, and standard deviation of scroll step; wherein, the mutual information value of average mouse speed and standard deviation of scroll step is less than 0.1 and is discarded.
6. The data security processing method based on artificial intelligence as described in claim 1, characterized in that, Step S500, determining whether an operation is dangerous, includes the following steps: S510, predefine a set of hazardous operation types D = {download file, transmit data over network, batch export records, copy to external storage device}; S520: Obtain the current user's operation instruction ZL. If the operation type of ZL is D, it is determined to be a dangerous operation.
7. The data security processing method based on artificial intelligence according to claim 2, characterized in that, The artificial intelligence model used in step S600 is a two-stream Transformer model, including: The mouse trajectory encoding stream takes as input a temporal sequence of mouse kinematic features within the preset time window and outputs a trajectory embedding vector h_mouse through multi-layer one-dimensional convolution and Transformer encoder. The event encoding stream takes as input a sequence of text selection events within the preset time window. Each event is composed of a semantic feature vector and a confirmation chain feature. The event embedding vector h_event is output by the Transformer encoder. The cross-attention module is used to perform multi-head cross-attention fusion of h_mouse and h_event to obtain the fusion vector h_fuse; The output layer is used to map h_fuse through a fully connected layer into a 128-dimensional behavior embedding vector z; The matching degree is the cosine similarity between the current user's behavior embedding vector z_current and the center of the historical behavior embedding vector z_center of the authorized user corresponding to the current user.
8. The data security processing method based on artificial intelligence according to claim 1, characterized in that, The method also includes the following cold start processing steps: S010, for newly registered authorized users, if the accumulated amount of operational behavior data is less than the preset sample size N. min In this case, the behavioral baseline model of the same user group is used as an alternative model; S020, during the cold start phase, each dangerous operation triggers secondary authentication until enough operational behavior data is collected to establish a corresponding behavior baseline model.
9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the AI-based data security processing method as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.
