Intelligent rail safety real-time verification method, server and storage medium based on large model
Through the smart track security real-time verification method based on big models, combined with dynamic graphics generation and user behavior analysis, automated scripts and manual verification are identified, and the problem of sliding verification codes being easily attacked is solved, improving security and attack resistance.
Patent Information
- Application Number
- CN202411213496.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing sliding verification code system is easily bypassed by automated script simulation sliding attacks and image recognition technology, resulting in reduced security and ineffective prevention of malicious cracking and ticket swiping.
Using a smart track security real-time verification method based on big models, combined with dynamic graphics generation technology and user behavior analysis, we generate sliding verification codes, obtain sliding time and trajectory behavior data, use machine learning algorithms to conduct risk assessment and security strategy adjustment, and identify automation Scripting and human verification.
It improves the ability of the sliding verification code to resist attacks, enhances the difficulty of identifying automated scripts and user behavior analysis, effectively distinguishes between manual and machine verification, and improves security.
Smart Images

Figure CN118761053B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security, and in particular to a large-model-based smart rail safety real-time verification method, server, and storage medium. Background Art
[0002] A verification code is a public fully automatic program that distinguishes whether a user is a computer or a human. It can prevent malicious password cracking, ticket fraud, and forum flooding, and effectively prevent illegal personnel from repeatedly trying to log in to a specific registered user using a specific program to crack the login password.
[0003] Traditional character-based verification codes are easily cracked by OCR (optical character recognition) technology, and their security has gradually failed to meet the requirements of the current network environment. As an emerging technology, sliding verification codes verify the user's true identity by requiring the user to complete a sliding operation of a specific pattern. Compared with traditional verification codes, they have better user experience and higher security. However, with the development of computer technology, the existing sliding verification code system still has security issues such as being easily simulated by automated scripts and bypassed by image recognition technology, which greatly reduces the protection effect.
[0004] Therefore, there is an urgent need for a verification method for sliding verification codes that can solve the above problems. Summary of the invention
[0005] In order to address the deficiencies of the prior art, the present application provides a large-model-based smart rail security real-time verification method, server and storage medium, which combines dynamic graphics generation technology, user behavior analysis and machine learning algorithms, and can identify sliding verification and manual verification of automated scripts, thereby improving the anti-attack capability of the sliding verification code.
[0006] The technical effects to be achieved by this application are achieved through the following solutions:
[0007] According to a first aspect of the present application, a method for real-time safety verification of smart rail based on a large model is provided, comprising the following steps:
[0008] Step 1: Generate a sliding verification code and arrange the background image and the notch image cut out from the background image on the interface;
[0009] Step 2: When the gap image slides to the background image for verification, behavior data is obtained, and the behavior data at least includes sliding time and sliding trajectory;
[0010] Step 3: Calculate according to the sliding time and the sliding trajectory to obtain time behavior characteristics and trajectory behavior characteristics;
[0011] Step 4: Send the time behavior feature and the trajectory behavior feature to the behavior analysis model, and the behavior analysis model performs risk assessment on the current behavior and adjusts the security policy according to the assessment result.
[0012] Preferably, in step 1, the specific steps of generating a sliding verification code are:
[0013] Upon receiving the verification request, a background image is randomly generated or selected, and a portion thereof is cut out as the gap image, wherein the position and shape of the gap image are randomly formed;
[0014] After the background image and the gap image are processed to determine the difficulty of identification, they are displayed on the interface.
[0015] Preferably, performing recognition difficulty processing on the background image and the gap image includes at least one of the following methods:
[0016] Adding Gaussian distribution noise to the background image and the gap image;
[0017] Cutting a plurality of interference gaps in the background image, wherein the interference gaps have the same shape as the gap image but have different angles and / or sizes;
[0018] The notch image is enlarged or reduced, with the ratio of enlargement or reduction being within 0.5%.
[0019] Preferably, the time behavior characteristics include: the time to complete the sliding verification, the completion time of different segments during the sliding process, the average value and standard deviation of all time samples to complete a specific operation, wherein: the average value of all time samples to complete a specific operation is calculated using the following formula:
[0020] ;
[0021] Where: t i is the time of the ith operation, n is the total number of operations;
[0022] The standard deviation is calculated as follows:
[0023] ;
[0024] Among them, t i is the time of the ith operation, n is the total number of operations, is the average time for a single operation.
[0025] Preferably, the trajectory behavior characteristics at least include trajectory smoothness, acceleration and velocity change values, and start and end point behaviors, wherein: the trajectory smoothness is obtained by calculating the curvature of each point of the trajectory by the following formula:
[0026] ,
[0027] Where: x′(t) and y′(t) are the first-order derivatives of x(t) and y(t) with respect to t, respectively, representing the tangent slope of the curve at that point; x′′(t) and y′′(t) are the second-order derivatives with respect to t; x(t) is the horizontal coordinate of the trajectory curve at time t, y(t) is the vertical coordinate of the trajectory curve at time t, and t is the time variable.
[0028] Preferably, in step 4, the risk assessment of the current behavior is specifically: scoring each time behavior feature and each trajectory behavior feature respectively, and adding up the weighted scores to obtain a behavior score, and when the behavior score is less than a threshold, it is determined to be a high-risk verification;
[0029] The security policy is adjusted according to the evaluation result as follows: re-performing steps 1 to 4 to re-verify the user; and restricting access when the number of re-verifications is greater than a threshold.
[0030] Preferably, in step 4, performing risk assessment on the current behavior further includes: obtaining the historical verification behavior, current time behavior characteristics and trajectory behavior characteristics of the current user, and counting the number of times determined as high-risk verifications, and when the number is greater than a threshold, determining the user as a high-risk user;
[0031] When the user is determined to be a high-risk user, the security policy is adjusted according to the evaluation result to: adjust the identification difficulty processing.
[0032] Preferably, the time behavior characteristics, trajectory behavior characteristics and risk assessment results of different users are collected to form a verification data set, and the verification data set is used to train and optimize the behavior analysis model.
[0033] According to a second aspect of the present application, a server is provided, comprising: a memory and at least one processor;
[0034] The memory stores a computer program, and the at least one processor executes the computer program stored in the memory to implement the above-mentioned large-model-based real-time smart rail safety verification method.
[0035] According to a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, the above-mentioned large-model-based smart rail safety real-time verification method is implemented.
[0036] According to one embodiment of the present application, the beneficial effects of adopting the large model-based smart rail safety real-time verification method are: combining dynamic graphics generation technology to increase the difficulty of machine recognition and improve the ability to resist attacks on automated scripts; analyzing user behavior and using a neural network model for learning to identify manual verification and machine verification, further enhancing the ability of the verification code to resist attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 This is a flowchart of a real-time smart rail safety verification method based on a large model in an embodiment of the present application;
[0039] Figure 2 This is a schematic diagram of the structure of a server in one embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0041] like Figure 1 As shown, the real-time safety verification method of smart rail based on a large model in an embodiment of the present application includes the following steps:
[0042] Step 1: Generate a sliding verification code and arrange the background image and the notch image cut out from the background image on the interface;
[0043] In this step, after receiving the user's verification request, the process of generating a sliding verification code is executed. A background image is randomly generated, or a picture is randomly selected from the picture library as the background image. The pictures in the picture library are pictures of scenery, pets, etc. without objection.
[0044] Cut out a part from the selected background image as the gap image, the position and shape of the gap image are randomly formed to avoid being recognized by the machine; the gap on the background image and the gap image can be matched by moving;
[0045] After the background image and the gap image are processed for identification difficulty, they are displayed on the interface and are placed separately during display, with the gap image being placed on one side or diagonally of the background image.
[0046] The purpose of performing recognition difficulty processing is to increase the recognition difficulty of the machine, including at least one of the following methods:
[0047] Adding Gaussian distribution noise to the background image and the gap image;
[0048] Cutting a plurality of interference gaps in the background image, wherein the interference gaps have the same shape as the gap image but have different angles and / or sizes;
[0049] The gap image is enlarged or reduced, and the ratio of enlargement or reduction is within 0.5%; the recognition difficulty of the machine is increased because it is not completely overlapped. At the same time, the small enlargement ratio does not affect the user's vision, and the gap image can also be placed in a designated position.
[0050] Step 2: When the gap image slides to the background image for verification, behavior data is obtained, and the behavior data at least includes sliding time and sliding trajectory;
[0051] In this step, during the user operation, that is, when dragging the gap image to the gap on the background image, various parameters from click to completion of the operation are obtained in real time, including sliding time parameters and sliding trajectory parameters, and the time and trajectory are combined, that is, the specific position of the trajectory at a certain moment of sliding, and the current time when sliding to a certain position, to facilitate subsequent calculations.
[0052] Step 3: Calculate according to the sliding time and the sliding trajectory to obtain time behavior characteristics and trajectory behavior characteristics;
[0053] In this step, the time behavior characteristics include: the time to complete the sliding verification, the completion time of different segments in the sliding process, the average value and standard deviation of all time samples to complete a specific operation, where:
[0054] The time for sliding verification starts from when the finger touches the notch image and ends when the finger leaves the notch image.
[0055] Analyzing the time to complete the sliding verification can help distinguish between machine operation and manual operation. Machine operation is often faster and regular, while human operation may have natural changes such as pauses and adjustments.
[0056] The completion time of different segments during the sliding process can reflect whether there are pauses and adjustments in the current operation. If the completion time of a certain segment is longer, it means that pauses, alignment adjustments and other actions have been made there, which is more similar to manual operation.
[0057] The average of all time samples to complete a specific operation (such as sliding a page) is calculated using the following formula:
[0058] ;
[0059] Where: t i is the time of the ith operation, n is the total number of operations;
[0060] Collect all the sliding records of users from the moment they click on the mobile phone screen in real time, and use the mobile phone screen as a coordinate axis. For example, each time a web page is swiped, a page is swiped within an APP, etc., record the time it takes to complete each sliding, and calculate the average sliding time. By comparing the average time with the time it takes to complete the sliding verification, you can determine whether the current sliding verification is abnormal. When the sliding verification time is much less than the average (for example, the sliding verification time is only less than one tenth of the average time), it means that the verification is a machine verification.
[0061] The standard deviation is used to measure the dispersion of time data. A large standard deviation indicates large fluctuations in the data, which may indicate natural changes in human operations. It is calculated as follows:
[0062] ;
[0063] Among them, t i is the time of the ith operation, n is the total number of operations, is the average time for a single operation.
[0064] The standard deviation is calculated through training after collecting data from different users or conversations. By comparing the standard deviations of different users or conversations, we can preliminarily determine whether there is abnormally fast or regular behavior, and whether it is a sign of machine operation.
[0065] The trajectory behavior characteristics include at least trajectory smoothness, acceleration and velocity change values, and start and end point behaviors, where:
[0066] The sliding trajectory in the sliding verification process is formed by splicing and fitting the periodically sampled position coordinates. The more sampling points there are, the higher the accuracy of the trajectory. Taking the size of a mobile phone screen as an example, the number of sampling points is usually around 100 to 1000 points.
[0067] Track smoothness, which is determined by calculating the smoothness of the slider's moving track. Human operation may have slight tremors or corrections, while the track of the automated script is straighter and more precise.
[0068] The curvature calculation of the sliding trajectory, for each segment of the trajectory, can be regarded as a polyline composed of multiple continuous points. The curvature is calculated between every two points, and the smoothness of the entire trajectory can be described by the statistical characteristics of all curvatures (such as average, maximum, standard deviation). The curvature is calculated by the following formula:
[0069] ,
[0070] Among them: x′(t) and y′(t) are the first-order derivatives of x(t) and y(t) with respect to t, representing the tangent slope of the curve at that point; x′′(t) and y′′(t) are the second-order derivatives with respect to t; x(t) and y(t) represent the horizontal and vertical coordinates of a point on the trajectory at time t. t is a time variable, representing the timestamp corresponding to each point on the trajectory.
[0071] Acceleration and speed change values: Analyze the acceleration changes and speed fluctuations during the sliding process. Real user operations will have irregular acceleration and deceleration, while automated scripts may maintain a constant speed.
[0072] Starting and ending behavior: Observe the user's actions at the beginning and end of sliding, including whether there is hesitation, whether it is directly and accurately aligned, etc. These can reflect whether there is a natural human reaction. When it is about to align, there will be a hesitant movement that fluctuates back and forth. Based on the trajectory of repeated fluctuations, it can be analyzed whether it is human or machine.
[0073] Step 4: Send the time behavior feature and the trajectory behavior feature to the behavior analysis model, and the behavior analysis model performs risk assessment on the current behavior and adjusts the security policy according to the assessment result.
[0074] In this step, the behavior analysis model is trained by a convolutional neural network (CNN). The various parameters of the manual sliding operation and the various parameters of the automatic sliding of the automated script are used as training sets to train the convolutional neural network. When the recognition success rate of the convolutional neural network reaches more than 90%, the training is completed and a behavior analysis model is formed.
[0075] The risk assessment of the current behavior is specifically as follows: scoring each time behavior feature and each trajectory behavior feature separately, and weighting and adding up the scores to obtain a behavior score. When the behavior score is less than a threshold, it is determined to be a high-risk verification. For example, the trajectory smoothness is scored. When the curvature of each point is less than the set threshold, the score for this item is 1. When the curvature of several points is greater than the set threshold, the score for this item is 10.
[0076] The weighted values are obtained based on the experience gained from the behavior analysis model during training. The parameters for sliding verification on different platforms are different. For example, the sliding verification on mobile terminals is mostly finger touch sliding, and the trajectory is relatively smooth, while on platforms such as computers, the trajectory will be different because the mouse is used for sliding verification. Using different weighted values for different platforms can effectively distinguish the evaluation of sliding verification on different platforms.
[0077] The security policy is adjusted according to the evaluation result as follows: re-performing steps 1 to 4, re-verifying the user, or using other verification methods for multiple verifications; when the number of re-verifications is greater than a threshold, access is restricted.
[0078] In order to improve the accuracy of classification, a risk scoring system is established: the full score is 100 points, and each 10 points is a segment. In the case of high availability based on large model identification, the results of each user operation are analyzed based on but not limited to the above dimensions, and the user operation score is used to score the user and identify high-risk users.
[0079] The risk assessment of the current behavior also includes: obtaining the historical verification behavior of the current user, the current time behavior characteristics and the trajectory behavior characteristics, and counting the number of high-risk verifications, and when the number is greater than a threshold, the user is determined to be a high-risk user;
[0080] When a user is determined to be a high-risk user, the security policy is adjusted according to the evaluation result to: adjust the recognition difficulty processing, such as replacing a more complex background image, adopting a stricter matching requirement, etc.;
[0081] More complex background images are those with more colors, more repeated elements, or more complex lines. For example, a single grassland photo can be replaced with a more colorful city photo or an intricate viaduct photo.
[0082] The stricter matching requirements are: the position overlap requirement is increased, the initial gap image only needs to cover 90% of the gap, and the coverage is changed to 95%. Or the coordinate overlap requirement for the gap image is increased, the initial gap image position can be placed within a certain range, and when the user is determined to be a high-risk user, the range is narrowed, thereby increasing the difficulty of sliding verification.
[0083] Further recognition difficulty processing can be performed to further increase the difficulty of machine recognition. For example, when regenerating the background image, the ratio of enlarging or reducing the notch image can be increased from the original 5 / 1000 to 10 / 1000, thereby further increasing the difficulty of machine recognition; the proportion of Gaussian distribution noise in the background image can be increased to blur the background image and reduce the success rate of machine recognition.
[0084] In one embodiment of the present application, the following steps are also included: continuously collecting the time behavior characteristics of different users, the trajectory behavior characteristics and risk assessment results to form a verification data set, reporting the verification data set to the server, and using the verification data set to train and optimize the behavior analysis model to improve the recognition accuracy of automated attacks.
[0085] Monitor the verification process in real time and collect various verification data in real time, such as verification success rate, verification behavior of users judged as high-risk users, etc., collect feedback data, report the feedback data to the server, and adjust the verification strategy and algorithm parameters in time to respond to new attack methods.
[0086] A server in an embodiment of the present application includes: a memory 201 and at least one processor 202;
[0087] The memory 201 stores a computer program, and the at least one processor 202 executes the computer program stored in the memory 201 to implement the above-mentioned large model-based smart rail safety real-time verification method.
[0088] In one embodiment of the present application, a computer-readable storage medium stores a computer program, and when the computer program is executed, the above-mentioned large-model-based smart rail safety real-time verification method is implemented.
[0089] According to this embodiment, the beneficial effects of adopting this large model-based smart rail safety real-time verification method are: combining dynamic graphics generation technology to increase the difficulty of machine recognition and improve the ability to resist attacks on automated scripts; analyzing user behavior and using a neural network model for learning to identify manual verification and machine verification, further enhancing the ability of the verification code to resist attacks.
[0090] It should be noted that the above detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs.
[0091] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0092] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0093] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0094] For ease of description, spatially relative terms, such as "above", "above", "on the upper surface of", "above", etc., may be used herein to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" may include both "above" and "below". The device may also be positioned in other different ways, such as rotated 90 degrees or in other orientations, and the spatially relative descriptions used herein are interpreted accordingly.
[0095] In the above detailed description, reference is made to the accompanying drawings, which form a part of this document. In the accompanying drawings, similar symbols typically identify similar components unless the context indicates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be used, and other changes may be made, without departing from the spirit or scope of the subject matter presented herein.
[0096] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A real-time safety verification method for intelligent rail based on a large model, characterized in that: The steps include: Step 1: Generate a sliding verification code and arrange the background image and the notch image cut out from the background image on the interface; Step 2: When the gap image slides to the background image for verification, behavior data is obtained, and the behavior data at least includes sliding time and sliding trajectory; Step 3: Calculate according to the sliding time and the sliding trajectory to obtain time behavior characteristics and trajectory behavior characteristics; The time behavior characteristics include: the time to complete the sliding verification, the completion time of different segments in the sliding process, the average value and standard deviation of all time samples to complete the sliding operation, wherein: the average value of all time samples to complete the sliding operation is calculated using the following formula: ; Where: t i is the time of the ith operation, n is the total number of operations; The standard deviation is calculated as follows: ; Among them, t i is the time of the ith operation, n is the total number of operations, is the average time of a single operation; The trajectory behavior characteristics at least include trajectory smoothness, acceleration and velocity change values, and start and end point behaviors, wherein: the trajectory smoothness is obtained by calculating the curvature of each point of the trajectory using the following formula: , Where: x′(t) and y′(t) are the first-order derivatives of x(t) and y(t) with respect to t, representing the tangent slope of the curve at that point; x′′(t) and y′′(t) are the second-order derivatives with respect to t; x(t) is the abscissa of the trajectory curve at time t, y(t) is the ordinate of the trajectory curve at time t, and t is the time variable; Step 4: Send the time behavior feature and the trajectory behavior feature to the behavior analysis model, and the behavior analysis model performs risk assessment on the current behavior and adjusts the security policy according to the assessment result.
2. The real-time safety verification method for intelligent rail based on a large model according to claim 1 is characterized in that: In step 1, the specific steps to generate the sliding verification code are: Upon receiving the verification request, a background image is randomly generated or selected, and a portion thereof is cut out as the gap image, wherein the position and shape of the gap image are randomly formed; After the background image and the gap image are processed to determine the difficulty of identification, they are displayed on the interface.
3. The real-time safety verification method for smart rail based on a large model according to claim 2 is characterized in that: The identification difficulty processing of the background image and the gap image includes at least one of the following methods: Adding Gaussian distribution noise to the background image and the gap image; Cutting a plurality of interference gaps in the background image, wherein the interference gaps have the same shape as the gap image but have different angles and / or sizes; The notch image is enlarged or reduced, with the ratio of enlargement or reduction being within 0.5%.
4. The real-time safety verification method for smart rail based on a large model according to claim 3 is characterized in that: In step 4, the risk assessment of the current behavior is specifically as follows: scoring each time behavior feature and each trajectory behavior feature respectively, and weighting and adding up each score to obtain a behavior score. When the behavior score is less than a threshold, it is determined to be a high-risk verification; The security policy is adjusted according to the evaluation result as follows: re-performing steps 1 to 4 to re-verify the current user; and restricting access when the number of re-verifications is greater than a threshold.
5. The real-time safety verification method for intelligent rail based on a large model according to claim 4 is characterized in that: In step 4, the risk assessment of the current behavior further includes: obtaining the historical verification behavior of the current user, the current time behavior characteristics and the trajectory behavior characteristics, and counting the number of high-risk verifications, and when the number is greater than a threshold, the user is determined to be a high-risk user; When the user is determined to be a high-risk user, the security policy is adjusted according to the evaluation result to: adjust the identification difficulty processing.
6. The real-time safety verification method for smart rail based on a large model according to claim 1 is characterized in that: The time behavior characteristics, trajectory behavior characteristics and risk assessment results of different users are collected to form a verification data set, and the verification data set is used to train and optimize the behavior analysis model.
7. A server, characterized in that: include: memory and at least one processor; The memory stores a computer program, and the at least one processor executes the computer program stored in the memory to implement the large model-based real-time smart rail safety verification method described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed, implements the large-model-based real-time smart rail safety verification method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Human-computer identification method and device based on sliding trajectory, and electronic equipment
CN107679374A
Human-machine identification method and device for slide verification code, electronic device and readable medium
CN109033793A
