Attendance management method
By introducing an automatic card replenishment evaluation and approval mechanism in the electronic attendance system, the problem of cumbersome card replenishment process after the employee fails to check in is solved, the accuracy and work efficiency of attendance data are improved, and management costs are reduced.
Patent Information
- Application Number
- CN202411579733.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
After the existing electronic attendance system fails to check in, employees need to spontaneously apply for card replacement. The card replacement process is cumbersome, affects work efficiency, and may lead to inaccurate attendance data and increase management costs.
A method of attendance management is proposed, including automatic card replenishment evaluation and approval. By analyzing the employee's schedule attendance rules data and work location location data, the system automatically submits the card replenishment application, and provides two methods: manual approval and automatic approval.
It improves the efficiency of the card replenishment process, reduces the workload and management costs of employees, enhances the accuracy and reliability of attendance data, and adapts to the needs and changes of corporate attendance management.
Smart Images

Figure CN119515329A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of attendance management, and in particular to an attendance management method. Background Art
[0002] In modern enterprise management, attendance management is an important task. Nowadays, most enterprises use electronic attendance systems based on computer technology and network technology to realize the automatic collection, processing and analysis of attendance data. Electronic attendance systems usually collect employee punch-in information through facial recognition and other methods, and upload the punch-in data to the server in real time. However, due to objective reasons such as network delays and equipment failures in the actual working environment, employees may fail to punch in. In the existing electronic attendance system, after an employee fails to punch in, the employee needs to voluntarily apply for a replacement card, and then the replacement card operation can be completed after approval by the approver. The replacement card process is relatively cumbersome, and employees need to spend extra time and energy to handle it, which affects work efficiency. In addition, employees may forget to apply for a replacement card, resulting in inaccurate attendance data. In addition, the approval process also increases management costs.
[0003] In summary, in order to improve work efficiency and management level, reduce employees' workload and management costs, and improve the accuracy and reliability of attendance data, we propose an attendance management method. Summary of the invention
[0004] The purpose of the present invention is to propose an attendance management method to address the problem in the background technology that when an employee fails to clock in due to objective reasons such as network delays and equipment failures, the employee needs to voluntarily apply for a replacement card, and the replacement process is relatively cumbersome.
[0005] The technical solution of the present invention: an attendance management method, comprising the following steps:
[0006] Select and initialize the attendance system;
[0007] Daily attendance management based on the attendance system, including punch-in methods and punch-in exception handling;
[0008] Automatic card-replacement evaluation and approval: Automatic card-replacement evaluation analyzes the employee's schedule attendance data and work location location data to conduct a comprehensive evaluation of whether to automatically re-card. If an employee fails to punch in and passes the automatic card-replacement evaluation process, the system automatically submits a card-replacement application for approval by the approver;
[0009] Attendance data analysis and report generation: Use clustering algorithms to analyze attendance data, perform cluster analysis on employee attendance patterns, and generate attendance reports.
[0010] Optionally, the selecting and initializing the attendance system specifically includes the following steps:
[0011] Choose an attendance system that has integrated AI capabilities and can be integrated with internal systems;
[0012] The construction of the database of employee related information specifically includes database structure design and data entry process.
[0013] Optionally, the database structure design includes determining a data table structure, the data table structure including an employee basic information table and an attendance history record table;
[0014] The employee basic information table includes the design of a table structure containing employee ID, name, department, and position fields. In a relational database, SQL statements are used to create the employee_basic_info table. The design of the table structure provides a basic data framework for subsequent attendance management.
[0015] The attendance history record table contains employee ID, attendance date, attendance time, attendance type, and attendance status fields. Use a relational database to store related information.
[0016] Optionally, the data entry process includes basic information entry and biometric information entry. Basic information entry is done manually or by batch import. For a small number of employees, the basic information of the employee's work number, name, department, and position is manually entered through the user interface provided by the system. The HTML form in the web interface is responsible for collecting information. The backend converts the received form data into SQL insert statements and inserts them into the database. For the entry of a large amount of employee information, batch import is used. Organize employee information into a CSV file format, with each line containing work number, name, department, and position. Use a database management tool or use a Python script in conjunction with the `pandas` library to read the CSV file and insert the data into the database for batch import. When entering data, verify the input data. For employee work numbers, use the database's uniqueness constraint or query whether the work number already exists in the database before inserting the data to check whether the work number is a unique value and whether the name complies with the naming specifications.
[0017] Biometric information entry includes image acquisition, feature extraction, and data storage. Graphic acquisition includes using an attendance terminal with a camera to capture employees' facial images. During the acquisition process, the device pre-processes the image by adjusting the image size and normalizing the brightness. In terms of biometric information entry, it verifies whether the dimension of the feature vector is consistent with the dimension of the model output and whether the image file is readable.
[0018] Feature extraction uses convolutional neural network (CNN) algorithm to extract facial features. Suppose the collected facial image is I, which is input into the CNN model. After a series of convolutional layers, pooling layers and fully connected layers, the facial feature vector is obtained. In this process, the calculation of the convolution layer is the core. For the convolution kernel K, the convolution operation is performed by sliding on the image. The formula is as follows:
[0019]
[0020] Among them, O is the output feature map, i, j are the coordinates on the feature map, and m, n are the coordinates of the convolution kernel.
[0021] The pooling layer is used to reduce the amount of data. The maximum pooling operation takes the maximum value in a pooling window. The size of the pooling window is k×k. Let the feature map before pooling be F. The element calculation formula of the feature map F′ after pooling is as follows:
[0022]
[0023] Data storage: Associate the extracted feature vector and the storage path of the image with the employee's ID number and insert it into the employee_biometric_info table. Use the database constraint mechanism to maintain data integrity. Use foreign key constraints in the employee_biometric_info table to ensure the integrity of the association between biometric information and basic information. Back up the database regularly to prevent data loss. Use the database's built-in backup tools or enterprise-level backup solutions. At the same time, establish a data recovery mechanism to quickly restore data in the event of data corruption or loss.
[0024] Optionally, the clocking-in method includes face recognition attendance and voice recognition attendance, wherein in the face recognition attendance method, an employee arrives at the office and clocks in at an attendance point equipped with a face recognition device, and a convolutional neural network (CNN) is used in the device to recognize the employee's face.
[0025] Assume the currently collected facial image is I new , extract feature vectors through CNN and compare it with the employee's facial feature vector stored in the database Make a comparison.
[0026] The comparison function is calculated using cosine similarity.
[0027] Cosine similarity:
[0028]
[0029] If s is greater than the set threshold, the recognition is successful and the system records the clock-in time;
[0030] In the speech recognition attendance, speech recognition includes an acoustic model and a language model, wherein a deep neural network-hidden Markov model (DNN-HMM) hybrid model is used to construct an acoustic model, and the speech signal is converted into a Mel frequency cepstral coefficient (MFCC) feature vector sequence. In the deep neural network-hidden Markov model (DNN-HMM) hybrid model algorithm, DNN is used to model the acoustic features. Assume that the input MFCC feature vector sequence is The output of the DNN is the probability distribution of each phoneme Where p is a phoneme and t is a time step; an n-gram model is used to build a language model. For a sentence consisting of words w1, W2, …, w M , the calculation of n-gram probability is based on conditional probability, and the probability formula of bigram is:
[0031]
[0032] Among them, count(w i-1 , w i ) is the word W i-1 and w i The number of consecutive occurrences, count(W i-1 ) is the word W i-1 Number of occurrences;
[0033] The speech recognition system combines the acoustic model and the language model, and uses the Viterbi algorithm to find the most likely word sequence. Let the probability of the acoustic model output be P. acoustic (w), the probability of the language model output is P lauguage (w), then the system selects the word sequence w * Is to make P acoustic (w * ) lauguage (w * ) and then matches the recognized word with the employee’s name. If the match is successful, the clock-in is successful.
[0034] Optionally, in the punch-in exception processing, the system makes a preliminary judgment based on the current network status, system operation log and other information, and sets the network status indicator as N s , obtained through network monitoring tools, when the network delay is less than a certain threshold ΔT n Indicates that the network is normal, otherwise it indicates that the network is abnormal. Set the system fault mark to S f If the system has an error log, S f =1, otherwise S f =0, let the initial judgment function be J(N s , Sf ), if N s >ΔT n or S f =1, it is initially judged that the punch-in failure is caused by network delay or system failure, and the automatic card replacement evaluation process is entered.
[0035] Optionally, the automatic card replacement evaluation process analyzes the employee's daily attendance regularity data and work location location data to comprehensively evaluate whether to automatically replace the card;
[0036] Daily attendance data: Assume that the employee's attendance record in the past n days is A = {a1, a2, ..., a n}, where a j (j=1,2,…,n) represents the attendance status of the jth day (1 for normal clocking in, 0 for not clocking in). The formula for calculating the normal clocking probability of an employee is as follows;
[0037]
[0038] Workplace location data: Get the workplace location information of the employee on the day he / she did not clock in. Suppose the employee's normal workplace is L record The formula for calculating the Euclidean distance is as follows:
[0039]
[0040] Where (x record ,y record ) is L record The coordinates of (x work ,y work ) is L work The coordinates of
[0041] Comprehensive evaluation: Based on the rule-based evaluation algorithm, a normal check-in probability threshold P is set. threshold and distance threshold D threshold , P threshold =0.9,D threshold = 500 m, if P normal >P threshold And D <D threshold , the system determines that the employee meets the conditions for automatic card replacement.
[0042] Assume that the comprehensive evaluation function is E(P normal , D), if E(P normal , D)=1, indicating that the automatic card replacement condition is met, otherwise it is not met.
[0043] Optionally, the automatic card replacement evaluation process includes an optimization plan, in which multi-source data collection and comprehensive analysis are added to improve the perfection of the automatic card replacement evaluation process, by collecting equipment status information, the punch-in status of other employees in the same area, and the recent enterprise network maintenance plan and other information, and performing a comprehensive analysis based on a comprehensive judgment function and an equipment failure possibility evaluation function, so as to further improve the automatic card replacement evaluation process;
[0044] Multi-source data collection includes device temperature, camera status, check-in success rate in the same area, and network maintenance plan for the day. The temperature T of the face recognition device is obtained through sensors. d , assuming the normal operating temperature range is [T min , T max ], the camera status uses a status value S c Indicates that S c =0 indicates fault, S c =1 means normal; let the number of employees in the same area be N a , the number of people who successfully clocked in is N suc , calculate the check-in success rate in the same area: Let the maintenance plan be marked as M. If there is a network maintenance plan on that day, M = 1, otherwise M = 0;
[0045] Comprehensive judgment function: Let the preliminary judgment function be J(N s , S f , T d , S c , P a , M), where N s is the network status indicator, S f is the system fault mark, T d is the device temperature, S c is the camera status, P a is the check-in success rate in the same area, M is the network maintenance plan mark, and multiple thresholds are set. If N s >ΔT n or S f =1 or (T d <T min or T d >T max ), S c =0 or (P a <P thresholda If M=0), it is initially determined that the card punching failure may be caused by objective reasons, and the automatic card re-entry process is entered.
[0046] Equipment failure possibility evaluation function: Let the equipment failure possibility function be F(T d), constructed in the form of a normal distribution function, assuming that the normal operating temperature of the equipment follows a normal distribution N(μ, σ 2 ), where μ is the average normal operating temperature, σ 2 is the standard deviation, and the function formula is as follows:
[0047]
[0048] According to the value of this function, it is judged whether the device fails to clock in due to temperature problems. If F(T d ) is greater than the set threshold, the device temperature is considered to be the cause of the clock-in failure.
[0049] Optionally, in the automatic card re-application approval, first, after the employee fails to punch in and passes the automatic card re-application evaluation process, the system automatically submits a card re-application application. The card re-application application information includes the employee's work number, name, card re-application date, and card re-application type, and displays the reason for the card re-application failure after comprehensive analysis. The system sends a card re-application application notification to the employee's direct superior (set as the approver), and the notification method is pushed by the company's internal communication tool or email push. The approver can set the approval method to manual approval or automatic approval based on the automatic approval decision function. In the manual approval mode, after the approver receives the card re-application notification, he or she makes an approval decision by checking the relevant information of the employee. Suppose the approval decision function is D p (I), where I is the information set viewed by the approver. If the approver approves the card replacement application, then D p (I)=1, otherwise D p (I) = 0, approval passed, the system automatically adds a card replacement record to the attendance record, and the employee's attendance status is updated to normal; approval failed, the system notifies the employee of the approval result and informs the employee that he or she can appeal if he or she has any objection;
[0050] In the automatic approval mode based on the automatic approval decision function, the automatic approval decision function is assumed to be A(E(P normal , D), L late ), where E(P normal , D) is the comprehensive evaluation function, L late is the number of times an employee is late in the past month, and sets the relevant threshold, L late <3 and E(P normal , D)>0.8, if the above conditions are met, then A(E(P notmal , D), L late )=1, indicating that the application for card replacement is automatically approved, the system automatically adds the card replacement record to the attendance record, and the employee's attendance status is updated to normal; otherwise A(E(P normal , D), L late )=0, enter the manual approval mode, and the approver will review the relevant information or communicate with the employee to make the approval.
[0051] Optionally, in the attendance data analysis, the system uses a clustering algorithm in the data mining algorithm to analyze the attendance data, performs cluster analysis on the attendance patterns of employees, and groups employees with similar attendance patterns so that the company can understand the work habits and labor distribution of employees. Suppose the employee attendance data matrix is M (rows represent employees, columns represent information such as dates and attendance status), and the employees are divided into k clusters by the K-Means algorithm in the clustering algorithm. The goal of the K-Means algorithm is to minimize the intra-cluster sum of squares, and the iterative process is as follows:
[0052] Randomly initialize k cluster centers μ1, μ1, …, μ k ;
[0053] For each employee data point x i (i=1,2,…,N), calculate the distance d(x i , μ j ), and x i Assign to the cluster C to which the nearest cluster center belongs j ;
[0054] Update cluster centers:
[0055]
[0056] Among them, |C j | is cluster C j The number of data points in ;
[0057] Repeat the above steps until the cluster center no longer changes significantly.
[0058] Automatic report generation: The system automatically generates attendance reports, including monthly attendance reports and department attendance summary reports. For the monthly attendance report, let the number of lateness of employee i in month m be Number of early leave Available times: Attendance days are The report can be presented in a table format. The table header contains the employee's work number, name, number of latenesses, number of early departures, number of absenteeism, and number of days worked. The data row for each employee contains the corresponding statistical data. A visual report can be generated. The bar chart shows the comparison of the number of latecomers in each department, and the pie chart shows the proportion of different attendance statuses among all employees.
[0059] Compared with the prior art, the present invention has at least one of the following beneficial technical effects:
[0060] 1. The present invention analyzes whether to automatically make up the card after an employee fails to punch in through the combination and optimization of multiple algorithms. The system automatically submits a card-making application for employees who meet the conditions for automatic card-making. For example, a comprehensive evaluation is performed based on the employee's daily attendance pattern data (calculating the probability of normal punching in) and the work location positioning data (calculating the Euclidean distance), and whether to make up the card is determined from the two aspects of attendance habits and the rationality of the work location. This is objective and fair, avoids human arbitrariness, and reasonably handles the punch-in failure caused by objective reasons.
[0061] 2. In the automatic card replacement evaluation process, add multi-source data collection such as equipment status information, clocking-in status of other employees in the same area, and recent enterprise network maintenance plans. Based on comprehensive analysis of comprehensive judgment function and equipment failure possibility evaluation function, comprehensively and accurately judge whether the clocking-in failure is due to objective reasons, avoid misjudgment of card replacement situations, and improve the accuracy and rationality of automatic card replacement evaluation.
[0062] 3. The data entry process includes basic information entry and biometric information entry. Data verification during entry, such as work number uniqueness and name standardization verification, ensures data quality and lays a good foundation for attendance management. The image acquisition, feature extraction and data storage processes in biometric information entry are improved, image acquisition preprocessing improves image quality, and the CNN algorithm for feature extraction ensures effective extraction of facial features. The integrity maintenance of data storage ensures data security and provides data support for the automatic card replacement process.
[0063] 4. The system automatically submits the card replacement application and displays the reason for the failed card punching, improving the efficiency of the card replacement process, providing both manual approval and automatic approval, increasing the flexibility of approval, and the automatic approval decision function automatically judges based on the employee's comprehensive evaluation function and the number of latenesses in the past month and other conditions, reducing manual workload, and ensuring the fairness and consistency of approval based on clear rules and thresholds. In the manual approval mode, the approver views the relevant information and makes decisions to ensure the reasonable handling of special situations.
[0064] 5. The automatic card replacement process in the attendance management system of the present invention increases multi-source data collection and comprehensive analysis mechanisms, such as adding equipment status information, other employees' clocking in and out in the same area, and recent enterprise network maintenance plans in the automatic card replacement evaluation. Based on the comprehensive judgment function and the equipment failure possibility evaluation function, the evaluation results are used to optimize the judgment accuracy of automatic card replacement and avoid misjudgment. In addition, the system automatically submits the card replacement application and displays the reason. By providing two methods, manual approval and automatic approval, the automatic approval decision function is used to automatically judge according to the comprehensive evaluation of employees and the number of late arrivals, and the manual approval is used to check the relevant information for decision-making, which reduces the workload and management costs of employees, and improves the accuracy and reliability of attendance data, so that the system can adapt to the needs and changes of enterprise attendance management. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flow chart of the attendance management method is given. DETAILED DESCRIPTION
[0066] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0067] See also Figure 1 As shown, this embodiment provides an attendance management method, including selecting and initializing an attendance system, daily attendance management based on the attendance system, automatic card replenishment evaluation and approval, and attendance data analysis and report generation. The details are as follows:
[0068] 1. Select and initialize the attendance system. Initializing the attendance system includes building a database of employee-related information.
[0069] Select an attendance system that integrates artificial intelligence functions and can be integrated with internal systems (such as human resources management systems, office communication tools). In this embodiment, the DingTalk intelligent attendance system is selected. Such a system has many advantages. Its integrated artificial intelligence function can achieve high-precision identity recognition, in-depth data analysis and intelligent decision-making, and the ability to integrate with internal systems ensures data liquidity and management coordination.
[0070] The construction of the database of employee-related information specifically includes database structure design, data entry process, and biometric information entry.
[0071] The database structure design includes determining a data table structure, and the data table structure includes an employee basic information table and an attendance history record table.
[0072] The employee basic information table includes the design of the table structure including the employee ID, which is a unique identifier and can be set to integer or character data types, name (character type), department (character type), and position (character type) fields. In a relational database (such as MySQL), use SQL statements to create the employee_basic_info table. The design of the table structure provides a basic data framework for subsequent attendance management, which facilitates the precise positioning and classification of employees in various attendance-related operations.
[0073] The attendance history record table contains fields such as employee ID, attendance date (date type), attendance time (time type), attendance type (on duty / off duty, character type), and attendance status (normal / late / early leave / absentee, character type). Relevant information is stored in a relational database (such as MySQL). A relational database (such as MySQL) provides a reliable platform for storing this information. The table can fully reflect the attendance track of employees and provide a rich data source for attendance analysis, statistics, and exception handling.
[0074] The data entry process includes basic information entry and biometric information entry. Basic information entry can be done manually or by batch import.
[0075] For a small number of employees, basic employee information, including employee ID, name, department, and position, can be manually entered through the user interface provided by the system. The HTML form in the web interface is responsible for collecting information, and the backend converts the received form data into SQL insert statements and inserts them into the database. This method is simple and direct, suitable for situations with a small number of employees, and can ensure the accurate entry of each employee's information; for the entry of a large number of employee information, batch import is used. Employee information is organized into a CSV file format that meets the format requirements, with each line containing employee basic information data. Then, a database management tool or Python script is used in combination with the `pandas` library to read the CSV file and insert the data into the database for batch import, which improves the efficiency of data entry and reduces the errors that may be caused by manual operations.
[0076] When entering data, the input data is verified. For employee IDs, the uniqueness constraint of the database is used or the database is queried before inserting data to see whether the ID already exists. Check whether the ID is a unique value and whether the name complies with the naming specifications to ensure that the basic information entered meets the requirements of corporate management and lay a good data foundation for subsequent attendance management.
[0077] Biometric information entry includes image acquisition, feature extraction, and data storage. Graphic acquisition includes using an attendance terminal with a camera to capture employees' facial images. During the acquisition process, the device will pre-process the image by adjusting the image size and normalizing the brightness. In terms of biometric information entry, it verifies whether the dimension of the feature vector is consistent with the dimension of the model output, and whether the image file is readable.
[0078] Feature extraction uses convolutional neural network (CNN) algorithm to extract facial features;
[0079] Assume that the collected facial image is I, input it into the CNN model, and after a series of convolutional layers, pooling layers, and fully connected layers, the facial feature vector is obtained. In this process, the calculation of the convolution layer is the core. For the convolution kernel K, the convolution operation is performed by sliding on the image. The formula is as follows:
[0080]
[0081] Among them, O is the output feature map, i, j are the coordinates on the feature map, and m, n are the coordinates of the convolution kernel.
[0082] The pooling layer is used to reduce the amount of data. The maximum pooling operation takes the maximum value in a pooling window. The size of the pooling window is k×k. Let the feature map before pooling be F. The element calculation formula of the feature map F′ after pooling is as follows:
[0083]
[0084] Data storage: Associate the extracted feature vectors and the storage path of the image with the employee ID and insert them into the employee_biometric_info table; use the database constraint mechanism to maintain data integrity, and use foreign key constraints in the employee_biometric_info table to ensure the integrity of the association between biometric information and basic information, and back up the database regularly to prevent data loss. You can use the database's built-in backup tools or enterprise-level backup solutions. At the same time, establish a data recovery mechanism so that data can be quickly restored in the event of data corruption or loss.
[0085] 2. Daily Attendance Process
[0086] (I) Check-in
[0087] Face recognition attendance
[0088] When employees arrive at the office, they clock in at an attendance point equipped with a facial recognition device, which uses a convolutional neural network (CNN) to recognize the employee's face.
[0089] Assume the currently collected facial image is I new , extract feature vectors through convolutional neural network (CNN and compare it with the employee's facial feature vector stored in the database Make a comparison.
[0090] The comparison function is calculated using cosine similarity.
[0091] Cosine Similarity:
[0092]
[0093] When s is greater than a certain threshold (set as θ, θ=0.8), the recognition is successful and the system records the clock-in time (clock-in time for work or clock-out time for leaving get off work).
[0094] In some special scenarios, such as when employees are unable to operate equipment with their hands, speech recognition can be used for attendance. Speech recognition includes acoustic models and language models. The deep neural network-hidden Markov model (DNN-HMM) hybrid model is used to build the acoustic model. First, the speech signal is converted into a Mel-frequency cepstral coefficient (MFCC) feature vector sequence. In the deep neural network-hidden Markov model (DNN-HMM) hybrid model algorithm, DNN is used to model acoustic features. Suppose the input MFCC feature vector sequence is The output of the DNN is the probability distribution of each phoneme Where p is the phoneme and w is the time step; the n-gram model is used to build the language model. For a sentence consisting of words w1, W2, ..., w M , the calculation of n-gram probability is based on conditional probability, and the probability formula of bigram is:
[0095]
[0096] Among them, count(w i-1 , w i ) is the word W i-1 and w i The number of consecutive occurrences, count(w i-1 ) is the word w i-1 Number of occurrences.
[0097] The speech recognition system combines the acoustic model with the language model and uses the Viterbi algorithm to find the most likely word sequence. Let the probability of the acoustic model output be P acoustic (w), the probability of the language model output is P lauguage (w), then the system selects the word sequence w * Is to make P acoustic (w * ) lauguage (w * ) and then matches the recognized word with the employee’s name. If the match is successful, the clock-in is successful.
[0098] (II) Exception handling: When the card punch fails, the system makes a preliminary judgment based on the current network status and system operation log. Set the network status indicator as N s , which can be obtained through network monitoring tools. When the network delay is less than a certain threshold ΔT n Indicates that the network is normal, otherwise it indicates that the network is abnormal. Set the system fault mark to S f If an error log appears in the system, S f =1, otherwise Sf =0, let the initial judgment function be J(N s , S f ), when N s >ΔT n or S f =1, it is initially judged that the punch-in failure is caused by network delay or system failure, and the automatic card replacement evaluation process is entered.
[0099] 3. Automatic card replacement assessment and approval
[0100] When an employee fails to punch in, the employee will first enter the automatic card-replacement evaluation process, which analyzes the employee's daily attendance data and work location location data to make a comprehensive assessment of whether to automatically make up the card;
[0101] In the daily attendance regularity data, suppose the employee's attendance record in the past n days is A = {a1, a2, ..., a n}, where a j (j=1,2,…,n) represents the attendance status of the jth day (1 for normal clocking in, 0 for not clocking in). The formula for calculating the normal clocking probability of an employee is as follows;
[0102]
[0103] In the work location location data, obtain the work location location information of the employee on the day when he / she did not clock in. Suppose the employee's normal work location is L record The formula for calculating the Euclidean distance is as follows:
[0104]
[0105] Where (x record ,y record ) is L record The coordinates of (x work ,y work ) is L work The coordinates of .
[0106] 2. Comprehensive Assessment
[0107] Rule-based evaluation algorithm: Set a normal check-in probability threshold P threshold and distance threshold D threshold , P threshold =0.9, D threshold = 500 m, when P normal >P threshold And D<D threshold , the system determines that the employee meets the conditions for automatic card replacement.
[0108] Assume that the comprehensive evaluation function is E(P normal , D), when E(Pnormal , D)=1, indicating that the automatic card replacement condition is met, otherwise it is not met.
[0109] (III) Optimization plan
[0110] In addition to the network status and system operation logs, the completeness of the automatic card replacement evaluation process is improved by increasing multi-source data collection and comprehensive analysis. In this embodiment, by collecting equipment status information, the clocking-in status of other employees in the same area, and recent enterprise network maintenance plan information, a comprehensive analysis is performed based on the comprehensive judgment function and the equipment failure possibility evaluation function to further improve the automatic card replacement evaluation process.
[0111] Get the temperature T of the face recognition device through the sensor d , assuming the normal operating temperature range is [T min , T max ], the camera status uses a status value S c Indicates that S c =0 indicates fault, S c =1 means normal; let the number of employees in the same area be N a , the number of people who successfully clocked in is N suc , calculate the check-in success rate in the same area: Let the maintenance plan be marked as M. If there is a network maintenance plan on that day, then M = 1, otherwise M = 0;
[0112] Comprehensive judgment function
[0113] Assume that the initial judgment function is J(N s , S f , T d , S c , P a , M), where N s is the network status indicator, S f is the system fault mark, T d is the device temperature, S c is the camera status, P a is the check-in success rate in the same area, M is the network maintenance plan mark, and multiple thresholds are set. s >ΔT n or S f =1 or (T d <T min or T d >T max ), S c =0 or ( If M=0), it is initially determined that the card punching failure may be caused by objective reasons, and the automatic card re-entry process is entered.
[0114] Equipment failure probability evaluation function
[0115] Assume that the equipment failure probability function is F(T d ), constructed in the form of a normal distribution function, assuming that the normal operating temperature of the equipment follows a normal distribution N(μ, σ 2 ), where μ is the average normal operating temperature, σ 2 is the standard deviation, and the function formula is as follows:
[0116]
[0117] The possibility of the device failing to clock in due to temperature problems can be determined based on the value of this function. d ) is greater than the set threshold, the device temperature is considered to be the cause of the clock-in failure.
[0118] After an employee fails to punch in and passes the automatic re-card evaluation process, the system automatically submits a re-card application. The re-card application information includes the employee's work number, name, re-card date, and re-card type, and displays the reason for the failure to punch in after comprehensive analysis. The system sends a re-card application notification to the employee's direct superior (set as the approver). The notification method is pushed by the company's internal communication tool or email push. The approver can set the approval method to manual approval or automatic approval based on the automatic approval decision function. In the manual approval mode, after receiving the re-card notification, the approver checks the employee's relevant information, such as daily attendance regularity data, work location location information, and the re-card evaluation results given by the system. The approver makes an approval decision based on the viewed information. Let the approval decision function be D p (I), where I is the information set viewed by the approver. If the approver approves the card replacement application, then D p (I)=1, otherwise D p (I) = 0, the approval is passed, the system automatically adds a card replacement record to the attendance record, and the employee's attendance status is updated to normal; if the approval is not passed, the system notifies the employee of the approval result and informs the employee that he or she can appeal if he or she has any objections. In the automatic approval mode based on the automatic approval decision function, the automatic approval decision function is set to A(E(P normal , D), L late ), where E(P normal , D) is the comprehensive evaluation function, L late is the number of times an employee is late in the past month, and sets the relevant threshold, L late <3 and E(P normai , D)>0.8, if the above conditions are met, then A(E(P normal , D), L late )=1, indicating that the application for card replacement is automatically approved, the system automatically adds the card replacement record to the attendance record, and the employee's attendance status is updated to normal; otherwise A(E(P normal , D), L late)=0, enter the manual approval mode, and the approver will review the relevant information or communicate with the employee to make the approval.
[0119] 4. Attendance data analysis and report generation
[0120] 1. Attendance data analysis
[0121] The system uses the clustering algorithm in the data mining algorithm to analyze the attendance data, performs cluster analysis on the attendance patterns of employees, and groups employees with similar attendance patterns into one group so that the company can better understand the work habits and labor distribution of employees. Suppose the employee attendance data matrix is M (rows represent employees, columns represent information such as dates and attendance status), and the K-Means algorithm in the clustering algorithm is used to divide employees into k clusters. The goal of the K-Means algorithm is to minimize the intra-cluster sum of squares. The iterative process is as follows:
[0122] Randomly initialize k cluster centers μ1, μ1, …, μ k ;
[0123] For each employee data point x i (i=1,2,…,N), calculate the distance d(x i , μ j ), and x i Assign to the cluster C to which the nearest cluster center belongs j ;
[0124] Update cluster centers:
[0125]
[0126] Among them, |C j | is cluster C j The number of data points in ;
[0127] Repeat the above steps until the cluster center no longer changes significantly.
[0128] (II) Automatic report generation
[0129] The system automatically generates attendance reports, including monthly attendance reports and department attendance summary reports. For the monthly attendance report, let the number of lateness of employee i in month m be Number of early leave Available times: Attendance days are The report can be presented in a table format, with the table headers including employee ID, name, number of latenesses, number of early departures, number of absenteeism, and number of days worked. Each employee's data row is the corresponding statistical data. Visual reports can also be generated, with a bar chart showing the comparison of the number of latecomers in each department and a pie chart showing the proportion of different attendance statuses in all employees. The attendance situation is displayed intuitively, providing convenient decision support for enterprise managers.
[0130] The present invention combines and optimizes a variety of algorithms to analyze whether to automatically make up for an employee's failed clock-in. The system automatically submits a card-making application for employees who meet the conditions for automatic card-making. For example, a comprehensive evaluation is performed based on the employee's daily attendance pattern data (calculating the probability of normal clock-in) and the workplace location data (calculating the Euclidean distance), and whether to make up for the card is determined from two aspects: attendance habits and the rationality of the workplace. This is objective and fair, avoids human arbitrariness, and reasonably handles clock-in failures caused by objective reasons.
[0131] In the automatic card replacement evaluation process, multi-source data collection is added, such as equipment status information, clocking-in status of other employees in the same area, and recent enterprise network maintenance plans. Based on comprehensive analysis of the comprehensive judgment function and the equipment failure possibility evaluation function, it is possible to comprehensively and accurately judge whether the clocking-in failure is due to objective reasons, avoid misjudgment of the card replacement situation, and improve the accuracy and rationality of the automatic card replacement evaluation.
[0132] Furthermore, the data entry process includes basic information entry and biometric information entry, data verification during entry, such as work number uniqueness and name standard verification, to ensure data quality and lay a good foundation for attendance management; the image acquisition, feature extraction and data storage processes in biometric information entry are improved, image acquisition preprocessing improves image quality, feature extraction CNN algorithm ensures effective extraction of facial features, and the integrity maintenance of data storage ensures data security, providing data support for the automatic card replacement process.
[0133] It is worth mentioning that the system automatically submits the application for card replacement and displays the reason for the failed card punching, which improves the efficiency of the card replacement process, provides both manual approval and automatic approval, increases the flexibility of approval, and the automatic approval decision function automatically judges based on the employee's comprehensive evaluation function and the number of latenesses in the past month and other conditions, reducing manual workload. It ensures the fairness and consistency of approval based on clear rules and thresholds. In the manual approval mode, the approver views the relevant information and makes decisions to ensure the reasonable handling of special situations.
[0134] The automatic card replacement process in the attendance management system of the present invention increases multi-source data collection and comprehensive analysis mechanisms, such as adding equipment status information, the punch-in status of other employees in the same area, and the recent enterprise network maintenance plan and other data to the automatic card replacement evaluation. Based on the comprehensive judgment function and the equipment failure possibility evaluation function, the evaluation results are used to optimize the judgment accuracy of the automatic card replacement to avoid misjudgment. In addition, the system automatically submits the card replacement application and displays the reason. By providing two methods of manual approval and automatic approval, the automatic approval decision function is used to automatically judge according to the comprehensive evaluation of employees and the number of late arrivals, and the manual approval is used to view the relevant information and make decisions, which reduces the workload and management costs of employees, and improves the accuracy and reliability of attendance data, so that the system can adapt to the needs and changes of enterprise attendance management.
[0135] The above specific embodiments are only several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. The attendance management method is characterized in that: The following steps are involved: Select and initialize the attendance system; Daily attendance management based on the attendance system, including punch-in methods and punch-in exception handling; Automatic card-replacement evaluation and approval: Automatic card-replacement evaluation analyzes the employee's schedule attendance data and work location location data to conduct a comprehensive evaluation of whether to automatically re-card. If an employee fails to punch in and passes the automatic card-replacement evaluation process, the system automatically submits a card-replacement application for approval by the approver; Attendance data analysis and report generation: Use clustering algorithms to analyze attendance data, perform cluster analysis on employee attendance patterns, and generate attendance reports.
2. The attendance management method according to claim 1, characterized in that: The selection and initialization of the attendance system specifically includes the following steps: Choose an attendance system that has integrated AI capabilities and can be integrated with internal systems; The construction of the database of employee related information specifically includes database structure design and data entry process.
3. The attendance management method according to claim 2, characterized in that: The database structure design includes determining a data table structure, which includes an employee basic information table and an attendance history record table; The employee basic information table includes the design of the table structure containing the employee ID, name, department, and position fields. In the relational database, the SQL statement is used to create the table `employee_biometric_info`. The design of the table structure provides a basic data framework for subsequent attendance management; The attendance history record table contains employee ID, attendance date, attendance time, attendance type, and attendance status fields, and uses a relational database to store relevant information.
4. The attendance management method according to claim 2, characterized in that: The data entry process includes basic information entry and biometric information entry. Basic information entry is manually entered or imported in batches. For a small number of employees, the basic information of the employee's work number, name, department, and position is manually entered through the user interface provided by the system. The HTML form in the Web interface is responsible for collecting information. The backend converts the received form data into SQL insert statements and inserts them into the database. For the entry of a large number of employee information, a batch import method is used to organize the employee information into a CSV file format, where each line contains the work number, name, department, and position. The CSV file is read using a database management tool or a Python script combined with the `pandas` library and the data is inserted into the database for batch import. When entering data, the input data is verified. For the employee's work number, the uniqueness constraint of the database is used or the database is queried before inserting the data to see if the work number already exists, to check whether the work number is a unique value, and to check whether the name complies with the naming specification. Biometric information entry includes image acquisition, feature extraction, and data storage. Graphic acquisition includes using an attendance terminal with a camera to collect employee facial images. During the acquisition process, the device performs preprocessing on the image by adjusting the image size and normalizing the brightness. In terms of biometric information entry, it verifies whether the dimension of the feature vector is consistent with the dimension of the model output and whether the image file is readable. Feature extraction uses convolutional neural network algorithm to extract facial features. Suppose the collected facial image is I, which is input into the CNN model. After a series of convolutional layers, pooling layers and fully connected layers, the facial feature vector is obtained. In this process, the calculation of the convolution layer is the core. For the convolution kernel K, the convolution operation is performed by sliding on the image. The formula is as follows: Among them, O is the output feature map, i, j are the coordinates on the feature map, and m, n are the coordinates of the convolution kernel; The pooling layer is used to reduce the amount of data. The maximum pooling operation takes the maximum value in a pooling window. The pooling window size is k×k. Let the feature map before pooling be F. The element calculation formula of the feature map F' after pooling is as follows: Data storage: Associate the extracted feature vector and the storage path of the image with the employee's ID number and insert it into the employee_biometric_info table. Use the database constraint mechanism to maintain data integrity. Use foreign key constraints in the employee_biometric_info table to ensure the integrity of the association between biometric information and basic information. Back up the database regularly to prevent data loss. Use the database's built-in backup tools or enterprise-level backup solutions. At the same time, establish a data recovery mechanism to quickly restore data in the event of data corruption or loss.
5. The attendance management method according to claim 1, characterized in that: The clocking-in method includes face recognition attendance and voice recognition attendance. In the face recognition attendance method, employees arrive at the office and clock in at an attendance point equipped with a face recognition device. The device uses a convolutional neural network to recognize the employee's face. Assume the currently collected facial image is I new , extract feature vectors through CNN and compare it with the employee's facial feature vector stored in the database Make a comparison; The comparison function is calculated using cosine similarity. Cosine Similarity: If s is greater than the set threshold, the recognition is successful and the system records the clock-in time; In the speech recognition attendance, speech recognition includes an acoustic model and a language model. A deep neural network-hidden Markov model hybrid model is used to construct an acoustic model, and the speech signal is converted into a Mel frequency cepstral coefficient feature vector sequence. In the deep neural network-hidden Markov model hybrid model algorithm, DNN is used to model the acoustic features. Assume that the input MFCC feature vector sequence is The output of the DNN is the probability distribution of each phoneme Where p is a phoneme and t is a time step; use the n-gram model to build a language model. For a sentence consisting of words w1, w2, …, w M , the calculation of n-gram probability is based on conditional probability, and the probability formula of bigram is: Among them, count(w i-1 ,w i ) is the word w i-1 and w i The number of consecutive occurrences, count(w i-1 ) is the word w i-1 Number of occurrences; The speech recognition system combines the acoustic model and the language model and uses the Viterbi algorithm to find the most likely word sequence. Let the probability of the acoustic model output be P acoustic (w), the probability of the language model output is P lauguage (w), then the system selects the word sequence w * Is to make P acoustic (w * ) lauguage (w * ) and then matches the recognized word with the employee’s name. If the match is successful, the clock-in is successful.
6. The attendance management method according to claim 5, characterized in that: In the punch-in exception processing, the system makes a preliminary judgment based on the current network status and system operation log. Set the network status indicator as N s , obtained through network monitoring tools, when the network delay is less than a certain threshold △T n Indicates that the network is normal, otherwise it indicates that the network is abnormal. Set the system fault mark to S f If an error log appears in the system, S f =1, otherwise S f =0, let the initial judgment function be J(N s ,S f ), when N s >△T n or S f =1, it is initially judged that the punch-in failure is caused by network delay or system failure, and the automatic card replacement evaluation process is entered.
7. The attendance management method according to claim 1, characterized in that: The automatic card replacement evaluation process analyzes the employee's daily attendance data and work location location data to conduct a comprehensive evaluation on whether to automatically replace the card; Daily attendance data: Assume that the employee's attendance record in the past n days is A = {a1, a2, ..., a n }, where a j (j=1,2,…,n) represents the attendance status of the jth day (1 for normal clocking in, 0 for not clocking in), and the probability of normal clocking in of an employee is calculated as follows; Workplace location data: Get the workplace location information of the employee on the day he / she did not clock in. Suppose the employee's normal workplace is L record , the formula for calculating the Euclidean distance is as follows: Where (x record ,y record ) is L record The coordinates of (x work ,y work ) is L work The coordinates of Comprehensive evaluation: Based on the rule-based evaluation algorithm, a normal check-in probability threshold P is set. threshold and distance threshold D threshold , P threshold =0.9,D threshold = 500 m, when P normal >P threshold And D <D threshold , the system determines that the employee meets the conditions for automatic card replacement; Assume that the comprehensive evaluation function is E(P normal ,D), when E(P normal ,D)=1, indicating that the automatic card replacement conditions are met, otherwise they are not met.
8. The attendance management method according to claim 7, characterized in that: The automatic card replacement evaluation process includes an optimization plan, in which multi-source data collection and comprehensive analysis are added to improve the perfection of the automatic card replacement evaluation process. By collecting equipment status information, the punch-in status of other employees in the same area, and recent enterprise network maintenance plan information, a comprehensive analysis is performed based on a comprehensive judgment function and an equipment failure possibility evaluation function to further improve the automatic card replacement evaluation process; Multi-source data collection includes device temperature, camera status, check-in success rate in the same area, and network maintenance plan for the day. The temperature T of the face recognition device is obtained through sensors. d , assuming the normal operating temperature range is [T min , T max ], the camera status uses a status value S c Indicates that S c =0 indicates fault, S c =1 means normal; let the number of employees in the same area be N a , the number of people who successfully clocked in is N suc , calculate the check-in success rate in the same area: Let the maintenance plan be marked as M. If there is a network maintenance plan on that day, then M = 1, otherwise M = 0; Comprehensive judgment function: Let the preliminary judgment function be J(N s ,S f ,T d ,S c ,P a ,M), where N s is the network status indicator, S f is the system fault mark, T d is the device temperature, S c is the camera status, P a is the check-in success rate in the same area, M is the network maintenance plan mark, and multiple thresholds are set. s >△T n or S f =1 or (T d <T min or T d >T max ), S c =0 or ( If M=0), it is initially determined that the card punching failure may be caused by objective reasons, and the automatic card re-entry process is entered; Equipment failure possibility evaluation function: Let the equipment failure possibility function be F(T d ), constructed in the form of a normal distribution function, assuming that the normal operating temperature of the equipment follows a normal distribution N(μ,σ 2 ), where μ is the average normal operating temperature, σ 2 is the standard deviation, and the function formula is as follows: The possibility of the device failing to clock in due to temperature problems can be determined based on the value of this function. d ) is greater than the set threshold, the device temperature is considered to be the cause of the clock-in failure.
9. The attendance management method according to claim 8, characterized in that: In the automatic card re-application approval, first, after the employee fails to punch in and passes the automatic card re-application evaluation process, the system automatically submits the card re-application application. The card re-application application information includes the employee's work number, name, card re-application date, and card re-application type, and displays the reason for the card re-application failure after comprehensive analysis. The system sends the card re-application application notification to the employee's direct superior. The notification method is pushed by the company's internal communication tool or email push. The approver can set the approval method to manual approval or automatic approval based on the automatic approval decision function. In the manual approval mode, after receiving the card re-application notification, the approver makes an approval decision by checking the relevant information of the employee. Suppose the approval decision function is D p (I), where I is the information set viewed by the approver. If the approver approves the card replacement application, then D p (I)=1, otherwise D p (I) = 0, approval passed, the system automatically adds a card replacement record to the attendance record, and the employee's attendance status is updated to normal; approval failed, the system notifies the employee of the approval result and informs the employee that he or she can appeal if he or she has any objection; In the automatic approval mode based on the automatic approval decision function, the automatic approval decision function is assumed to be A(E(P normal ,D),L late ), where E(P normal ,D) is the comprehensive evaluation function, L late is the number of times an employee is late in the past month, and sets the relevant threshold, L late <3 and E(P normal ,D)>0.8, if the above conditions are met, then A(E(P normal ,D),L late )=1, indicating that the application for card replacement is automatically approved, the system automatically adds the card replacement record to the attendance record, and the employee's attendance status is updated to normal; otherwise A(E(P normal ,D),L late )=0, enter the manual approval mode, and the approver will review the relevant information or communicate with the employee to make the approval.
10. The attendance management method according to claim 1, characterized in that: In the attendance data analysis, the system uses the clustering algorithm in the data mining algorithm to analyze the attendance data, performs cluster analysis on the attendance patterns of employees, and groups employees with similar attendance patterns into one group so that the company can understand the work habits and labor distribution of employees. Suppose the employee attendance data matrix is M, and the K-Means algorithm in the clustering algorithm is used to divide the employees into k clusters. The goal of the K-Means algorithm is to minimize the intra-cluster sum of squares, and its iterative process is as follows: Randomly initialize k cluster centers μ1, μ1, …, μ k ; For each employee data point x i (i=1,2,…,N), calculate the distance d(x i ,μ j ), and x i Assign to the cluster C to which the nearest cluster center belongs j ; Update cluster centers: Among them, |C j | is cluster C j The number of data points in ; Repeat the above steps until the cluster center no longer changes significantly; Automatic report generation: The system automatically generates attendance reports, including monthly attendance reports and department attendance summary reports. For the monthly attendance report, let the number of lateness of employee i in month m be Number of early leave Available times: Attendance days are The report can be presented in a table format. The table header contains the employee's work number, name, number of latenesses, number of early departures, number of absenteeism, and number of days worked. The data row for each employee contains the corresponding statistical data. A visual report can be generated. The bar chart shows the comparison of the number of latecomers in each department, and the pie chart shows the proportion of different attendance statuses among all employees.
Citation Information
Patent Citations
Employee attendance record filling method and device, mobile terminal and storage medium
CN111798219A
Speech function automatic evaluation system and method based on speech recognition
CN113496696A
Method and device for generating supplementary clock-in record
CN115481974A
Attendance machine data information management method based on Internet of Things
CN117495329A
Real-time multi-mode attendance collection platform and method supporting elastic assessment
CN118470814A
Cited By
Automatic attendance processing method and system based on large model and storage medium
CN122529679A