An intelligent data management system and method applied to intelligent attendance
By using an intelligent data management system that combines deep learning and time series models to update feature vector standards in real time, the problem of recognizing facial features changes in existing smart attendance systems has been solved, improving the accuracy of attendance recognition and classification performance.
Patent Information
- Application Number
- CN202411662532.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-11-20
AI Technical Summary
Existing smart attendance systems have low discrimination ability when dealing with complex facial feature vector classification, are prone to misjudgment, and cannot adapt to changes in facial features, leading to recognition failure.
The system employs an image processing module, a standard determination module, a sample matching module, and a standard update module. It combines a deep learning model and a time series model to update the feature vector standard in real time. A hyperplane is constructed using an SVM classification model to perform feature vector matching.
It improves the accuracy of attendance recognition, can adapt to dynamic changes in facial features, reduces recognition failures, and enhances classification performance.
Smart Images

Figure CN119763208B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an intelligent data management system and method for smart attendance. Background Technology
[0002] As businesses expand and their need for more refined management increases, the drawbacks of traditional attendance methods become increasingly apparent. Manual statistics are prone to errors, inefficient, and data loss, making them unsuitable for the complex attendance scenarios of modern enterprises. Meanwhile, technological advancements are driving intelligent management as a trend, with big data, cloud computing, and mobile internet technologies maturing rapidly. Against this backdrop, intelligent attendance and data management systems have emerged. These systems enable automatic collection, real-time analysis, and accurate statistics of attendance data, facilitating employee operation through mobile devices and other channels. They provide businesses with comprehensive and accurate attendance information, improving management efficiency, reducing costs, and meeting the urgent needs of enterprises for efficient, convenient, and scientific attendance management.
[0003] In existing smart attendance technologies, some simple classification models may not be able to handle complex facial feature vector classification problems well, resulting in low distinguishability of feature vectors of different clock-in personnel and easy misjudgment. In addition, over time, people's facial features may change, such as changes in hairstyle, makeup, wearing glasses, etc. If traditional attendance systems do not have corresponding update mechanisms, they may fail to correctly identify employees. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent data management system and method for smart attendance, so as to solve the problems raised in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: an intelligent data management system for smart attendance, the system comprising: an image processing module, a standard determination module, a sample matching module, and a standard update module;
[0006] The image processing module is used to acquire attendance images of clocking in and perform face recognition to obtain face images; the standard determination module is used to extract face image features and form feature vector standards; the sample matching module is used to perform face recognition and feature vector matching on newly acquired attendance images of clocking in; the standard update module is used to periodically update the feature vector standards according to the changes in the feature vectors of the face images of clocking in at different times;
[0007] The output of the image processing module is connected to the input of the standard determination module; the output of the standard determination module is connected to the input of the sample matching module; and the output of the sample matching module is connected to the input of the standard update module.
[0008] The image processing module includes an image acquisition unit, a face recognition unit, and an image processing unit;
[0009] The image acquisition unit is used to acquire attendance images of personnel clocking in; the face recognition unit is used to recognize the attendance images using a face recognition algorithm; the image processing unit is used to crop and standardize the attendance images according to the recognition results to obtain face images.
[0010] The output of the image acquisition unit is connected to the input of the face recognition unit; the output of the face recognition unit is connected to the input of the image processing unit; and the output of the image processing unit is connected to the input of the standard determination module.
[0011] The standard determination module includes a feature extraction unit, a hyperplane construction unit, a distance calculation unit, and a standard determination unit;
[0012] The feature extraction unit is used to extract features from face images using a pre-trained model and form feature vectors; the hyperplane construction unit is used to construct hyperplanes for different check-in personnel to classify the feature vectors of face images of different check-in personnel; the distance calculation unit is used to calculate the distance between all feature vectors corresponding to the face image of the same check-in personnel and the hyperplane corresponding to that check-in personnel; the standard determination unit is used to select the feature vector corresponding to the maximum distance as the feature vector standard;
[0013] The output of the feature extraction unit is connected to the input of the hyperplane construction unit; the output of the hyperplane construction unit is connected to the input of the distance calculation unit; the output of the distance calculation unit is connected to the input of the standard determination unit; and the output of the standard determination unit is connected to the input of the sample matching module.
[0014] The sample matching module includes a new sample recognition unit, a similarity calculation unit, and a face matching unit;
[0015] The new sample recognition unit is used to perform face recognition on the newly collected attendance images of clock-in personnel to obtain the feature vector of the newly collected sample; the similarity calculation unit is used to calculate the cosine similarity between the new sample and all feature vector standards; the face matching unit is used to set a threshold and select the clock-in personnel corresponding to the feature vector standard with the highest cosine similarity value and that meets the threshold range as the face matching result;
[0016] The output of the new sample recognition unit is connected to the input of the similarity calculation unit; the output of the similarity calculation unit is connected to the input of the face matching unit; and the output of the face matching unit is connected to the input of the standard update module.
[0017] The standard update module includes an image preprocessing unit, a temporal model unit, and a standard update unit.
[0018] The image preprocessing unit is used to obtain feature vectors and perform standardization processing; the time series model unit is used to construct a time series model to analyze the trend of feature vector data changing over time; the standard update unit is used to update the feature vector standard.
[0019] The output of the image preprocessing unit is connected to the input of the temporal model unit; the output of the temporal model unit is connected to the input of the standard update unit.
[0020] An intelligent data management method for smart attendance systems includes the following steps:
[0021] Step 1: Collect attendance images of clocking in and perform facial recognition to obtain facial images;
[0022] Step 2: Extract facial image features and form a standard feature vector;
[0023] Step 3: Perform facial recognition and feature vector matching on the newly collected attendance images of clocking in and out;
[0024] Step 4: Update the feature vector standard based on the changes in the feature vectors of the facial images of people who clock in at different times.
[0025] In Step 1, the personnel who clock in are marked as: [D1,D2,…,D m For check-in personnel D i Collect their attendance images and label them as: [K1,K2,…,K H(Di) ];
[0026] Where m is a positive integer, representing the number of people clocking in, and D... m Let D represent the m-th data collector; i∈{1,2,…,m}, representing the sequence of data collectors, and D... i H(Di) represents the number of attendance images for the i-th person; H(Di) represents the number of attendance images for the i-th person; K H(Di) This represents the H(Di)th attendance image for the i-th person who clocks in;
[0027] For attendance image K of the person who clocked in / out jFace recognition was performed on the attendance images using the HaarCascades face detection algorithm. Based on the face detection results, face regions were cropped from the attendance images. The cropped face regions were then adjusted and re-cropped, and standardized and normalized to obtain a face image P with a fixed size and pixel range. j ;
[0028] Where j is a positive integer, j∈{1,2,…,H(Di)}, representing the sequence of attendance images of the i-th person, and K j P represents the j-th attendance image for the i-th data collector; j Attendance image K j The corresponding facial image;
[0029] Face recognition is performed on all attendance images to obtain face images.
[0030] In step 2, for the person D who clocks in... i Face image P j The pre-trained deep learning model VGGFace is used to extract features from face images, resulting in a fixed-length feature vector: F i,j =[F1,F2,…,F n Standardize the feature vectors.
[0031] Among them, F i,j Personnel D who clocked in i Face image P j Corresponding feature vector; n is a positive integer representing the number of features, F n This represents the nth feature;
[0032] For each face image, feature extraction is performed to obtain the corresponding feature vector;
[0033] For check-in personnel D i H(Di) set of feature vectors corresponding to the face image are used to construct the hyperplane segmentation D. i The facial image feature vector of the person and the facial image feature vector of other people who clock in:
[0034] Personnel D who clocked in i The feature vectors of those who clock in are labeled as positive, while the feature vectors of other clock-in participants are labeled as negative.
[0035] A segmentation hyperplane is constructed using an SVM classification model; the hyperplane is represented as: ω T x+b=0;
[0036] Where ω represents the normal vector, b is the bias, and x represents the input feature vector;
[0037] The model is trained based on the collected feature vectors, and the parameters ω and b are adjusted by minimizing the classification error and maximizing the margin between the two classes.
[0038] Calculate the eigenvector F i,j Distance to the hyperplane: d(F) i,j )=|ω T ·F i,j +b| / ||ω||;
[0039] Where, |ω T ·F i,j +b| is the eigenvector F i,j The algebraic distance to the hyperplane represents the projection of the eigenvector onto the direction of the hyperplane's normal vector; ||ω|| is the magnitude of the normal vector, representing the length of the hyperplane's normal vector.
[0040] Calculate the number of people who clock in (D) i The distance between the feature vector corresponding to all face images and the hyperplane is used to select the feature vector with the maximum distance as the feature vector standard.
[0041] Choosing the feature vector with the maximum distance as the standard ensures that the selected feature vector best represents the characteristics of the person who checked in. This feature vector has the maximum separation from the hyperplane in the feature space, and can better reflect the identity characteristics of the person who checked in.
[0042] Construct hyperplanes for the facial image feature vectors of all check-in personnel, and calculate the standard feature vectors corresponding to all check-in personnel.
[0043] In Step 3, face recognition is performed on the newly collected attendance images of the personnel to obtain the feature vectors of the newly collected samples; a threshold A is set, and the cosine similarity between the feature vector of the newly collected samples and the standard feature vector of each personnel is calculated: Sim=(F new ·F std ) / (||F new || ||F std ||); Select the check-in personnel corresponding to the feature vector standard with the highest cosine similarity value that meets the threshold range as the face matching result; when the similarity does not meet the threshold, it is considered an abnormal match;
[0044] Among them, F new F represents the feature vector of the newly collected sample; std This represents the standard for eigenvectors.
[0045] In step 4, for the person D who clocked in... i Record its t1~t rAttendance image data at any given time; perform face recognition to obtain face image data, extract features to obtain feature vectors; standardize the feature vectors to obtain feature vector [F]. i (t1),F i (t2),...,F i (t r )];
[0046] Where r is a positive integer, representing the number of attendance times for the personnel clocking in, and t r This indicates the r-th attendance record of the person who clocked in; F i (t r ) represents the facial image feature vector corresponding to the r-th attendance record of the person clocking in;
[0047] Building an LSTM time series model:
[0048] Determine the model parameters: input feature vector dimension n, number of hidden layer units h, learning rate α;
[0049] Constructing an LSTM network structure: Input layer, receiving standardized feature vectors; LSTM layer, capturing long-term dependencies of time series through LSTM units; Fully connected layer, mapping the output of the LSTM layer to the predicted value;
[0050] Using mean squared error as the loss function: ; Select the Adam optimization algorithm for model training to minimize the loss function; Input the standardized feature vector into the LSTM model, perform forward propagation, and calculate the output; Calculate the loss and perform backpropagation to update the model parameters;
[0051] Where u is a positive integer, u∈{1,2,...,r}, representing the sequence of times; f u Indicates t u The true feature vector at time step f; u,v Indicates t u The predicted feature vector at time step;
[0052] Update feature vector criteria: ;
[0053] Among them, F i,update Personnel D who clocked in i Updated feature vector standard; F i,std Personnel D who clocked in i The eigenvector standard before the update; β is the smoothing factor;
[0054] The facial image feature vector standard for all personnel who clock in has been updated.
[0055] When features may change over time, predicted feature vectors can help capture trends in the changes of feature vectors of clock-in participants. Model predictions can account for potential changes, rather than relying solely on past data.
[0056] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention can update the feature vector standard in real time or periodically according to actual changes, so that it can always accurately reflect the current facial features of the clock-in personnel, thereby better adapting to the dynamic changes in personnel features and reducing attendance recognition failures caused by changes in personnel appearance; This invention uses an SVM classification model to construct a segmentation hyperplane, which has good performance in handling binary classification problems and can effectively distinguish the feature vectors of different clock-in personnel. By adjusting the parameters by minimizing the classification error and maximizing the margin between the two classes, the constructed hyperplane can more accurately classify the feature vectors, providing a reliable basis for subsequent selection of feature vector standards and improving the overall classification performance of the model. Attached Figure Description
[0057] Figure 1 This is a flowchart illustrating an intelligent data management system for smart attendance based on the present invention.
[0058] Figure 2 This is a schematic diagram illustrating the steps of an intelligent data management method for smart attendance based on the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Example: Figures 1-2 As shown, the present invention provides a technical solution, an intelligent data management system for smart attendance, the system comprising: an image processing module, a standard determination module, a sample matching module, and a standard update module;
[0061] The image processing module is used to acquire attendance images of clocking in and perform face recognition to obtain face images; the standard determination module is used to extract face image features and form feature vector standards; the sample matching module is used to perform face recognition and feature vector matching on newly acquired attendance images of clocking in; the standard update module is used to periodically update the feature vector standards according to the changes in the feature vectors of the face images of clocking in at different times;
[0062] The output of the image processing module is connected to the input of the standard determination module; the output of the standard determination module is connected to the input of the sample matching module; and the output of the sample matching module is connected to the input of the standard update module.
[0063] The image processing module includes an image acquisition unit, a face recognition unit, and an image processing unit;
[0064] The image acquisition unit is used to acquire attendance images of personnel clocking in; the face recognition unit is used to recognize the attendance images using a face recognition algorithm; the image processing unit is used to crop and standardize the attendance images according to the recognition results to obtain face images.
[0065] The output of the image acquisition unit is connected to the input of the face recognition unit; the output of the face recognition unit is connected to the input of the image processing unit; and the output of the image processing unit is connected to the input of the standard determination module.
[0066] The standard determination module includes a feature extraction unit, a hyperplane construction unit, a distance calculation unit, and a standard determination unit;
[0067] The feature extraction unit is used to extract features from face images using a pre-trained model and form feature vectors; the hyperplane construction unit is used to construct hyperplanes for different check-in personnel to classify the feature vectors of face images of different check-in personnel; the distance calculation unit is used to calculate the distance between all feature vectors corresponding to the face image of the same check-in personnel and the hyperplane corresponding to that check-in personnel; the standard determination unit is used to select the feature vector corresponding to the maximum distance as the feature vector standard;
[0068] The output of the feature extraction unit is connected to the input of the hyperplane construction unit; the output of the hyperplane construction unit is connected to the input of the distance calculation unit; the output of the distance calculation unit is connected to the input of the standard determination unit; and the output of the standard determination unit is connected to the input of the sample matching module.
[0069] The sample matching module includes a new sample recognition unit, a similarity calculation unit, and a face matching unit;
[0070] The new sample recognition unit is used to perform face recognition on the newly collected attendance images of clock-in personnel to obtain the feature vector of the newly collected sample; the similarity calculation unit is used to calculate the cosine similarity between the new sample and all feature vector standards; the face matching unit is used to set a threshold and select the clock-in personnel corresponding to the feature vector standard with the highest cosine similarity value and that meets the threshold range as the face matching result;
[0071] The output of the new sample recognition unit is connected to the input of the similarity calculation unit; the output of the similarity calculation unit is connected to the input of the face matching unit; and the output of the face matching unit is connected to the input of the standard update module.
[0072] The standard update module includes an image preprocessing unit, a temporal model unit, and a standard update unit.
[0073] The image preprocessing unit is used to obtain feature vectors and perform standardization processing; the time series model unit is used to construct a time series model to analyze the trend of feature vector data changing over time; the standard update unit is used to update the feature vector standard.
[0074] The output of the image preprocessing unit is connected to the input of the temporal model unit; the output of the temporal model unit is connected to the input of the standard update unit.
[0075] An intelligent data management method for smart attendance systems includes the following steps:
[0076] Step 1: Collect attendance images of clocking in and perform facial recognition to obtain facial images;
[0077] Step 2: Extract facial image features and form a standard feature vector;
[0078] Step 3: Perform facial recognition and feature vector matching on the newly collected attendance images of clocking in and out;
[0079] Step 4: Update the feature vector standard based on the changes in the feature vectors of the facial images of people who clock in at different times.
[0080] In Step 1, the personnel who clock in are marked as: [D1,D2,…,D m For check-in personnel D i Collect their attendance images and label them as: [K1,K2,…,K H(Di) ];
[0081] Where m is a positive integer, representing the number of people clocking in, and D... m Let D represent the m-th data collector; i∈{1,2,…,m}, representing the sequence of data collectors, and D... i H(Di) represents the number of attendance images for the i-th person; H(Di) represents the number of attendance images for the i-th person; K H(Di) This represents the H(Di)th attendance image for the i-th person who clocks in;
[0082] For attendance image K of the person who clocked in / out jFace recognition was performed on the attendance images using the HaarCascades face detection algorithm. Based on the face detection results, face regions were cropped from the attendance images. The cropped face regions were then adjusted and re-cropped, and standardized and normalized to obtain a face image P with a fixed size and pixel range. j ;
[0083] Where j is a positive integer, j∈{1,2,…,H(Di)}, representing the sequence of attendance images of the i-th person, and K j P represents the j-th attendance image for the i-th data collector; j Attendance image K j The corresponding facial image;
[0084] Face recognition is performed on all attendance images to obtain face images.
[0085] In step 2, for the person D who clocks in... i Face image P j The pre-trained deep learning model VGGFace is used to extract features from face images, resulting in a fixed-length feature vector: F i,j =[F1,F2,…,F n Standardize the feature vectors.
[0086] Among them, F i,j Personnel D who clocked in i Face image P j Corresponding feature vector; n is a positive integer representing the number of features, F n This represents the nth feature;
[0087] For each face image, feature extraction is performed to obtain the corresponding feature vector;
[0088] For check-in personnel D i H(Di) set of feature vectors corresponding to the face image are used to construct the hyperplane segmentation D. i The facial image feature vector of the person and the facial image feature vector of other people who clock in:
[0089] Personnel D who clocked in i The feature vectors of those who clock in are labeled as positive, while the feature vectors of other clock-in participants are labeled as negative.
[0090] A segmentation hyperplane is constructed using an SVM classification model; the hyperplane is represented as: ω T x+b=0;
[0091] Where ω represents the normal vector, b is the bias, and x represents the input feature vector;
[0092] The model is trained based on the collected feature vectors, and the parameters ω and b are adjusted by minimizing the classification error and maximizing the margin between the two classes.
[0093] Calculate the eigenvector F i,j Distance to the hyperplane: d(F) i,j )=|ω T ·F i,j +b| / ||ω||;
[0094] Where, |ω T ·F i,j +b| is the eigenvector F i,j The algebraic distance to the hyperplane represents the projection of the eigenvector onto the direction of the hyperplane's normal vector; ||ω|| is the magnitude of the normal vector, representing the length of the hyperplane's normal vector.
[0095] Calculate the number of people who clock in (D) i The distance between the feature vector corresponding to all face images and the hyperplane is used to select the feature vector with the maximum distance as the feature vector standard.
[0096] Choosing the feature vector with the maximum distance as the standard ensures that the selected feature vector best represents the characteristics of the person who checked in. This feature vector has the maximum separation from the hyperplane in the feature space, and can better reflect the identity characteristics of the person who checked in.
[0097] Construct hyperplanes for the facial image feature vectors of all check-in personnel, and calculate the standard feature vectors corresponding to all check-in personnel.
[0098] In Step 3, face recognition is performed on the newly collected attendance images of the personnel to obtain the feature vectors of the newly collected samples; a threshold A is set, and the cosine similarity between the feature vector of the newly collected samples and the standard feature vector of each personnel is calculated: Sim=(F new ·F std ) / (||F new || ||F std ||); Select the check-in personnel corresponding to the feature vector standard with the highest cosine similarity value that meets the threshold range as the face matching result; when the similarity does not meet the threshold, it is considered an abnormal match;
[0099] Among them, F new F represents the feature vector of the newly collected sample; std This represents the standard for eigenvectors.
[0100] In step 4, for the person D who clocked in... i Record its t1~t rAttendance image data at any given time; perform face recognition to obtain face image data, extract features to obtain feature vectors; standardize the feature vectors to obtain feature vector [F]. i (t1),F i (t2),...,F i (t r )];
[0101] Where r is a positive integer, representing the number of attendance times for the personnel clocking in, and t r This indicates the r-th attendance record of the person who clocked in; F i (t r ) represents the facial image feature vector corresponding to the r-th attendance record of the person clocking in;
[0102] Building an LSTM time series model:
[0103] Determine the model parameters: input feature vector dimension n, number of hidden layer units h, learning rate α;
[0104] Constructing an LSTM network structure: Input layer, receiving standardized feature vectors; LSTM layer, capturing long-term dependencies of time series through LSTM units; Fully connected layer, mapping the output of the LSTM layer to the predicted value;
[0105] Using mean squared error as the loss function: ; Select the Adam optimization algorithm for model training to minimize the loss function; Input the standardized feature vector into the LSTM model, perform forward propagation, and calculate the output; Calculate the loss and perform backpropagation to update the model parameters;
[0106] Where u is a positive integer, u∈{1,2,...,r}, representing the sequence of times; f u Indicates t u The true feature vector at time step f; u,v Indicates t u The predicted feature vector at time step;
[0107] Update feature vector criteria: ;
[0108] Among them, F i,update Personnel D who clocked in i Updated feature vector standard; F i,std Personnel D who clocked in i The eigenvector standard before the update; β is the smoothing factor;
[0109] The facial image feature vector standard for all personnel who clock in has been updated.
[0110] When features may change over time, predicted feature vectors can help capture trends in the changes of feature vectors of clock-in participants. Model predictions can account for potential changes, rather than relying solely on past data.
[0111] In this embodiment:
[0112] Step 1: Mark the clock-in personnel as: [Employee 1, Employee 2, Employee 3]; For Employee 2, collect their attendance image and mark it as: [Attendance Image 1, Attendance Image 2, Attendance Image 3];
[0113] For employee 2's attendance image 1, face recognition is performed: the face detection algorithm Haar Cascades is used to identify the face region in the attendance image; based on the face detection results, the face region is cropped from the attendance image; the cropped face region is adjusted and cropped again, and the face region is standardized and normalized to obtain face image 1 with a fixed size and fixed pixel range;
[0114] Face recognition is performed on all attendance images to obtain face images.
[0115] Step 2: For employee 2's face image 1, use the pre-trained deep learning model VGGFace to extract features from the face image to obtain a fixed-length feature vector for employee 2's face image 1; then standardize the feature vector.
[0116] For each face image, feature extraction is performed to obtain the corresponding feature vector;
[0117] For the three sets of feature vectors corresponding to the face image of employee 2, construct a hyperplane to segment the feature vector of employee 2's face image and the feature vectors of other people's face images:
[0118] The feature vector of employee 2 is labeled as the positive class, and the feature vectors of other clock-in employees are labeled as the negative class.
[0119] Construct a segmentation hyperplane using an SVM classification model;
[0120] The model is trained based on the collected feature vectors, and the parameters are adjusted by minimizing the classification error and maximizing the margin between the two classes.
[0121] Calculate the distance between the feature vector of face image 1 of employee 2 (fixed length) and the hyperplane;
[0122] Calculate the distance between the feature vectors corresponding to all face images of employee 2 and the hyperplane, and select the feature vector corresponding to the maximum distance as the feature vector standard;
[0123] Choosing the feature vector with the maximum distance as the standard ensures that the selected feature vector best represents the characteristics of the person who checked in. This feature vector has the maximum separation from the hyperplane in the feature space, and can better reflect the identity characteristics of the person who checked in.
[0124] Construct hyperplanes for the facial image feature vectors of all check-in personnel, and calculate the standard feature vectors corresponding to all check-in personnel.
[0125] Step 3: Perform face recognition on the newly collected attendance images of the clock-in personnel to obtain the feature vector of the newly collected sample; set a threshold and calculate the cosine similarity between the feature vector of the newly collected sample and the standard feature vector of each clock-in personnel; select the clock-in personnel corresponding to the feature vector standard with the highest cosine similarity value and that meets the threshold range as the face matching result; when the similarity does not meet the threshold, it is considered an abnormal match.
[0126] Step 4: For employee 2, record their attendance image data from time t1 to t5; perform face recognition to obtain face image data, extract features to obtain feature vectors; standardize the feature vectors to obtain the feature vectors of employee 2's attendance face images from time t1 to t5.
[0127] Building an LSTM time series model: Determining model parameters; Building the LSTM network structure: Input layer, receiving standardized feature vectors; LSTM layer, capturing long-term dependencies of the time series through LSTM units; Fully connected layer, mapping the output of the LSTM layer to the predicted value;
[0128] The mean squared error is used as the loss function; the Adam optimization algorithm is selected for model training to minimize the loss function; the standardized feature vectors are input into the LSTM model, forward propagation is performed, and the output is calculated; the loss is calculated and backpropagation is performed to update the model parameters.
[0129] Update the feature vector standard according to the formula; update the feature vector standard of the facial images of all personnel who clock in.
[0130] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. An intelligent data management method for smart attendance, characterized in that: The method includes the following steps: Step 1: Collect attendance images of clocking in and perform facial recognition to obtain facial images; Step 2: Extract facial image features and form a standard feature vector; Step 3: Perform facial recognition and feature vector matching on the newly collected attendance images of clocking in and out; Step 4: Update the feature vector standard based on the changes in the feature vectors of the facial images of people who clock in at different times; In step 4, for the person D who clocked in... i Record its t1~t r Attendance image data at any given time; perform face recognition to obtain face image data, extract features to obtain feature vectors; standardize the feature vectors to obtain feature vector [F]. i (t1),F i (t2),...,F i (t r )]; Among them, D i Let t represent the i-th person who clocks in; r is a positive integer representing the number of attendance times for that person; t r This indicates the r-th attendance record of the person who clocked in; F i (t r ) indicates that the person who clocked in is D i The facial image feature vector corresponding to the r-th attendance record; Building an LSTM time series model: Determine the model parameters: input feature vector dimension n, number of hidden layer units h, learning rate α; Constructing an LSTM network structure: Input layer, receiving standardized feature vectors; LSTM layer, capturing long-term dependencies of time series through LSTM units; Fully connected layer, mapping the output of the LSTM layer to the predicted value; Using mean squared error as the loss function: ; Select the Adam optimization algorithm for model training to minimize the loss function; Input the standardized feature vector into the LSTM model, perform forward propagation, and calculate the output; Calculate the loss and perform backpropagation to update the model parameters; Where u is a positive integer, u∈{1,2,...,r}, representing the sequence of times; f u Indicates t u The true feature vector at time step f; u,v Indicates t u The predicted feature vector at time step; Update feature vector criteria: ; Among them, F i,update Personnel D who clocked in i Updated feature vector standard; F i,std Personnel D who clocked in i The eigenvector standard before the update; β is the smoothing factor; The facial image feature vector standard for all personnel who clock in has been updated.
2. The intelligent data management method for smart attendance according to claim 1, characterized in that: In Step 1, the personnel who clock in are marked as: [D1,D2,…,D m For check-in personnel D i Collect their attendance images and label them as: [K1,K2,…,K H(Di) ]; Where m is a positive integer, representing the number of people clocking in, and D... m Let D represent the m-th data collector; i∈{1,2,…,m}, representing the sequence of data collectors, and D... i H(Di) represents the number of attendance images for the i-th person; H(Di) represents the number of attendance images for the i-th person; K H(Di) This represents the H(Di)th attendance image for the i-th person who clocks in; For attendance image K of the person who clocked in / out j Face recognition was performed on the attendance images using the Haar Cascades face detection algorithm. Based on the face detection results, face regions were cropped from the attendance images. The cropped face regions were then adjusted and re-cropped, and standardized and normalized to obtain a face image P with a fixed size and fixed pixel range. j ; Where j is a positive integer, j∈{1,2,…,H(Di)}, representing the sequence of attendance images of the i-th person, and K j P represents the j-th attendance image of the i-th person; j Attendance image K j The corresponding facial image; Face recognition is performed on all attendance images to obtain face images.
3. The intelligent data management method for smart attendance according to claim 2, characterized in that: In step 2, for the person D who clocks in... i Face image P j The pre-trained deep learning model VGGFace is used to extract features from face images, resulting in a fixed-length feature vector: F i,j =[F1,F2,…,F n Standardize the feature vectors. Among them, F i,j Personnel D who clocked in i Face image P j Corresponding feature vector; n is a positive integer representing the number of features, F n This represents the nth feature; For each face image, feature extraction is performed to obtain the corresponding feature vector; For check-in personnel D i H(Di) set of feature vectors corresponding to the face image are used to construct the hyperplane segmentation D. i The facial image feature vector of the person and the facial image feature vector of other people who clock in: Personnel D who clocked in i The feature vectors of those who clock in are labeled as positive, while the feature vectors of other clock-in participants are labeled as negative. A segmentation hyperplane is constructed using an SVM classification model; the hyperplane is represented as: ω T x+b=0; Where ω represents the normal vector, b is the bias, and x represents the input feature vector; The model is trained based on the collected feature vectors, and the parameters ω and b are adjusted by minimizing the classification error and maximizing the margin between the two classes. Calculate the eigenvector F i,j Distance to the hyperplane: d(F) i,j )=|ω T ·F i,j +b| / ||ω||; Where, |ω T ·F i,j +b| is the eigenvector F i,j The algebraic distance to the hyperplane represents the projection of the eigenvector onto the direction of the hyperplane's normal vector; ||ω|| is the magnitude of the normal vector, representing the length of the hyperplane's normal vector. Calculate the number of people who clock in (D) i The distance between the feature vector corresponding to all face images and the hyperplane is used to select the feature vector with the maximum distance as the feature vector standard. Construct hyperplanes for the facial image feature vectors of all check-in personnel, and calculate the standard feature vectors corresponding to all check-in personnel.
4. The intelligent data management method for smart attendance according to claim 3, characterized in that: In Step 3, face recognition is performed on the newly collected attendance images of the personnel to obtain the feature vectors of the newly collected samples; a threshold A is set, and the cosine similarity between the feature vector of the newly collected samples and the standard feature vector of each personnel is calculated: Sim=(F new ·F std ) / (||F new || ||F std ||); Select the check-in personnel corresponding to the feature vector standard with the highest cosine similarity value that meets the threshold range as the face matching result; when the similarity does not meet the threshold, it is considered an abnormal match; Among them, F new F represents the feature vector of the newly collected sample; std This represents the standard for eigenvectors.
5. An intelligent data management system for smart attendance, applied to the intelligent data management method for smart attendance as described in any one of claims 1-4, characterized in that: The system includes: an image processing module, a standard determination module, a sample matching module, and a standard update module; The image processing module is used to acquire attendance images of clocking in and perform face recognition to obtain face images; the standard determination module is used to extract face image features and form feature vector standards; the sample matching module is used to perform face recognition and feature vector matching on newly acquired attendance images of clocking in; the standard update module is used to periodically update the feature vector standards according to the changes in the feature vectors of the face images of clocking in at different times; The output of the image processing module is connected to the input of the standard determination module; the output of the standard determination module is connected to the input of the sample matching module; and the output of the sample matching module is connected to the input of the standard update module.
6. The intelligent data management system for smart attendance according to claim 5, characterized in that: The image processing module includes an image acquisition unit, a face recognition unit, and an image processing unit; The image acquisition unit is used to acquire attendance images of personnel clocking in; the face recognition unit is used to recognize the attendance images using a face recognition algorithm; the image processing unit is used to crop and standardize the attendance images according to the recognition results to obtain face images. The output of the image acquisition unit is connected to the input of the face recognition unit; the output of the face recognition unit is connected to the input of the image processing unit; and the output of the image processing unit is connected to the input of the standard determination module.
7. The intelligent data management system for smart attendance as described in claim 6, characterized in that: The standard determination module includes a feature extraction unit, a hyperplane construction unit, a distance calculation unit, and a standard determination unit; The feature extraction unit is used to extract features from face images using a pre-trained model and form feature vectors; the hyperplane construction unit is used to construct hyperplanes for different check-in personnel to classify the feature vectors of face images of different check-in personnel; the distance calculation unit is used to calculate the distance between all feature vectors corresponding to the face image of the same check-in personnel and the hyperplane corresponding to that check-in personnel; the standard determination unit is used to select the feature vector corresponding to the maximum distance as the feature vector standard; The output of the feature extraction unit is connected to the input of the hyperplane construction unit; the output of the hyperplane construction unit is connected to the input of the distance calculation unit; the output of the distance calculation unit is connected to the input of the standard determination unit; and the output of the standard determination unit is connected to the input of the sample matching module.
8. The intelligent data management system for smart attendance according to claim 7, characterized in that: The sample matching module includes a new sample recognition unit, a similarity calculation unit, and a face matching unit; The new sample recognition unit is used to perform face recognition on the newly collected attendance images of clock-in personnel to obtain the feature vector of the newly collected sample; the similarity calculation unit is used to calculate the cosine similarity between the new sample and all feature vector standards; the face matching unit is used to set a threshold and select the clock-in personnel corresponding to the feature vector standard with the highest cosine similarity value and that meets the threshold range as the face matching result; The output of the new sample recognition unit is connected to the input of the similarity calculation unit; the output of the similarity calculation unit is connected to the input of the face matching unit; and the output of the face matching unit is connected to the input of the standard update module.
9. The intelligent data management system for smart attendance as described in claim 8, characterized in that: The standard update module includes an image preprocessing unit, a temporal model unit, and a standard update unit. The image preprocessing unit is used to obtain feature vectors and perform standardization processing; the time series model unit is used to construct a time series model to analyze the trend of feature vector data changing over time; the standard update unit is used to update the feature vector standard. The output of the image preprocessing unit is connected to the input of the temporal model unit; the output of the temporal model unit is connected to the input of the standard update unit.
Citation Information
Patent Citations
Face quality evaluation method based on SVM
CN111881732A
Face recognition standard photo updating method and device, computer equipment and storage medium
CN112784793A
Intelligent identification system for access control
CN118155269A