Computer big data storage system and method
Through real-time monitoring and analysis of the input information and face information of the database administrator, it automatically enters the protection state to prevent data operation errors, solves data security problems caused by long-term work pressure, and improves the stability and security of the big data storage system. .
Patent Information
- Application Number
- CN202310328714.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-03-30
AI Technical Summary
When database administrators deal with big data storage and maintenance, long-term work pressure and fatigue lead to a decrease in concentration, reaction speed and judgment, which may lead to data leakage, data loss and other problems, affecting data security.
A computer big data storage system is designed, including a data collection module, a data processing module, a function calling module and a data storage module. By monitoring the user's mouse input information, keyboard input information and face information in real time, the user's status is determined and automatically entered Protect status to prevent sensitive operations on important files and perform automatic backups.
It effectively reduces the risk of database administrators' work errors, improves the stability and security of the data storage system, and reduces data security risks caused by user fatigue.
Smart Images

Figure CN116467739B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a computer big data storage system and method. Background Art
[0002] With the continuous development of Internet technology and the continuous expansion of application scenarios, big data is gradually becoming the core resource of the information age. The storage of big data is an important basis for big data processing. Massive data is usually stored in real time in database servers and maintained and managed by database administrators on a daily basis. In daily work, database administrators often need to face challenges such as complex database structures, large amounts of data operations, and constantly changing business needs. These work pressures may cause database administrators to be in poor condition, resulting in work errors.
[0003] Research shows that long-term work stress and fatigue can have a negative impact on workers' attention, reaction speed, decision-making ability, and judgment, which may cause database administrators to make mistakes at work. For example, sending unmasked files to unsafe objects may cause data leakage, overwriting certain tables or accidentally deleting certain fields may cause data loss, and these problems are very likely to lead to data insecurity, and even cause irreparable losses. Therefore, in the process of big data storage and daily operation and maintenance, monitoring user status and real-time protection of sensitive operations on important files can help improve the work efficiency of database administrators and reduce the risk of work errors, thereby improving the stability and security of the database system. Summary of the invention
[0004] The object of the present invention is to provide a computer big data storage system and method to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: A computer big data storage system, characterized in that the system comprises: a data acquisition module, a data processing module, a function calling module and a data storage module;
[0006] The data acquisition module can collect facial information, mouse input information and keyboard input information, and send this information to the data processing module; the data processing module analyzes and calculates the information transmitted by the data acquisition module, and gradually determines whether the trigger conditions for state change are met, as well as the parameter settings for confirming or releasing the protection state; the function call module is used for function calls of external devices, calls of prompt windows, settings of state time and sensitive operation protection of important files; the data storage module is used to adjust the thresholds that the system needs to refer to, and to back up and store all information.
[0007] Through the above technical solution, real-time monitoring of user status is achieved, and the system status setting is determined according to the user status. In the protection state, sensitive operations of important files are automatically protected.
[0008] The data acquisition module includes an input information acquisition unit and an image information acquisition unit. The input information acquisition unit collects data through the test software installed in the computer, and the data includes mouse displacement speed information and keyboard input speed information. The system sends the collected information to the data processing module. The image information acquisition unit collects the user's face information through an external camera, and the system sends the collected information to the data processing module. Among them:
[0009] When the mouse displacement speed information and keyboard input speed information collected by the test software are both zero, or the camera cannot collect facial information, it means that the user is not in front of the computer at this time and enters the freeze time. The freeze time does not occupy the status time setting. When user input or facial information is detected, the freeze time is exited and the status time starts counting.
[0010] Since users do not move the mouse or type on the keyboard continuously, when collecting data, we usually collect the average value of multiple continuous mouse displacement speeds and multiple keyboard typing speeds over a period of time to reduce the impact of instantaneous speed.
[0011] Through the above technical solution, it is possible to collect the required information through various devices and provide data support for subsequent data processing modules.
[0012] The data processing module includes a primary trigger judgment unit, a secondary trigger judgment unit and a state setting unit.
[0013] The first-level trigger judgment unit is used to analyze the input information transmitted by the data acquisition module. Send instruction information to the external device unit of the function call module, start the test software to start collecting mouse displacement speed information and keyboard input speed information. These information are judged with the corresponding threshold information retained in the system. If it is greater than the threshold, it is a normal situation. If it is less than or equal to the threshold and greater than zero, it is an abnormal situation. The mouse displacement speed information or keyboard input speed information is recorded.
[0014] The secondary trigger judgment unit is used to analyze the face information transmitted by the data acquisition module. First, send instruction information to the external device unit of the function call module, start the camera to start collecting face information, record the eye closing frequency within a period of time, and analyze and calculate the position of the eyes and the pupil coordinate set; secondly, send instruction information to the prompt window unit of the function call module, start the pop-up window function, record the time when the number of pupil coordinate sets changes and is greater than the error threshold when the pop-up window appears according to the human eye data collected by the camera, calculate the difference between this time and the pop-up window prompt time, and the obtained time difference is the attention transfer time; finally, substitute the eye closing frequency and attention transfer time into the formula to calculate the face state degree, and compare and judge with the face state degree threshold reserved in the system. If it is less than or equal to the threshold, it is a normal situation; if it is greater than the threshold, it is an abnormal situation.
[0015] The state setting unit is used to collect information from the first-level trigger judgment unit and the second-level trigger judgment unit, and perform state setting in combination with the current state of the system. The state setting information includes state change information and state duration: the state change information includes normal state and abnormal state. The system does not perform any operation in the normal state. In the abnormal state, the system automatically enters the protection state. In the protection state, the user's sensitive operations on important files will be automatically delayed and forcibly backed up; the state duration information is set according to the fixed time reserved in the system; after the setting is completed, the state change information and state duration information are sent to the state protection unit and state time unit of the function call module in the form of instructions. Among them:
[0016] The minimum setting of the state duration cannot be lower than the time for the test software and the camera to collect data. It is set by the administrator based on the duration of the user's fatigue state and not disturbing the user's normal work. After the state setting is completed, the state does not change during the state duration and data collection is not performed. After the state duration is exceeded, data collection begins.
[0017] The determination of the system status first obtains its own status information, which can be divided into two categories:
[0018] Its own state is normal: the first-level trigger judgment unit is in normal condition, and the system changes to a normal state; the first-level trigger judgment unit is in abnormal condition, and the situation information of the second-level trigger judgment unit continues to be analyzed. If the second-level trigger judgment unit is in normal condition, the system changes to a normal state; if the second-level trigger judgment unit is in abnormal condition, the system changes to an abnormal state and automatically enters a protection state.
[0019] The system is in an abnormal state: if the first-level trigger judgment unit is in an abnormal state, the system changes to an abnormal state; if the first-level trigger judgment unit is in a normal state, the system continues to analyze the situation information of the second-level trigger judgment unit. If the second-level trigger judgment unit is in an abnormal state, the system changes to an abnormal state. If the second-level trigger judgment unit is in a normal state, the system changes to a normal state and automatically exits the protection state.
[0020] Secondly, in order to prevent the state from changing too frequently, the system will not detect for a period of time after each state change, that is, during this period, the first-level trigger judgment unit and the second-level trigger judgment unit will not make judgments, and the system state will not change. The state duration is the time set by the state time unit in the function call module. After this period, the first-level trigger judgment unit and the second-level trigger judgment unit will re-judge, and the system state will change; finally, the state change information and state duration information are sent to the state protection unit and the state time unit of the function call module in the form of instructions.
[0021] Through the above technical solution, the user status is judged, and the status is set by combining the calculation results of each judgment unit with the current status of the system.
[0022] The function calling module includes an external device unit, a prompt window unit, a state protection unit and a state time unit.
[0023] The external device unit is used to receive instruction information transmitted by the data processing module; start or shut down the test software, the test software is used to collect mouse displacement speed information and keyboard input speed information; start or shut down the camera, the camera is used to collect face information.
[0024] The prompt window unit is used to receive the instruction information transmitted by the data processing module and call the pop-up window function. When the camera is started, the system automatically calls the pop-up window. The setting of the pop-up window position is set according to a certain distance from the mouse stop position or the keyboard input position. The pop-up window page should be recognizable and form a sharp contrast with the surrounding environment, which can easily attract the user's attention. The pop-up window content prompts the user of the current status information and is accompanied by a verification code picture, a verification code input box and a confirmation button. After the user enters the verification code according to the picture and clicks the confirmation button, the pop-up window disappears and sends instruction information to the external device unit of the function calling module to turn off the test software and the camera; the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are automatically recorded, and the speed information is sent to the threshold adjustment unit of the data storage module.
[0025] The state protection unit is used to receive the state change information transmitted by the state setting unit of the data processing module, debug the protection state, and confirm the protection state under abnormal circumstances, while the protection state needs to be released under normal circumstances. In the protection state, sensitive operations on important files will be delayed, and the operated objects will be automatically backed up during the delay period, and all operations in the protection state will be logged.
[0026] The state time unit is used to receive the state duration information transmitted by the state setting unit of the data processing module, and set the state time. Within the set time, the data acquisition module does not collect data. After the set time, the data acquisition module starts to collect data.
[0027] Through the above technical solution, it is possible to start or shut down the camera and test software, as well as set the system status and status duration.
[0028] The data storage module includes a threshold adjustment unit and a data storage unit.
[0029] The threshold adjustment unit is used to receive speed information transmitted from the prompt window unit of the function call module, the speed information includes the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code, and the speed information is averaged with the corresponding speed threshold information retained in the system to obtain the adjustment information of the corresponding threshold.
[0030] The data storage unit is used to store various adjusted threshold information, collection information and log information into a database; the threshold information includes mouse displacement speed threshold, keyboard input speed threshold, error threshold and face state threshold; the collection information includes mouse displacement speed information, keyboard input speed information, attention transfer time information and face state information; the log information includes state change information, operation information in protection state and backup file location information.
[0031] Through the above technical solution, it is possible to readjust various threshold information required for system judgment, and store and record all information of this state change.
[0032] A computer big data storage method, characterized in that the method comprises the following steps:
[0033] S1. Collect keyboard and mouse input information to determine whether it is in normal condition;
[0034] S2. Collect facial information, substitute it into the formula to calculate the user status value, and determine whether it is in a normal state;
[0035] S3, confirm or release the protection status according to the conditions of S1 and S2;
[0036] S4. Adjust the influencing factors and log and back up all operation information in this state;
[0037] S5: After the state duration has expired, re-enter step S1.
[0038] In S1, the collection of keyboard and mouse input information is performed by data collection through the test software installed in the computer, and the data includes mouse displacement speed information and keyboard input speed information; at regular intervals, the test software is called to collect the mouse displacement speed information and keyboard input speed information, and these information are judged against the corresponding threshold information retained in the system. If it is greater than the threshold, it is a normal situation; if it is less than or equal to the threshold, it is an abnormal situation, and the mouse displacement speed information or keyboard input speed information is recorded; the formula is as follows:
[0039]
[0040]
[0041] In the formula, S result is the result of judging the mouse displacement speed, S n is the mouse displacement speed of the nth actual test, Z s is the mouse displacement speed threshold, J result is the result of keyboard input speed judgment, J n is the keyboard input speed of the nth actual test, Z J Enter the speed threshold for the keyboard.
[0042] Through the above technical solution, the user's input information is collected, and the input speed is compared with the corresponding threshold information retained in the system to give a judgment result.
[0043] In S2, the calculation and judgment of the state value includes the following steps:
[0044] S201, start the camera function, collect images of the user in front of the computer, use the existing OpenCV image processing library to load the Haar cascade classifier, and perform face detection on the images collected by the camera.
[0045] S202: for the detected face region, use the Haar cascade classifier again to perform eye detection and determine the eye position; and calculate the position coordinates of the eyes in the entire image according to the relative position of the eye position and the face region.
[0046] S203, using the 68 key points of the face in the Dlib library to detect face information, and collecting eye feature point coordinates according to the eye area position coordinate information; each eye is represented by 6 coordinates, starting from the inner corner of the eye, taking the edge line of the eye corner area as the path, in a clockwise direction, collect the inner corner of the eye M1, the upper left eye M2, the upper right eye M3, the outer corner of the eye M4, the lower right eye M5 and the lower left eye M6, substitute these coordinates into the formula, calculate the aspect ratio of the eye, and judge the eye state by the change of the aspect ratio over a period of time; the formula is as follows:
[0047]
[0048] Where HZB is the aspect ratio of the eye, n is the horizontal weighting coefficient, M1 is the coordinate of the feature point of the inner corner of the eye, M2 is the coordinate of the feature point of the upper left eye, M3 is the coordinate of the feature point of the upper right eye, M4 is the coordinate of the feature point of the outer corner of the eye, M5 is the coordinate of the feature point of the lower right eye, and M6 is the coordinate of the feature point of the lower left eye.
[0049] When the human eyes are open, HZB fluctuates within a certain range; when the human eyes are closed, HZB drops rapidly and approaches 0. The face video recorded by the camera is analyzed frame by frame, and the percentage of frames in which HZB is lower than the eye-closing threshold over a period of time is calculated. The formula is as follows:
[0050]
[0051] Where EC is the eye closure frequency, BYZ is the number of frames in which HZB is lower than the eye closure threshold within the time, and ZSS is the total number of frames within the time.
[0052] S204, according to the position information of the eye in the image, detect the iris center in the eye area; use the gradient minimization method to smooth the eye area, obtain a rough estimate of the iris center by color intensity, apply a distance filter to remove invalid edges that are too close or too far from the rough center of the iris, apply RANSAC to the edge points of the iris, calculate the radius of the iris, and locate the iris center by combining the intensity energy and edge intensity information; the calculation formula is as follows:
[0053] C1=∑(Q×r)
[0054]
[0055] Where C1 is the intensity energy, C2 is the edge intensity, Q is the eye area, r is a circular window with the same radius as the iris, and g x and g y are the horizontal gradient and vertical gradient of the pixel respectively. In order to detect the iris center, the intensity energy in the circular window is minimized and the edge intensity of the iris edge is maximized; the trade-off is controlled by the parameter τ, and the formula is as follows:
[0056]
[0057] In the formula, (x a ,y a ) is the coordinate of the iris center, the integration intervals are [-15π, 15π] and [45π, 65π], (x, y) is the coordinate, C1 is the intensity energy, C2 is the edge strength, P is the influencing factor, and τ is the parameter; the arc of the iris edge corresponds to the arc of the same range in a circle with a radius of r, and the integral is calculated by the sum of the edge strengths of each pixel on the arc.
[0058] S205, convert the RGB image into HSV, set the HSV range value of the color to be extracted according to the pixel color information corresponding to the iris center coordinates, call the inRange function of the OpenCV image processing library to extract the color space, remove the noise after binarization, connect the breakpoints, call the findContours function to detect the contour, draw a rectangular area to locate the contour, put all the positioning coordinate points within the iris coordinate range into a set X, which is the pixel position set of the pupil of the human eye in the image, and the set X includes {X1, X2, ..., X z}, where X1, X2, ..., X z They respectively represent the 1st, 2nd, ..., zth data in the pupil coordinate set, and each data contains the horizontal and vertical coordinates of a pixel point.
[0059] S206, automatically call the pop-up window function, and record the pop-up window appearance time T1 at the same time. The camera continues to collect and analyze the pupil coordinate set in the face information; when the number of sets changes, determine whether the proportion of the changed number of sets is greater than the error threshold. If it is less than or equal to the error threshold, no processing is performed; if it is greater than the error threshold, record the time T2 when the number changes, and substitute it into the formula to calculate the attention transfer time:
[0060]
[0061] Where T is the attention shift time, T1 is the pop-up window appearance time, T2 is the time when the number changes, |X| is the original number of sets, |GB| is the number of sets after the change, V is the error threshold, and next means ending this judgment and continuing with the next data judgment.
[0062] The pop-up window content prompts the user's current status information, and is accompanied by a verification code input box and a confirmation button. The user enters the verification code according to the prompt and clicks the confirmation button, the pop-up window disappears, and the test software and camera are closed at the same time; the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are automatically recorded.
[0063] S207, the eye closing frequency and attention shifting time are substituted into the formula to comprehensively calculate the face state degree. If the calculation result is less than or equal to the face state degree threshold, it is a normal situation; if it is greater than the face state degree threshold, it means that the user is in a tired state, which is an abnormal situation. The formula is as follows:
[0064]
[0065]
[0066] Where ZTD is the face state, α is the eye closure influence factor, EC is the eye closure frequency, β is the attention influence factor, T is the attention transfer time, B is the standard attention transfer time, γ is the mouse displacement speed influence factor, R s is the recorded mouse displacement speed. This value is greater than zero. s is the mouse displacement speed threshold, δ is the keyboard input speed influencing factor, R J is the recorded keyboard input speed. The value is greater than zero. J is the keyboard input speed threshold, Z G is the face state threshold, and result is the judgment result.
[0067] Through the above technical solution, the user's facial information is collected, and the user's attention transfer time is collected by calling a pop-up window. The user's facial state degree is comprehensively calculated, and the facial state degree is compared and judged with the corresponding threshold information retained in the system to give a judgment result.
[0068] In S3, the protection status needs to be determined based on the status of S1 and S2 as well as the current status. There are two situations:
[0069] The current status is normal: if S1 status is normal, the system changes to normal status; if S1 status is abnormal, continue to analyze S2 status information; if S2 status is normal, the system changes to normal status; if S2 status is abnormal, the system changes to abnormal status and automatically enters protection status.
[0070] The current state is abnormal: S1 state is abnormal, the system changes to an abnormal state; S1 state is normal, continue to analyze S2 state information, S2 state is abnormal, the system changes to an abnormal state, S2 state is normal, the system changes to a normal state, and automatically exits the protection state.
[0071] Through the above technical solution, the judgment results of S1 and S2 are combined with the current state of the system to make a comprehensive judgment and provide the setting information of the state.
[0072] In S4, the influencing factors include the mouse displacement speed threshold and the keyboard input speed threshold, and the displacement speed of the mouse to the verification code input box and the keyboard input speed when entering the verification code collected in step S2 are averaged with the mouse displacement speed threshold and the keyboard input speed threshold to obtain the adjustment information of the corresponding threshold.
[0073] Through the above technical solution, it is possible to readjust various types of threshold information required for system judgment, so that the threshold is more in line with user input habits.
[0074] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0075] 1. In the judgment stage, the present invention first monitors the user input speed through the test software, and uses the input speed information as an abnormal trigger condition. Only when it is triggered will the camera start to collect face information, which reduces the pressure of the system on face data analysis and calculation and improves the monitoring efficiency.
[0076] 2. In the state value calculation stage, the present invention tests the user's attention diversion time by means of pop-up window reminders, and adopts the attention diversion time to judge the user state information; when the user notices the pop-up window, the state basically returns to normal. Since the pop-up window content requires a verification code to be entered before it can be closed, the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are collected and averaged with the corresponding thresholds retained in the system, which can better adapt to the user's input habits.
[0077] 3. The present invention sets the state duration while setting the state, and does not perform any data collection work during the state duration, thereby reducing the system workload and avoiding frequent state switching that affects the user's normal work. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0079] Figure 1 It is a structural schematic diagram of a computer big data storage system and method of the present invention;
[0080] Figure 2 It is a flowchart of a computer big data storage system and method of the present invention. DETAILED DESCRIPTION
[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0082] See also Figure 1 ,The present invention provides a technical solution: a computer big data storage system, characterized in that the system includes: a data acquisition module, a data processing module, a function call module and a data storage module;
[0083] The data acquisition module can collect facial information, mouse input information and keyboard input information, and send this information to the data processing module; the data processing module analyzes and calculates the information transmitted by the data acquisition module, and gradually determines whether the trigger conditions for state change are met, as well as the parameter settings for confirming or releasing the protection state; the function call module is used for function calls of external devices, calling prompt windows, setting status time and sensitive operation protection of important files; the data storage module is used to adjust the thresholds that the system needs to refer to, and to back up and store all information.
[0084] The data acquisition module includes an input information acquisition unit and an image information acquisition unit. The input information acquisition unit collects data through the test software installed in the computer. The data includes mouse displacement speed information and keyboard input speed information. The system sends the collected information to the data processing module. The image information acquisition unit collects user face information through an external camera, and the system sends the collected information to the data processing module. Among them:
[0085] When the mouse displacement speed information and keyboard input speed information collected by the test software are both zero, or the camera cannot collect facial information, it means that the user is not in front of the computer at this time and enters the freeze time. The freeze time does not occupy the status time setting. When user input or facial information is detected, the freeze time is exited and the status time starts counting.
[0086] Since users do not move the mouse or type on the keyboard continuously, when collecting data, we usually collect the average value of multiple continuous mouse displacement speeds and multiple keyboard typing speeds over a period of time to reduce the impact of instantaneous speed.
[0087] The data processing module includes a primary trigger judgment unit, a secondary trigger judgment unit and a state setting unit.
[0088] The first-level trigger judgment unit is used to analyze the input information transmitted by the data acquisition module. Send instruction information to the external device unit of the function call module, start the test software to start collecting mouse displacement speed information and keyboard input speed information. These information are judged against the corresponding threshold information retained in the system. If it is greater than the threshold, it is a normal situation. If it is less than or equal to the threshold and greater than zero, it is an abnormal situation. The mouse displacement speed information or keyboard input speed information is recorded.
[0089] The secondary trigger judgment unit is used to analyze the facial information transmitted by the data acquisition module. First, send command information to the external device unit of the function call module, start the camera to start collecting facial information, record the eye closing frequency within a period of time, and analyze and calculate the eye position and pupil coordinate set; secondly, send command information to the prompt window unit of the function call module, start the pop-up window function, and record the time when the number of pupil coordinate sets changes and is greater than the error threshold when the pop-up window appears according to the human eye data collected by the camera, calculate the difference between this time and the pop-up window prompt time, and the obtained time difference is the attention transfer time; finally, substitute the eye closing frequency and attention transfer time into the formula to calculate the face state degree, and compare and judge with the face state degree threshold reserved in the system. If it is less than or equal to the threshold, it is a normal situation; if it is greater than the threshold, it is an abnormal situation.
[0090] The state setting unit is used to collect information about the first-level trigger judgment unit and the second-level trigger judgment unit, and to set the state in combination with the current state of the system. The state setting information includes state change information and state duration: the state change information includes normal state and abnormal state. In the normal state, the system does not perform any operation. In the abnormal state, the system automatically enters the protection state. In the protection state, the user's sensitive operations on important files will be automatically delayed and forcibly backed up; the state duration information is set according to the fixed time reserved in the system; after the setting is completed, the state change information and state duration information are sent to the state protection unit and state time unit of the function call module in the form of instructions. Among them:
[0091] The minimum setting of the state duration cannot be lower than the time for the test software and the camera to collect data. It is set by the administrator based on the duration of the user's fatigue state and not disturbing the user's normal work. After the state setting is completed, the state does not change during the state duration and data collection is not performed. After the state duration is exceeded, data collection begins.
[0092] The determination of the system status first obtains its own status information, which can be divided into two categories:
[0093] Its own state is normal: the first-level trigger judgment unit is in normal condition, and the system changes to a normal state; the first-level trigger judgment unit is in abnormal condition, and the situation information of the second-level trigger judgment unit continues to be analyzed. If the second-level trigger judgment unit is in normal condition, the system changes to a normal state; if the second-level trigger judgment unit is in abnormal condition, the system changes to an abnormal state and automatically enters a protection state.
[0094] The system is in an abnormal state: if the first-level trigger judgment unit is in an abnormal state, the system changes to an abnormal state; if the first-level trigger judgment unit is in a normal state, the system continues to analyze the situation information of the second-level trigger judgment unit. If the second-level trigger judgment unit is in an abnormal state, the system changes to an abnormal state. If the second-level trigger judgment unit is in a normal state, the system changes to a normal state and automatically exits the protection state.
[0095] Secondly, in order to prevent the state from changing too frequently, the system will not detect for a period of time after each state change, that is, during this period, the first-level trigger judgment unit and the second-level trigger judgment unit will not make judgments, and the system state will not change. The state duration is the time set by the state time unit in the function call module. After this period, the first-level trigger judgment unit and the second-level trigger judgment unit will re-judge, and the system state will change; finally, the state change information and state duration information are sent to the state protection unit and the state time unit of the function call module in the form of instructions.
[0096] The function calling module includes an external device unit, a prompt window unit, a state protection unit and a state time unit.
[0097] The external device unit is used to receive the command information transmitted by the data processing module; start or shut down the test software, the test software is used to collect the mouse displacement speed information and the keyboard input speed information; start or shut down the camera, the camera is used to collect face information.
[0098] The prompt window unit is used to receive the instruction information transmitted by the data processing module and call the pop-up window function. When the camera is started, the system automatically calls the pop-up window. The pop-up window position is set according to a certain distance from the mouse position or the keyboard input position. The pop-up window page should be recognizable and form a sharp contrast with the surrounding environment, which can easily attract the user's attention. The pop-up window content is to prompt the user of the current status information, and is accompanied by a verification code picture, a verification code input box and a confirmation button. After the user enters the verification code according to the picture and clicks the confirmation button, the pop-up window disappears, and at the same time sends instruction information to the external device unit of the function calling module to turn off the test software and the camera; automatically record the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code, and send this speed information to the threshold adjustment unit of the data storage module.
[0099] The status protection unit is used to receive status change information transmitted by the status setting unit of the data processing module and debug the protection status. Under abnormal circumstances, the protection status needs to be confirmed, and under normal circumstances, the protection status needs to be released. In the protection status, sensitive operations on important files will be delayed, and the operated objects will be automatically backed up during the delay period, and all operations in the protection status will be logged.
[0100] The state time unit is used to receive the state duration information transmitted by the state setting unit of the data processing module and set the state time. Within the set time, the data acquisition module does not collect data. When the set time is exceeded, the data acquisition module starts to collect data.
[0101] The data storage module includes a threshold adjustment unit and a data storage unit.
[0102] The threshold adjustment unit is used to receive speed information transmitted from the prompt window unit of the function call module. The speed information includes the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code. The speed information is averaged with the corresponding speed threshold information retained in the system to obtain the adjustment information of the corresponding threshold.
[0103] The data storage unit is used to store various adjusted threshold information, collection information and log information into a database; the threshold information includes the mouse displacement speed threshold, the keyboard input speed threshold, the error threshold and the face state threshold; the collection information includes the mouse displacement speed information, the keyboard input speed information, the attention transfer time information and the face state information; the log information includes the state change information, the operation information in the protection state and the backup file location information.
[0104] See also Figure 2 The present invention provides a technical solution: a computer big data storage method, characterized in that the method comprises the following steps:
[0105] S1. Collect keyboard and mouse input information to determine whether it is in normal condition;
[0106] S2. Collect facial information, substitute it into the formula to calculate the user status value, and determine whether it is in a normal state;
[0107] S3, confirm or release the protection status according to the conditions of S1 and S2;
[0108] S4. Adjust the influencing factors and log and back up all operation information in this state;
[0109] S5: After the state duration has expired, re-enter step S1.
[0110] In S1, the collection of keyboard and mouse input information is performed by data collection through the test software installed in the computer, and the data includes mouse displacement speed information and keyboard input speed information; at regular intervals, the test software is called to collect the mouse displacement speed information and keyboard input speed information, and these information are judged against the corresponding threshold information retained in the system. If it is greater than the threshold, it is a normal situation; if it is less than or equal to the threshold, it is an abnormal situation, and the mouse displacement speed information or keyboard input speed information is recorded; the formula is as follows:
[0111]
[0112] In the formula, S result is the result of judging the mouse displacement speed, S n is the mouse displacement speed of the nth actual test, Z s is the mouse displacement speed threshold, J result is the result of keyboard input speed judgment, J n is the keyboard input speed of the nth actual test, Z J Enter the speed threshold for the keyboard.
[0113] In S2, the calculation and judgment of the state value includes the following steps:
[0114] S201, start the camera function, collect images of the user in front of the computer, use the existing OpenCV image processing library to load the Haar cascade classifier, and perform face detection on the images collected by the camera.
[0115] S202: for the detected face region, use the Haar cascade classifier again to perform eye detection and determine the eye position; and calculate the position coordinates of the eyes in the entire image according to the relative position of the eye position and the face region.
[0116] S203, using the 68 key points of the face in the Dlib library to detect face information, and collecting eye feature point coordinates according to the eye area position coordinate information; each eye is represented by 6 coordinates, starting from the inner corner of the eye, taking the edge line of the eye corner area as the path, in a clockwise direction, collect the inner corner of the eye M1, the upper left eye M2, the upper right eye M3, the outer corner of the eye M4, the lower right eye M5 and the lower left eye M6, substitute these coordinates into the formula, calculate the aspect ratio of the eye, and judge the eye state by the change of the aspect ratio over a period of time; the formula is as follows:
[0117]
[0118] Where HZB is the aspect ratio of the eye, n is the horizontal weighting coefficient, M1 is the coordinate of the feature point of the inner corner of the eye, M2 is the coordinate of the feature point of the upper left eye, M3 is the coordinate of the feature point of the upper right eye, M4 is the coordinate of the feature point of the outer corner of the eye, M5 is the coordinate of the feature point of the lower right eye, and M6 is the coordinate of the feature point of the lower left eye.
[0119] When the human eyes are open, HZB fluctuates within a certain range; when the human eyes are closed, HZB drops rapidly and approaches 0. The face video recorded by the camera is analyzed frame by frame, and the percentage of frames in which HZB is lower than the eye-closing threshold over a period of time is calculated. The formula is as follows:
[0120]
[0121] Where EC is the eye closure frequency, BYZ is the number of frames in which HZB is lower than the eye closure threshold within the time, and ZSS is the total number of frames within the time.
[0122] S204, according to the position information of the eye in the image, detect the iris center in the eye area; use the gradient minimization method to smooth the eye area, obtain a rough estimate of the iris center by color intensity, apply a distance filter to remove invalid edges that are too close or too far from the rough center of the iris, apply RANSAC to the edge points of the iris, calculate the radius of the iris, and locate the iris center by combining the intensity energy and edge intensity information; the calculation formula is as follows:
[0123]
[0124] Where C1 is the intensity energy, C2 is the edge intensity, Q is the eye area, r is a circular window with the same radius as the iris, and g x and g y are the horizontal gradient and vertical gradient of the pixel respectively. In order to detect the iris center, the intensity energy in the circular window is minimized and the edge intensity of the iris edge is maximized; the trade-off is controlled by the parameter τ, and the formula is as follows:
[0125]
[0126] In the formula, (x a ,y a ) is the coordinate of the iris center, the integration intervals are [-15π, 15π] and [45π, 65π], (x, y) is the coordinate, C1 is the intensity energy, C2 is the edge strength, P is the influencing factor, and τ is the parameter; the arc of the iris edge corresponds to the arc of the same range in a circle with a radius of r, and the integral is calculated by the sum of the edge strengths of each pixel on the arc.
[0127] S205, convert the RGB image into HSV, set the HSV range value of the color to be extracted according to the pixel color information corresponding to the iris center coordinates, call the inRange function of the OpenCV image processing library to extract the color space, remove the noise after binarization, connect the breakpoints, call the findContours function to detect the contour, draw a rectangular area to locate the contour, put all the positioning coordinate points within the iris coordinate range into a set X, which is the pixel position set of the pupil of the human eye in the image, and the set X includes {X1, X2, ..., X z}, where X1, X2, ..., X z They respectively represent the 1st, 2nd, ..., zth data in the pupil coordinate set, and each data contains the horizontal and vertical coordinates of a pixel point.
[0128] S206, automatically call the pop-up window function, and record the pop-up window appearance time T1 at the same time. The camera continues to collect and analyze the pupil coordinate set in the face information; when the number of sets changes, determine whether the proportion of the changed number of sets is greater than the error threshold. If it is less than or equal to the error threshold, no processing is performed; if it is greater than the error threshold, record the time T2 when the number changes, and substitute it into the formula to calculate the attention transfer time:
[0129]
[0130] Where T is the attention shift time, T1 is the pop-up window appearance time, T2 is the time when the number changes, |X| is the original number of sets, |GB| is the number of sets after the change, V is the error threshold, and next means ending this judgment and continuing with the next data judgment.
[0131] The pop-up window content prompts the user's current status information, and is accompanied by a verification code input box and a confirmation button. The user enters the verification code according to the prompt and clicks the confirmation button, the pop-up window disappears, and the test software and camera are closed at the same time; the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are automatically recorded.
[0132] S207, the eye closing frequency and attention shifting time are substituted into the formula to comprehensively calculate the face state degree. If the calculation result is less than or equal to the face state degree threshold, it is a normal situation; if it is greater than the face state degree threshold, it means that the user is in a tired state, which is an abnormal situation. The formula is as follows:
[0133]
[0134]
[0135] Where ZTD is the face state, α is the eye closure influence factor, EC is the eye closure frequency, β is the attention influence factor, T is the attention transfer time, B is the standard attention transfer time, γ is the mouse displacement speed influence factor, R s is the recorded mouse displacement speed. This value is greater than zero. s is the mouse displacement speed threshold, δ is the keyboard input speed influencing factor, R J is the recorded keyboard input speed. The value is greater than zero. J is the keyboard input speed threshold, Z G is the face state threshold, and result is the judgment result.
[0136] In S3, the protection status needs to be determined based on the status of S1 and S2 as well as the current status. There are two situations:
[0137] The current status is normal: if S1 status is normal, the system changes to normal status; if S1 status is abnormal, continue to analyze S2 status information; if S2 status is normal, the system changes to normal status; if S2 status is abnormal, the system changes to abnormal status and automatically enters protection status.
[0138] The current state is abnormal: S1 state is abnormal, the system changes to an abnormal state; S1 state is normal, continue to analyze S2 state information, S2 state is abnormal, the system changes to an abnormal state, S2 state is normal, the system changes to a normal state, and automatically exits the protection state.
[0139] In S4, the influencing factors include the mouse displacement speed threshold and the keyboard input speed threshold, and the displacement speed of the mouse to the verification code input box and the keyboard input speed when entering the verification code collected in step S2 are averaged with the mouse displacement speed threshold and the keyboard input speed threshold to obtain the adjustment information of the corresponding threshold.
[0140] Embodiment 1:
[0141] Assume that there are three users, A, B, and C, who are tested on three computers respectively. The mouse displacement speed threshold is 360 pixels / second, the keyboard input speed threshold is 100 letters / minute, and the mouse sensitivity is the same:
[0142] The average mouse movement speed of user A is 480 pixels / second, and the average keyboard input speed is 156 letters / minute;
[0143] The average mouse movement speed of user B is 350 pixels / second, and the average keyboard input speed is 121 letters / minute;
[0144] The average mouse movement speed of user C is 480 pixels / second, and the average keyboard input speed is 89 letters / minute;
[0145] According to the corresponding threshold, we can get:
[0146] User A is in normal condition;
[0147] B user's situation is abnormal (the average mouse displacement speed is too low);
[0148] C. User situation is abnormal (average keyboard input speed is too low);
[0149] Assume that within 300 frames, the number of frames in which the aspect ratio of user B's eyes is lower than the eye-closing threshold is 180 frames, and the attention shift time is 0.8 seconds; the number of frames in which the aspect ratio of user C's eyes is lower than the eye-closing threshold is 120 frames, and the attention shift time is 1.5 seconds:
[0150] Substitute the formula to calculate the eye closing frequency of user B:
[0151] Substitute the formula to calculate the eye closing frequency of user C:
[0152] Assume that the eye closure influence factor is 0.3, the attention influence factor is 0.4, the standard attention transfer time is 1.2, the mouse displacement speed influence factor is 0.15, the keyboard input speed influence factor is 0.15, and the face state threshold is 80%;
[0153] Substitute the formula to calculate the face state degree of user B:
[0154]
[0155] Substitute the formula to calculate the face state degree of user C:
[0156]
[0157] According to the face state threshold of 80%, we can get:
[0158] The face status of user B is less than or equal to the threshold, which is normal and no processing is performed;
[0159] The number of C users is greater than the threshold, the situation is abnormal, and the protection state is entered.
[0160] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0161] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. 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 computer big data storage system, It is characterized in that The system includes: a data acquisition module, a data processing module, a function calling module and a data storage module; The data acquisition module can collect face information, mouse input information and keyboard input information, and send this information to the data processing module; the data processing module analyzes and calculates the information transmitted by the data acquisition module, gradually determines whether the triggering conditions for state change are met, and sets parameters for confirming or releasing the protection state; the function calling module is used for function calling of external devices, calling of prompt windows, setting of state time and sensitive operation protection of important files; the data storage module is used to adjust the threshold value that the system needs to refer to, and back up and store all information; The data acquisition module includes an input information acquisition unit and an image information acquisition unit; the input information acquisition unit acquires data through the test software installed in the computer, and the data includes the mouse displacement speed information and the keyboard input speed information, and the system sends the acquired information to the data processing module; the image information acquisition unit acquires the user's face information through an external camera, and the system sends the acquired information to the data processing module; The data processing module includes a primary trigger judgment unit, a secondary trigger judgment unit and a state setting unit; The first-level trigger judgment unit is used to analyze the input information transmitted by the data acquisition module; send instruction information to the external device unit of the function call module, start the test software to start collecting mouse displacement speed information and keyboard input speed information; judge these information with the corresponding threshold information retained in the system, if it is greater than the threshold, it is a normal situation, if it is less than or equal to the threshold and greater than zero, it is an abnormal situation, and record the mouse displacement speed information or keyboard input speed information; The secondary trigger judgment unit is used to analyze the facial information transmitted by the data acquisition module; first, send instruction information to the external device unit of the function call module, start the camera to start collecting facial information, record the eye closing frequency within a period of time, and analyze and calculate the eye position and pupil coordinate set; secondly, send instruction information to the prompt window unit of the function call module, start the pop-up window function, record the time when the number of pupil coordinate sets changes and is greater than the error threshold when the pop-up window appears according to the human eye data collected by the camera, calculate the difference between the time and the pop-up window prompt time, and the obtained time difference is the attention transfer time; finally, substitute the eye closing frequency and the attention transfer time into the formula to calculate the face state degree, and compare and judge with the face state degree threshold reserved in the system. If it is less than or equal to the threshold, it is a normal situation; if it is greater than the threshold, it is an abnormal situation; The detailed steps are as follows: S1, start the camera function, collect images of the user in front of the computer, use the existing OpenCV image processing library to load the Haar cascade classifier, and perform face detection on the images collected by the camera; S2. For the detected face area, the Haar cascade classifier is used again to perform eye detection and determine the eye position; based on the relative position of the eye position and the face area, the position coordinates of the eye in the entire image are calculated; S3, using the 68 key points of the face in the Dlib library to detect face information, and collecting eye feature point coordinates based on the eye area position coordinate information; each eye is represented by 6 coordinates, starting from the inner corner of the eye, taking the edge line of the eye corner area as the path, and collecting the inner corner M in a clockwise direction. 1 , upper left eye M 2 , upper right eye M 3 , Outer Canthus M 4 , right lower eye M 5 and lower left eye M 6 , substitute these coordinates into the formula to calculate the aspect ratio of the eye, and judge the state of the eye by the change of the aspect ratio over a period of time; the formula is as follows: Where HZB is the aspect ratio of the eye, n is the horizontal weighting coefficient, M 1 is the coordinate of the inner corner feature point, M 2 is the coordinate of the feature point of the upper left eye, M 3 is the coordinate of the feature point of the upper right eye, M 4 is the coordinate of the feature point at the outer corner of the eye, M 5 is the coordinate of the feature point of the lower right eye, M 6 is the coordinates of the feature point of the lower left eye; When the human eyes are open, HZB fluctuates within a certain range; when the human eyes are closed, HZB drops rapidly and approaches 0. The face video recorded by the camera is analyzed frame by frame, and the percentage of frames in which HZB is lower than the eye-closing threshold over a period of time is calculated. The formula is as follows: Where EC is the eye closure frequency, BYZ is the number of frames in which HZB is lower than the eye closure threshold within the time, and ZSS is the total number of frames within the time; S4. Detect the iris center in the eye region according to the position information of the eye in the image; use the gradient minimization method to smooth the eye region, obtain a rough estimate of the iris center by color intensity, apply a distance filter to remove invalid edges that are too close or too far from the rough center of the iris, calculate the radius of the iris after applying RANSAC to the edge points of the iris, and locate the iris center by combining the intensity energy and edge intensity information; S5. Convert the RGB image to HSV, set the HSV range value of the color to be extracted according to the pixel color information corresponding to the iris center coordinates, call the inRange function of the OpenCV image processing library to extract the color space, remove the noise after binarization, connect the breakpoints, call the findContours function to detect the contour, draw a rectangular area to locate the contour, and put all the positioning coordinate points within the iris coordinate range into a set X. The set X is the pixel position set of the pupil of the human eye in the image, and the set X includes {X 1 , X 2 , ..., X z }, where X 1 , X 2 , ..., X z Respectively represent the 1st, 2nd, ..., zth data in the pupil coordinate set, each data contains the horizontal and vertical coordinates of the pixel point; S6. Automatically call the pop-up window function and record the pop-up window appearance time T 1 , the camera continues to collect and analyze the pupil coordinate set in the face information; when the number of sets changes, it is determined whether the proportion of the changed number of sets is greater than the error threshold. If it is less than or equal to the error threshold, no processing is performed; if it is greater than the error threshold, the time T when the number changes is recorded. 2 , put it into the formula to calculate the attention transfer time: Where, T is the attention transfer time, T 1 is the time when the pop-up window appears, T 2 is the time when the number of sets changes, |X| is the original number of sets, |GB| is the number of sets after the change, V is the error threshold, and next means ending this judgment and continuing with the next data judgment; The pop-up window prompts the user's current status information, and comes with a verification code input box and a confirmation button. After the user enters the verification code according to the prompt and clicks the confirmation button, the pop-up window disappears, and the test software and camera are turned off at the same time; the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are automatically recorded; S7. Substitute the eye closing frequency and attention shifting time into the formula to comprehensively calculate the face state degree. If the calculation result is less than or equal to the face state degree threshold, it is a normal situation; if it is greater than the face state degree threshold, it means that the user is in a tired state, which is an abnormal situation. The formula is as follows: Where ZTD is the face state, α is the eye closure influence factor, EC is the eye closure frequency, β is the attention influence factor, T is the attention transfer time, B is the standard attention transfer time, γ is the mouse displacement speed influence factor, R s is the recorded mouse displacement speed. This value is greater than zero. s is the mouse displacement speed threshold, δ is the keyboard input speed influencing factor, R J is the recorded keyboard input speed. The value is greater than zero. J is the keyboard input speed threshold, Z G is the face state threshold, and result is the judgment result; The state setting unit is used to collect information about the first-level trigger judgment unit and the second-level trigger judgment unit, and to set the state in combination with the current state of the system; the state setting information includes state change information and state duration: the state change information includes normal state and abnormal state, the system does not perform any operation in the normal state, and the system automatically enters the protection state in the abnormal state, and the user's sensitive operations on important files in the protection state will be automatically delayed and forcibly backed up; the state duration information is set according to the fixed time reserved in the system; after the setting is completed, the state change information and the state duration information are sent to the state protection unit and the state time unit of the function call module in the form of instructions; The function calling module includes an external device unit, a prompt window unit, a state protection unit and a state time unit; The external device unit is used to receive the instruction information transmitted by the data processing module; start or close the test software, the test software is used to collect the mouse displacement speed information and the keyboard input speed information; start or close the camera, the camera is used to collect the face information; The prompt window unit is used to receive the instruction information transmitted by the data processing module and call the pop-up window function. When the camera is started, the system automatically calls the pop-up window. The pop-up window content prompts the user's current status information and is accompanied by a verification code picture, a verification code input box and a confirmation button. After the user enters the verification code according to the picture and clicks the confirmation button, the pop-up window disappears and sends the instruction information to the external device unit of the function calling module at the same time, turning off the test software and the camera; automatically recording the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code, and sending these speed information to the threshold adjustment unit of the data storage module; The state protection unit is used to receive the state change information transmitted by the state setting unit of the data processing module, debug the protection state, confirm the protection state in abnormal situations, and release the protection state in normal situations; in the protection state, sensitive operations of important files will be delayed, and the operated objects will be automatically backed up during the delay period, and all operations in the protection state will be logged; The state time unit is used to receive the state duration information transmitted by the state setting unit of the data processing module, and set the state time. Within the set time, the data acquisition module does not collect data. When the set time is exceeded, the data acquisition module starts to collect data. The data storage module includes a threshold adjustment unit and a data storage unit; The threshold adjustment unit is used to receive speed information transmitted by the prompt window unit of the function call module, the speed information includes the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code, and average the speed information and the corresponding speed threshold information retained in the system to obtain the adjustment information of the corresponding threshold; The data storage unit is used to store various adjusted threshold information, collection information and log information into a database; the threshold information includes mouse displacement speed threshold, keyboard input speed threshold, error threshold and face state threshold; the collection information includes mouse displacement speed information, keyboard input speed information, attention transfer time information and face state information; the log information includes state change information, operation information in protection state and backup file location information.
2. A computer big data storage method, It is characterized in that The method comprises the following steps: S1. Collect keyboard and mouse input information to determine whether it is in normal condition; S2. Collect facial information, substitute it into the formula to calculate the user status value, and determine whether it is in a normal state; S3, confirm or release the protection status according to the conditions of S1 and S2; S4. Adjust the influencing factors and log and back up all operation information in this state; S5: After the state duration exceeds, re-enter step S1; In S1, collecting keyboard and mouse input information is performed by data collection through test software installed in the computer, and the data includes mouse displacement speed information and keyboard input speed information; At regular intervals, the test software is called to collect mouse displacement speed information and keyboard input speed information, and these information are judged against the corresponding threshold information retained in the system. If it is greater than the threshold, it is a normal situation; if it is less than or equal to the threshold, it is an abnormal situation, and the mouse displacement speed information or keyboard input speed information is recorded; the formula is as follows: In the formula, S result is the result of judging the mouse displacement speed, S n is the mouse displacement speed of the nth actual test, Z s is the mouse displacement speed threshold, J result is the result of keyboard input speed judgment, J n is the keyboard input speed of the nth actual test, Z J Threshold value for keyboard input speed; In S2, the calculation and judgment of the state value includes the following steps: S201, start the camera function, collect images of the user in front of the computer, use the existing OpenCV image processing library to load the Haar cascade classifier, and perform face detection on the images collected by the camera; S202, for the detected face area, use the Haar cascade classifier again to perform eye detection and determine the eye position; according to the relative position of the eye position and the face area, calculate the position coordinates of the eye in the entire image; S203, using the 68 key points of the face in the Dlib library to detect face information, and collecting eye feature point coordinates according to the eye area position coordinate information; each eye is represented by 6 coordinates, starting from the inner corner of the eye, taking the edge line of the eye corner area as the path, and collecting the inner corner M in a clockwise direction. 1 , upper left eye M 2 , upper right eye M 3 , Outer Canthus M 4 , right lower eye M 5 and lower left eye M 6 , substitute these coordinates into the formula to calculate the aspect ratio of the eye, and judge the state of the eye by the change of the aspect ratio over a period of time; the formula is as follows: Where HZB is the aspect ratio of the eye, n is the horizontal weighting coefficient, M 1 is the coordinate of the inner corner feature point, M 2 is the coordinate of the feature point of the upper left eye, M 3 is the coordinate of the feature point of the upper right eye, M 4 is the coordinate of the feature point at the outer corner of the eye, M 5 is the coordinate of the feature point of the lower right eye, M 6 is the coordinates of the feature point of the lower left eye; When the human eyes are open, HZB fluctuates within a certain range; when the human eyes are closed, HZB drops rapidly and approaches 0. The face video recorded by the camera is analyzed frame by frame, and the percentage of frames in which HZB is lower than the eye-closing threshold over a period of time is calculated. The formula is as follows: Where EC is the eye closure frequency, BYZ is the number of frames in which HZB is lower than the eye closure threshold within the time, and ZSS is the total number of frames within the time; S204, detecting the iris center in the eye region according to the position information of the eye in the image; using the gradient minimization method to smooth the eye region, obtaining a rough estimate of the iris center by color intensity, applying a distance filter to remove invalid edges that are too close or too far from the rough center of the iris, and after applying RANSAC to the edge points of the iris, calculating the radius of the iris, and locating the iris center by combining the intensity energy and edge intensity information; S205, convert the RGB image into HSV, set the HSV range value of the color to be extracted according to the pixel color information corresponding to the iris center coordinates, call the inRange function of the OpenCV image processing library to extract the color space, remove the noise after binarization, connect the breakpoints, call the findContours function to detect the contour, draw a rectangular area to locate the contour, put all the positioning coordinate points within the iris coordinate range into a set X, which is the pixel position set of the pupil of the human eye in the image, and the set X includes {X 1 , X 2 , ..., X z }, where X 1 , X 2 , ..., X z Respectively represent the 1st, 2nd, ..., zth data in the pupil coordinate set, each data contains the horizontal and vertical coordinates of the pixel point; S206, automatically call the pop-up window function and record the pop-up window appearance time T 1 , the camera continues to collect and analyze the pupil coordinate set in the face information; when the number of sets changes, it is determined whether the proportion of the changed number of sets is greater than the error threshold. If it is less than or equal to the error threshold, no processing is performed; if it is greater than the error threshold, the time T when the number changes is recorded. 2 , put it into the formula to calculate the attention transfer time: Where, T is the attention transfer time, T 1 is the time when the pop-up window appears, T 2 is the time when the number of sets changes, |X| is the original number of sets, |GB| is the number of sets after the change, V is the error threshold, and next means ending this judgment and continuing with the next data judgment; The pop-up window prompts the user's current status information, and comes with a verification code input box and a confirmation button. After the user enters the verification code according to the prompt and clicks the confirmation button, the pop-up window disappears, and the test software and camera are turned off at the same time; the displacement speed of the mouse moving to the verification code input box and the keyboard input speed when entering the verification code are automatically recorded; S207, the eye closing frequency and attention shifting time are substituted into the formula to comprehensively calculate the face state degree. If the calculation result is less than or equal to the face state degree threshold, it is a normal situation; if it is greater than the face state degree threshold, it means that the user is in a tired state, which is an abnormal situation. The formula is as follows: Where ZTD is the face state, α is the eye closure influence factor, EC is the eye closure frequency, β is the attention influence factor, T is the attention transfer time, B is the standard attention transfer time, γ is the mouse displacement speed influence factor, R s is the recorded mouse displacement speed. This value is greater than zero. s is the mouse displacement speed threshold, δ is the keyboard input speed influencing factor, R J is the recorded keyboard input speed. The value is greater than zero. J is the keyboard input speed threshold, Z G is the face state threshold, and result is the judgment result; In S3, the protection status needs to be determined based on the status of S1 and S2 as well as the current status. There are two situations: The current status is normal: if S1 is normal, the system changes to normal status; if S1 is abnormal, continue to analyze S2 status information; if S2 is normal, the system changes to normal status; if S2 is abnormal, the system changes to abnormal status and automatically enters protection status; The current state is abnormal: S1 state is abnormal, the system changes to abnormal state; S1 state is normal, continue to analyze S2 state information, S2 state is abnormal, the system changes to abnormal state, S2 state is normal, the system changes to normal state, and automatically exits the protection state; In S4, the influencing factors include the mouse displacement speed threshold and the keyboard input speed threshold, and the displacement speed of the mouse to the verification code input box and the keyboard input speed when entering the verification code collected in step S2 are averaged with the mouse displacement speed threshold and the keyboard input speed threshold to obtain the adjustment information of the corresponding threshold.
