Employee attendance method, device, equipment and storage medium based on artificial intelligence
Through the employee attendance method based on artificial intelligence, electronic fences and machine learning models are used for automatic attendance judgment and record updating, which solves the problem of employees going out privately after punching in and forgetting to punch in, and improves the accuracy and convenience of attendance management.
Patent Information
- Application Number
- CN202110874816.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-07-30
AI Technical Summary
In the existing technology, employee attendance methods cannot effectively manage employees' private outings after punching in, and it is difficult to accurately punch in when employees forget to punch in, especially in branches or subsidiaries.
Adopting an employee attendance method based on artificial intelligence, by obtaining the target electronic fence and employee location data, using a machine learning model to make attendance judgments, automatically calculating attendance results, and updating attendance records when employees return, avoiding the difficulty of making up punch cards.
It improves the accuracy and convenience of attendance management, reduces the burden of employees having to punch in multiple times, and is suitable for attendance management of branches or subsidiaries.
Smart Images

Figure CN113642984B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an employee attendance method, device, equipment and storage medium based on artificial intelligence. Background Art
[0002] The existing employee attendance technology uses fixed-point clocking-in methods such as clock-in software, work badge clocking-in, fingerprint clocking-in, and facial recognition. The fixed-point clocking-in methods have the following problems: (1) It is impossible to manage the attendance of employees who go out privately after clocking in; (2) Employees often forget to clock in, resulting in the need to use the make-up clocking-in process to clock in again; (3) Some employees go out for lunch and / or rest at noon. In order to ensure that employees can still go to work on time in the afternoon, employees are required to clock in and out of work in the morning and afternoon, resulting in at least four clocking-in times a day. This is very unfriendly to employees who do not go out at noon. In addition, employees who are required to clock in at least four times a day often forget to clock in or simply do not clock in, further increasing the difficulty of attendance management; (4) For branches or subsidiaries established in other places, the number of people working in the office is relatively small, and it is difficult to use the make-up clocking-in process to accurately clock in. Summary of the invention
[0003] The main purpose of this application is to provide an employee attendance method, device, equipment and storage medium based on artificial intelligence, aiming to solve the technical problems of the prior art of using a fixed-point punch-in method to perform employee attendance, being unable to manage attendance for employees who go out privately after punching in, and being difficult to use a make-up punch-in process to accurately punch in when an employee forgets to punch in.
[0004] In order to achieve the above invention objectives, the present application proposes an employee attendance method based on artificial intelligence, the method comprising:
[0005] Acquire a target electronic fence, wherein the target electronic fence is an electronic fence generated by using an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning;
[0006] Acquire an employee data set, and respectively acquire employee location data corresponding to each employee data in the employee data set at a preset time interval;
[0007] Calculating the distance between each employee location data and the boundary of the target electronic fence respectively to obtain a first distance set;
[0008] Obtaining a first preset threshold, performing attendance judgment according to each first distance in the first distance set and the first preset threshold, and obtaining a single attendance result to be stored corresponding to each first distance;
[0009] The single attendance result library is updated according to each of the single attendance results to be stored.
[0010] Furthermore, the step of obtaining the target electronic fence includes:
[0011] Acquire an electronic fence generation signal, wherein the electronic fence generation signal carries a target office address;
[0012] In response to the electronic fence generating signal, obtaining a data set of employees participating in attendance according to the target office address;
[0013] Acquire employee home addresses according to the employee data set participating in attendance, and obtain a set of employee home addresses to be processed;
[0014] Generate a vector for the employee home address set to be processed to obtain an address feature vector to be processed;
[0015] The address feature vector to be processed is input into the electronic fence generation model to generate an electronic fence to obtain the target electronic fence.
[0016] Furthermore, before the step of obtaining the target electronic fence, the method further includes:
[0017] Acquire multiple training samples, wherein the training samples include: address sample feature vectors and electronic fence calibration values;
[0018] Inputting the plurality of training samples into a machine learning model to generate an electronic fence, and obtaining an electronic fence prediction value corresponding to the training samples;
[0019] Determine a training target according to the difference between the electronic fence prediction value and the electronic fence calibration value;
[0020] In the direction of minimizing the value of the training objective, the model parameters of the machine learning model are adjusted and training is continued until the machine learning termination condition is reached, and the machine learning model that reaches the machine learning termination condition is determined as the electronic fence generation model.
[0021] Furthermore, the step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance includes:
[0022] When there is a first distance that is less than or equal to the first preset threshold, determining that the single attendance result to be stored corresponding to each first distance that is less than or equal to the first preset threshold is attendance;
[0023] When there is a first distance greater than the first preset threshold, the single attendance result to be stored corresponding to each of the first distances greater than the first preset threshold is determined to be absent.
[0024] Furthermore, after the step of updating the single attendance result library according to each of the single attendance results to be stored, it also includes:
[0025] Get the preset attendance time range and target attendance employee data set;
[0026] Obtaining a single attendance result from the single attendance result library according to the target attendance employee data set and the preset attendance time range, to obtain a single attendance result set to be calculated;
[0027] When there is a single attendance result of which the attendance result is absent in the single attendance result set to be calculated, each of the single attendance results of which the attendance result is absent is used as the single attendance result set to be analyzed;
[0028] Sending the single attendance result set to be analyzed to the attendance audit terminal;
[0029] Obtaining a location data audit result set sent by the attendance audit terminal according to the single attendance result set to be analyzed;
[0030] updating the single attendance result library and the single attendance result set to be calculated according to the position data audit result set;
[0031] Attendance calculation is performed based on the single attendance result set to be calculated to obtain a comprehensive attendance result of the employee.
[0032] Furthermore, after the step of performing attendance calculation according to the single attendance result set to be calculated to obtain the comprehensive attendance result of the employee, the step further includes:
[0033] Obtaining each of the single attendance results corresponding to the audit results that are not empty from the single attendance result library as a corrected single attendance result set;
[0034] The electronic fence generation model is updated according to the corrected single attendance result set.
[0035] Furthermore, after the step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance, the step further includes:
[0036] Obtain the current time and the preset late reminder time range, and determine whether the current time is within the preset late reminder time range;
[0037] When the preset late reminder time range is reached, the single attendance results to be stored of the absent person are obtained from each of the single attendance results to be stored, so as to obtain a set of single attendance results to be judged;
[0038] Obtaining a peripheral electronic fence, and respectively calculating the distance between each employee location data in the single attendance result set to be determined and the boundary of the peripheral electronic fence to obtain a second distance set;
[0039] Obtaining a second preset threshold, and determining whether a second distance in the second distance set is less than or equal to the second preset threshold;
[0040] When there is a second distance that is less than or equal to the second preset threshold, the single attendance result corresponding to each of the second distances that is less than or equal to the second preset threshold is used as a set of single attendance results to be reminded;
[0041] Acquire the single attendance result from the set of single attendance results to be reminded as the single attendance result to be reminded;
[0042] Calculate the shortest path between the employee location data of the single attendance result to be reminded and the boundary of the target electronic fence to obtain the remaining commuting distance;
[0043] Obtaining preset employee speed data, and calculating a remaining commuting time set according to the remaining commuting distance and the preset employee speed data;
[0044] Generate commuting late prevention reminder information according to the employee location data, the remaining commuting distance and the remaining commuting time of the single attendance result to be reminded;
[0045] The commuting late prevention reminder information is sent to the client corresponding to the single attendance result to be reminded.
[0046] The present application also proposes an employee attendance device based on artificial intelligence, the device comprising:
[0047] A data acquisition module, used for acquiring a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning;
[0048] An employee location data determination module is used to obtain an employee data set, and to obtain employee location data corresponding to each employee data in the employee data set at a preset time interval;
[0049] A first distance determination module, used to respectively calculate the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set;
[0050] A module for determining a single attendance result to be stored, used to obtain a first preset threshold, perform attendance judgment according to each first distance in the first distance set and the first preset threshold, and obtain a single attendance result to be stored corresponding to each first distance;
[0051] The single attendance result library updating module is used to update the single attendance result library according to each single attendance result to be stored.
[0052] The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0053] The present application also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0054] The present application discloses an employee attendance method, device, equipment and storage medium based on artificial intelligence, wherein the method first obtains a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning, and then obtains an employee data set, and respectively obtains employee location data corresponding to each employee data in the employee data set at a preset time interval, and then respectively calculates the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set, and finally obtains a first preset threshold, and respectively performs attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain each first distance. The single attendance result to be stored corresponding to each distance is updated according to each of the single attendance results to be stored, so that the employee location data is automatically obtained at a preset time interval to calculate the attendance result without the need for employees to punch in at a fixed point. When an employee goes out privately after punching in and leaves the target electronic fence, the employee location data can be obtained next time to make an attendance judgment for the employee, thereby enabling attendance management for the private outing after punching in, thereby improving the accuracy of attendance management; and when the employee returns to the target electronic fence, the employee location data can also be obtained next time to make an attendance judgment for the employee, thereby avoiding the difficulty of using the make-up punching process to make an accurate make-up punching when the employee forgets to punch in, thereby improving the accuracy of attendance management. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1This is a flowchart of an employee attendance method based on artificial intelligence according to an embodiment of the present application;
[0056] Figure 2 This is a schematic block diagram of the structure of an employee attendance device based on artificial intelligence according to an embodiment of the present application;
[0057] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0060] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0061] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0062] Reference Figure 1 In an embodiment of the present application, an employee attendance method based on artificial intelligence is provided, and the method comprises:
[0063] S1: Acquire a target electronic fence, wherein the target electronic fence is an electronic fence generated by using an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning;
[0064] S2: Obtain an employee data set, and obtain employee location data corresponding to each employee data in the employee data set at a preset time interval;
[0065] S3: Calculate the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set;
[0066] S4: Obtain a first preset threshold, perform attendance judgment according to each first distance in the first distance set and the first preset threshold, and obtain a single attendance result to be stored corresponding to each first distance;
[0067] S5: updating the single attendance result library according to each single attendance result to be stored.
[0068] In this embodiment, a target electronic fence is first obtained, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning. Then, an employee data set is obtained, and employee location data corresponding to each employee data in the employee data set is respectively obtained at a preset time interval. Then, a distance between each employee location data and a boundary of the target electronic fence is respectively calculated to obtain a first distance set. Finally, a first preset threshold is obtained, and attendance judgment is performed according to each first distance in the first distance set and the first preset threshold to obtain a single attendance record to be stored corresponding to each first distance. As a result, the single attendance result library is updated according to each of the single attendance results to be stored, so that the employee location data is automatically obtained at preset time intervals to calculate the attendance result without the need for employees to punch in at a fixed point. When an employee goes out privately after punching in and leaves the target electronic fence, the employee's attendance can be judged at the next acquisition of the employee's location data, thereby enabling attendance management for private outings after punching in, thereby improving the accuracy of attendance management; and when the employee returns to the target electronic fence, the employee's attendance can also be judged at the next acquisition of the employee's location data, thereby avoiding the difficulty of using the make-up punching process to accurately make up the punching in when the employee forgets to punch in, thereby improving the accuracy of attendance management.
[0069] For S1, the target electronic fence can be obtained from a database or from a third-party application system.
[0070] The target geo-fence is also called geo-fence. Geo-fence is the boundary of the electronic map.
[0071] Optionally, the target electronic fence is an electronic fence of irregular shape.
[0072] Among them, the electronic fence generation model is a model obtained by training a machine learning model using multiple training samples.
[0073] For S2, the employee data set can be obtained from the database, the employee data set can be obtained from a third-party application system, and the employee data set input by the user can also be obtained.
[0074] The employee data set is a set of employee data of all employees at the office address corresponding to the target electronic fence. The employee data set includes one or more employee data. The employee data includes but is not limited to: employee name, employee ID and employee home address.
[0075] It is understandable that the employee location data can be obtained from the client of the mobile device, or can be actively sent by the client of the mobile device. Mobile devices include but are not limited to: mobile phones, tablet computers, smart wearable devices and work cards.
[0076] The employee location data includes: location data and location generation time, wherein the location generation time is the generation time of the location data.
[0077] Optionally, the preset time interval is set to 5 seconds.
[0078] The employee location data corresponding to each employee data in the employee data set is obtained at a preset time interval, that is, each employee data in the employee data set corresponds to one employee location data.
[0079] It can be understood that when there is employee data in the employee data set for which the corresponding employee location data cannot be obtained, a preset location acquisition failure flag can be obtained, and the preset location acquisition failure flag can be used as the employee location data corresponding to these employee data (that is, the employee data in the employee data set for which the employee location data cannot be obtained).
[0080] For S3, one employee location data is obtained from each employee location data, and the obtained employee location data is used as the employee location data to be calculated; the minimum distance between the employee location data to be calculated and the boundary of the target electronic fence is calculated to obtain the first distance corresponding to the employee location data to be calculated; the step of obtaining one employee location data from each employee location data and using the obtained employee location data as the employee location data to be calculated is repeated until the acquisition of the employee location data is completed; all the first distances are taken as the first distance set.
[0081] For S4, the first preset threshold may be obtained from a database, from a third-party application system, or written into a program for implementing the present application. The first preset threshold is a specific value.
[0082] Each first distance in the first distance set is compared and judged with the first preset threshold value respectively, a single attendance result of the first distance is determined according to the comparison and judgment result, and the single attendance result is used as the single attendance result to be stored.
[0083] For S5, each of the single attendance results to be stored is updated to the single attendance result library.
[0084] The single attendance result library includes one or more single attendance results, including but not limited to: employee name, employee ID, employee location data, location generation time, and attendance result.
[0085] In one embodiment, the step of obtaining the target electronic fence includes:
[0086] S111: Acquire an electronic fence generation signal, where the electronic fence generation signal carries a target office address;
[0087] S112: Responding to the electronic fence generation signal, obtaining a data set of employees participating in attendance according to the target office address;
[0088] S113: Acquire employee home addresses according to the employee data set participating in attendance, and obtain a set of employee home addresses to be processed;
[0089] S114: generating a vector for the employee home address set to be processed to obtain an address feature vector to be processed;
[0090] S115: Inputting the address feature vector to be processed into the electronic fence generation model to generate an electronic fence, thereby obtaining the target electronic fence.
[0091] This embodiment realizes responding to an electronic fence generation signal and generating an electronic fence according to a data set of employees participating in attendance, thereby improving the accuracy of attendance and reducing the attendance management of employee data not participating in attendance.
[0092] For S111, the electronic fence generation signal input by the user can be obtained, the electronic fence generation signal sent by a third-party application system can be obtained, or the electronic fence generation signal can be actively triggered by the program implementing the present application according to a preset trigger condition. For example, the preset trigger condition is 7 o'clock every morning, which is not specifically limited in this example.
[0093] The electronic fence generation signal is a signal for generating an electronic fence.
[0094] The target office address is a fixed office address.
[0095] For S112, a data set of employees participating in attendance is obtained according to the target office address.
[0096] The employee data set participating in attendance is a set of employee data of employees who need to participate in attendance of the target office address. The employee data set participating in attendance includes one or more employee data.
[0097] For S113, the employee home address is obtained from each employee data in the employee data set participating in attendance, and each of the obtained employee home addresses is used as the employee home address set to be processed.
[0098] For S114, an address coding dictionary is used to generate coding vectors for the employee home address set to be processed, and the generated coding vectors are used as the address feature vectors to be processed.
[0099] The address coding dictionary includes: address keywords, address codes, and each address keyword corresponds to an address code. Address keywords include but are not limited to: province, city, administrative district, county, street, and community.
[0100] Therein, a coding vector is generated for the set of employee home addresses to be processed, that is, each address in the set of employee home addresses to be processed is converted into an address code.
[0101] For S115, the address feature vector to be processed is input into the electronic fence generation model to generate an electronic fence, and the generated electronic fence is used as the target electronic fence.
[0102] In one embodiment, before the step of obtaining the target electronic fence, the method further includes:
[0103] S121: Acquire multiple training samples, where the training samples include: address sample feature vectors and electronic fence calibration values;
[0104] S122: Inputting the plurality of training samples into a machine learning model to generate an electronic fence, and obtaining an electronic fence prediction value corresponding to the training samples;
[0105] S123: determining a training target according to a difference between the electronic fence prediction value and the electronic fence calibration value;
[0106] S124: In the direction of minimizing the value of the training objective, adjust the model parameters of the machine learning model and continue training until the machine learning end condition is reached, and determine the machine learning model that reaches the machine learning end condition as the electronic fence generation model.
[0107] This embodiment uses multiple training samples to train the machine learning model to obtain the electronic fence generation model, which improves the accuracy of the generated electronic fence, thereby providing a basis for employee attendance based on the electronic fence.
[0108] For S121, the address sample feature vector is obtained by mapping each address sample data in the address sample data set into a vector element (that is, the address code), and combining the mapped vector elements to obtain the address sample feature vector. The address sample data set includes: employee home addresses and work address sets. The work address set includes: office addresses, addresses of service agencies that may need to be visited for work, and addresses of facilities on the employee's commuting routes. Service agencies include, but are not limited to, post offices, banks, graphic shops, and express delivery shops. Facilities on the employee's commuting routes include, but are not limited to, overpasses and parking lots.
[0109] The electronic fence calibration value is an electronic fence manually drawn around a set of work addresses.
[0110] For S122, each of the training samples is input into the machine learning model respectively; and an electronic fence prediction value is output for each of the training samples through the output layer of the machine learning model.
[0111] Wherein, the machine learning model can adopt a neural network.
[0112] For S123, the electronic fence prediction value and the electronic fence calibration value corresponding to each training sample are used as independent variables to generate a loss function; and each loss function is weightedly summed to obtain the training target.
[0113] The weight of the weighted sum of the loss functions is the weight data obtained by the user through calibration according to the training samples.
[0114] For S124, in order to optimize the direction of the training objective, the model parameters of the input layer, the intermediate hidden layer and the output layer of the machine learning model are adjusted, and the training is continued until the machine learning end condition is reached.
[0115] The model parameters of the input layer, the intermediate hidden layer and the output layer of the machine learning model are adjusted in a manner of minimizing the training objective, and the training is continued until the machine learning end condition is reached.
[0116] The training objective is a global training objective. Optimizing the global training objective is to minimize the loss function of all samples to obtain the global optimal solution.
[0117] The machine learning termination condition is that the loss value of the machine learning model reaches the first convergence condition or the number of iterations reaches the second convergence condition.
[0118] The first convergence condition refers to that the size of the loss value of the machine learning model calculated twice adjacently satisfies the Lipschitz condition (Lipschitz continuity condition).
[0119] The number of iterations refers to the number of times the machine learning model is used to calculate the electronic fence prediction value, that is, the number of iterations increases by 1 after each calculation.
[0120] The second convergence condition is a specific value.
[0121] In one embodiment, the step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance includes:
[0122] S41: when there is a first distance that is less than or equal to the first preset threshold, determining that the single attendance result to be stored corresponding to each first distance that is less than or equal to the first preset threshold is attendance;
[0123] S42: When there is a first distance greater than the first preset threshold, determine that the single attendance result to be stored corresponding to each first distance greater than the first preset threshold is absent.
[0124] This embodiment makes attendance judgment based on each first distance in the first distance set and the first preset threshold value, thereby realizing automatic attendance without the need for employees to clock in at a fixed location, and realizing real-time monitoring of employees' attendance.
[0125] For S41, when there is a first distance less than or equal to the first preset threshold, it means that the employees corresponding to each first distance less than or equal to the first preset threshold are already in the target electronic fence, and being in the target electronic fence means attendance. Therefore, the single attendance result to be stored corresponding to each first distance less than or equal to the first preset threshold is determined to be attendance.
[0126] For S42, when there is a first distance greater than the first preset threshold, it means that the employees corresponding to each first distance greater than the first preset threshold are not within the target electronic fence, and not being within the target electronic fence means absence from attendance. Therefore, the single attendance result to be stored corresponding to each first distance greater than the first preset threshold is determined to be absence from attendance.
[0127] In one embodiment, after the above step of updating the single attendance result library according to each of the single attendance results to be stored, the method further includes:
[0128] S61: Obtaining a preset attendance time range and a target attendance employee data set;
[0129] S62: acquiring a single attendance result from the single attendance result library according to the target attendance employee data set and the preset attendance time range, to obtain a single attendance result set to be calculated;
[0130] S63: when there is a single attendance result in the set of single attendance results to be calculated in which the attendance result is absent, taking each of the single attendance results in which the attendance result is absent as the set of single attendance results to be analyzed;
[0131] S64: sending the single attendance result set to be analyzed to the attendance audit terminal;
[0132] S65: Obtaining a location data audit result set sent by the attendance audit terminal according to the single attendance result set to be analyzed;
[0133] S66: updating the single attendance result database and the single attendance result set to be calculated according to the position data audit result set;
[0134] S67: Perform attendance calculation according to the single attendance result set to be calculated to obtain a comprehensive attendance result of the employee.
[0135] This embodiment is based on the single attendance result library and performs non-attendance data review and comprehensive attendance according to the preset attendance time range, thereby realizing comprehensive attendance according to the preset attendance time range based on the automatic and real-time single attendance results, thereby improving the accuracy of the comprehensive attendance data.
[0136] For S61, the preset attendance time range can be obtained from the database, the preset attendance time range input by the user, the preset attendance time range sent by a third-party application system, and the preset attendance time range can be written into the program implementing this application.
[0137] The preset attendance time range includes: attendance start time and attendance end time. For example, the preset attendance time range is 9:00 to 12:00, where 9:00 is the attendance start time and 12:00 is the attendance end time, which is not specifically limited in this example.
[0138] The target data set of employees participating in attendance can be obtained from a database, the target data set of employees participating in attendance input by a user can be obtained, and the target data set of employees participating in attendance sent by a third-party application system can also be obtained.
[0139] The target attendance employee data set is a set of employee data that needs to participate in attendance within the preset attendance time range.
[0140] For S62, from the single attendance result library, each single attendance result whose position generation time is within the preset attendance time range and whose employee ID is within the target attendance employee data set is used as the single attendance result set to be calculated. That is to say, each position generation time in the single attendance result set to be calculated is within the preset attendance time range, and each employee ID in the single attendance result set to be calculated is within the target attendance employee data set.
[0141] For S63, when there is a single attendance result with the attendance result of not attending in the single attendance result set to be calculated, it means that the single attendance result with the attendance result of not attending at this time has not been attended as required, so the single attendance results with the attendance result of not attending are taken as the single attendance result set to be analyzed.
[0142] For S64, the single attendance result set to be analyzed is sent to the attendance audit end through communication with the attendance audit end; the attendance audit end obtains the location data audit result input by the auditor according to the received single attendance result set to be analyzed.
[0143] The attendance audit end includes but is not limited to: an assessment audit system and an assessment audit module.
[0144] For S65, by communicating with the attendance audit terminal, a location data audit result set sent by the attendance audit terminal according to the single attendance result set to be analyzed is obtained.
[0145] The location data audit result set may include 0 location data audit results, 1 location data audit result, or multiple location data audit results. Location data audit result: employee identification, employee location data, location generation time, and audit result. The audit result includes a normal identification.
[0146] That is to say, the number of the single attendance results in the position data audit result set is less than or equal to the number of the single attendance results in the single attendance result set to be analyzed.
[0147] For S66, according to the single attendance result of the position data audit result set, the normal identification of the position data audit result set is updated to the position data audit result of the single attendance result library and the audit result of the single attendance result set to be calculated.
[0148] The single attendance result library includes: single attendance results and audit results, and each single attendance result corresponds to 1 audit result. The value in the audit result can be a null value or a non-null value.
[0149] For S67, according to the single attendance result set to be calculated, the attendance calculation is performed for each employee corresponding to the employee data in the target attendance employee data set to obtain a comprehensive attendance result of the employee.
[0150] The employee attendance comprehensive result includes: employee identification, preset attendance time range, normal attendance time range, non-attendance time range and attendance comprehensive result. The attendance comprehensive result includes: normal attendance and abnormal attendance.
[0151] In one embodiment, after the step of performing attendance calculation according to the single attendance result set to be calculated to obtain the comprehensive attendance result of the employee, the step further includes:
[0152] S71: Acquire each of the single attendance results corresponding to the audit results that are not empty from the single attendance result database as a corrected single attendance result set;
[0153] S72: updating the electronic fence generation model according to the corrected single attendance result set.
[0154] This embodiment realizes determining a corrected single attendance result set based on the location data audit result, and then using the corrected single attendance result set to update the electronic fence generation model, thereby improving the accuracy of the electronic fence generation model, thereby improving the accuracy of the attendance of this application.
[0155] For S71, from the single attendance result library, each of the single attendance results corresponding to the audit result that is not empty is obtained, and each of the obtained single attendance results is used as a corrected single attendance result set. In other words, although the attendance result of the corrected single attendance result set is no attendance, the employee's location data has been verified by the attendance audit terminal as normal.
[0156] For S72, the electronic fence generation model is retrained according to the corrected single attendance result set to update the electronic fence generation model.
[0157] That is to say, the location data of each employee in the corrected single attendance result set is used as the address of the service agency that may be required to work in the work address set, and the training samples are re-determined according to the updated work address set to retrain the electronic fence generation model.
[0158] In one embodiment, after the step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance, the step further includes:
[0159] S81: Obtain the current time and the preset late reminder time range, and determine whether the current time is within the preset late reminder time range;
[0160] S82: when the preset late reminder time range is within, obtaining the single attendance results to be stored of the absent person from each of the single attendance results to be stored, and obtaining a set of single attendance results to be judged;
[0161] S83: Obtain a peripheral electronic fence, and respectively calculate the distance between each employee location data in the single attendance result set to be determined and the boundary of the peripheral electronic fence to obtain a second distance set;
[0162] S84: Obtain a second preset threshold, and determine whether the second distance in the second distance set is less than or equal to the second preset threshold;
[0163] S85: when there is a second distance that is less than or equal to the second preset threshold, taking the single attendance results corresponding to each of the second distances that is less than or equal to the second preset threshold as a set of single attendance results to be reminded;
[0164] S86: Acquire the single attendance result from the set of single attendance results to be reminded as the single attendance result to be reminded;
[0165] S87: Calculate the shortest path between the employee location data of the single attendance result to be reminded and the boundary of the target electronic fence to obtain the remaining commuting distance;
[0166] S88: Obtain preset employee speed data, and calculate a remaining commuting time set according to the remaining commuting distance and the preset employee speed data;
[0167] S89: Generate commuting late prevention reminder information according to the employee location data, the remaining commuting distance and the remaining commuting time of the single attendance result to be reminded;
[0168] S810: Sending the commuting lateness prevention reminder information to the client corresponding to the single attendance result to be reminded.
[0169] This embodiment provides commuting delay prevention reminders based on a preset late reminder time range and a single attendance result to be stored, thereby facilitating employees to adjust their commuting speed in time to prevent being late, thereby improving user experience.
[0170] For S81, the world time of the server where the program implementing the present application is located is obtained as the current time.
[0171] The preset late reminder time range can be obtained from the database, the preset late reminder time range input by the user, the preset late reminder time range sent by a third-party application system, and the preset late reminder time range can be written into the program implementing this application.
[0172] The preset late reminder time range includes: a reminder start time and a reminder end time. For example, the preset late reminder time range is 8:20 to 8:58, where 8:20 is the reminder start time and 8:58 is the reminder end time, which is not specifically limited in this example.
[0173] Among them, when the current time is greater than or equal to the reminder start time, and the current time is less than or equal to the reminder end time, it is determined that the current time is within the preset late reminder time range, otherwise, it is determined that the current time is not within the preset late reminder time range.
[0174] For S82, when the current time is within the preset late reminder time range, the single attendance results to be stored whose attendance results are absent are obtained from each of the single attendance results to be stored, and each of the obtained single attendance results to be stored is used as the set of single attendance results to be judged.
[0175] For S83, the peripheral electronic fence can be obtained from the database or from a third-party application system.
[0176] The peripheral electronic fence is an electronic fence generated according to the target electronic fence, and the area of the peripheral electronic fence is larger than the area of the target electronic fence.
[0177] The minimum distance between each employee location data in the single attendance result set to be judged and the boundary of the peripheral electronic fence is calculated respectively, and each calculated minimum distance is used as the second distance set. In other words, the second distance in the second distance set is the minimum distance between the employee location data and the boundary of the peripheral electronic fence.
[0178] For S84, the second preset threshold may be obtained from a database, or may be input by a user, or may be sent by a third-party application system, or may be written into a program for implementing the present application. The second preset threshold is a specific value.
[0179] For S85, when there is a second distance less than or equal to the second preset threshold, the employees corresponding to the second distance less than or equal to the second preset threshold are not present and are already between the outer electronic fence and the target electronic fence. These employees need to be reminded to prevent commuting delays. Therefore, the single attendance results corresponding to each of the second distances less than or equal to the second preset threshold are used as a set of single attendance results to be reminded.
[0180] When the second distance is greater than the second preset threshold, the employee corresponding to the second distance greater than the second preset threshold will be late even if the commuting speed is adjusted because the distance is too far, so there is no need to provide a commuting delay prevention reminder.
[0181] For S86, a single attendance result is obtained from the set of single attendance results to be reminded, and the obtained single attendance result is used as the single attendance result to be reminded.
[0182] For S87, a path planning algorithm is used to perform path planning based on the employee location data of the single attendance result to be reminded and the target electronic fence to obtain a path set; the shortest path is found from the path set to obtain the shortest path; the length of the shortest path is used as the remaining commuting distance.
[0183] For S88, the preset employee speed data can be obtained from the database, the preset employee speed data sent by the third-party application system can be obtained, and the preset employee speed data can also be written into the program implementing the present application.
[0184] The preset employee speed data includes: commuting mode and commuting speed. Commuting mode includes but is not limited to: walking, cycling, riding a motorcycle, driving, and public transportation.
[0185] The remaining commuting distance is divided by each commuting speed in the preset employee speed data to obtain a remaining commuting time set.
[0186] The remaining commuting time set includes: commuting mode and remaining commuting time.
[0187] For S89, a preset reminder information generation template is used to generate commuting lateness prevention reminder information according to the employee location data, the remaining commuting distance and the remaining commuting time of the single attendance result to be reminded.
[0188] The commuting late prevention reminder information includes: the employee location data, the remaining commuting distance and the remaining commuting time set.
[0189] For S810, the commuting late prevention reminder information is sent to the client of the mobile device of the employee corresponding to the single attendance result to be reminded, thereby realizing the late prevention reminder for the employee.
[0190] Reference Figure 2 , the present application also proposes an employee attendance device based on artificial intelligence, the device comprising:
[0191] The data acquisition module 100 is used to acquire a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning;
[0192] An employee location data determination module 200 is used to obtain an employee data set, and obtain employee location data corresponding to each employee data in the employee data set at a preset time interval;
[0193] A first distance determination module 300 is used to respectively calculate the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set;
[0194] The single attendance result determination module 400 to be stored is used to obtain a first preset threshold, perform attendance judgment according to each first distance in the first distance set and the first preset threshold, and obtain a single attendance result to be stored corresponding to each first distance;
[0195] The single attendance result library updating module 500 is used to update the single attendance result library according to each single attendance result to be stored.
[0196] In this embodiment, a target electronic fence is first obtained, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning. Then, an employee data set is obtained, and employee location data corresponding to each employee data in the employee data set is respectively obtained at a preset time interval. Then, a distance between each employee location data and a boundary of the target electronic fence is respectively calculated to obtain a first distance set. Finally, a first preset threshold is obtained, and attendance judgment is performed according to each first distance in the first distance set and the first preset threshold to obtain a single attendance record to be stored corresponding to each first distance. As a result, the single attendance result library is updated according to each of the single attendance results to be stored, so that the employee location data is automatically obtained at preset time intervals to calculate the attendance result without the need for employees to punch in at a fixed point. When an employee goes out privately after punching in and leaves the target electronic fence, the employee's attendance can be judged at the next acquisition of the employee's location data, thereby enabling attendance management for private outings after punching in, thereby improving the accuracy of attendance management; and when the employee returns to the target electronic fence, the employee's attendance can also be judged at the next acquisition of the employee's location data, thereby avoiding the difficulty of using the make-up punching process to accurately make up the punching in when the employee forgets to punch in, thereby improving the accuracy of attendance management.
[0197] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as an employee attendance method based on artificial intelligence. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an employee attendance method based on artificial intelligence is implemented. The employee attendance method based on artificial intelligence includes: obtaining a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning; obtaining an employee data set, and using a preset time interval to respectively obtain employee location data corresponding to each employee data in the employee data set; respectively calculating the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set; obtaining a first preset threshold, and performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance; and updating a single attendance result library according to each single attendance result to be stored.
[0198] In this embodiment, a target electronic fence is first obtained, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning. Then, an employee data set is obtained, and employee location data corresponding to each employee data in the employee data set is respectively obtained at a preset time interval. Then, a distance between each employee location data and a boundary of the target electronic fence is respectively calculated to obtain a first distance set. Finally, a first preset threshold is obtained, and attendance judgment is performed according to each first distance in the first distance set and the first preset threshold to obtain a single attendance record to be stored corresponding to each first distance. As a result, the single attendance result library is updated according to each of the single attendance results to be stored, so that the employee location data is automatically obtained at preset time intervals to calculate the attendance result without the need for employees to punch in at a fixed point. When an employee goes out privately after punching in and leaves the target electronic fence, the employee's attendance can be judged at the next acquisition of the employee's location data, thereby enabling attendance management for private outings after punching in, thereby improving the accuracy of attendance management; and when the employee returns to the target electronic fence, the employee's attendance can also be judged at the next acquisition of the employee's location data, thereby avoiding the difficulty of using the make-up punching process to accurately make up the punching in when the employee forgets to punch in, thereby improving the accuracy of attendance management.
[0199] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, an employee attendance method based on artificial intelligence is implemented, comprising the steps of: obtaining a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning; obtaining an employee data set, and using a preset time interval to respectively obtain employee location data corresponding to each employee data in the employee data set; respectively calculating the distance between each employee location data and the boundary of the target electronic fence to obtain a first distance set; obtaining a first preset threshold, and performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance; and updating a single attendance result library according to each single attendance result to be stored.
[0200] The above-mentioned employee attendance method based on artificial intelligence is performed by first obtaining a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning. Then, an employee data set is obtained, and the employee location data corresponding to each employee data in the employee data set is obtained at a preset time interval. Then, the distance between each employee location data and the boundary of the target electronic fence is calculated to obtain a first distance set. Finally, a first preset threshold is obtained, and attendance judgment is performed according to each first distance in the first distance set and the first preset threshold to obtain the first distance corresponding to each first distance. The single attendance results to be stored are updated in the single attendance result library according to each of the single attendance results to be stored, so that the employee location data is automatically obtained at a preset time interval to calculate the attendance result without the need for the employee to punch in at a fixed point. When the employee goes out privately after punching in and leaves the target electronic fence, the employee location data can be obtained next time to make an attendance judgment for the employee, so that the attendance management can be carried out for the private outing after punching in, thereby improving the accuracy of attendance management; and when the employee returns to the target electronic fence, the employee location data can also be obtained next time to make an attendance judgment for the employee, thereby avoiding the difficulty of using the make-up punching process to make an accurate make-up punching when the employee forgets to punch in, thereby improving the accuracy of attendance management.
[0201] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0202] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0203] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An employee attendance method based on artificial intelligence, characterized in that: The method comprises: Obtaining a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, and the electronic fence generation model is a model obtained based on machine learning; Acquire an employee data set, and acquire employee location data corresponding to each employee data in the employee data set at a preset time interval; each employee data in the employee data set corresponds to one employee location data; Calculating the distance between each employee's location data and the boundary of the target electronic fence to obtain a first distance set; Obtaining a first preset threshold, performing attendance judgment based on each first distance in the first distance set and the first preset threshold, and obtaining a single attendance result to be stored corresponding to each first distance; Updating a single attendance result database according to each of the single attendance results to be stored; Before the step of obtaining the target electronic fence, the method further includes: Acquire multiple training samples, wherein the training samples include: address sample feature vectors and electronic fence calibration values; Inputting the plurality of training samples into a machine learning model to generate an electronic fence, and obtaining an electronic fence prediction value corresponding to the training samples; Determining a training target according to a difference between the electronic fence prediction value and the electronic fence calibration value; In the direction of minimizing the value of the training objective, adjusting the model parameters of the machine learning model and continuing the training until a machine learning termination condition is reached, and determining the machine learning model that reaches the machine learning termination condition as the electronic fence generation model; After the step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold value, and obtaining a single attendance result to be stored corresponding to each first distance, the method further includes: Obtain the current time and the preset late reminder time range, and determine whether the current time is within the preset late reminder time range; When the preset late reminder time range is reached, the single attendance results to be stored of the absent attendees are obtained from each of the single attendance results to be stored, to obtain a set of single attendance results to be judged; Obtaining a peripheral electronic fence, and respectively calculating the distance between each employee location data in the single attendance result set to be determined and the boundary of the peripheral electronic fence to obtain a second distance set; Obtaining a second preset threshold, and determining whether a second distance in the second distance set is less than or equal to the second preset threshold; When there is a second distance that is less than or equal to the second preset threshold, the single attendance result corresponding to each second distance that is less than or equal to the second preset threshold is used as a set of single attendance results to be reminded; Obtain the single attendance result from the set of single attendance results to be reminded as the single attendance result to be reminded; Calculating the shortest path between the employee location data of the single attendance result to be reminded and the boundary of the target electronic fence to obtain a remaining commuting distance; Obtaining preset employee speed data, and calculating a remaining commuting time set based on the remaining commuting distance and the preset employee speed data; Generate commuting lateness prevention reminder information based on the employee location data, the remaining commuting distance, and the remaining commuting time of the single attendance result to be reminded; The commuting late prevention reminder information is sent to the client corresponding to the single attendance result to be reminded.
2. The employee attendance method based on artificial intelligence according to claim 1 is characterized in that: The step of obtaining the target electronic fence includes: Obtaining an electronic fence generation signal, wherein the electronic fence generation signal carries a target office address; In response to the electronic fence generating signal, obtaining a data set of employees participating in attendance check and recording according to the target office address; Obtaining employee home addresses based on the employee attendance data set to obtain a set of employee home addresses to be processed; Performing vector generation on the employee home address set to be processed to obtain an address feature vector to be processed; The address feature vector to be processed is input into the electronic fence generation model to generate an electronic fence to obtain the target electronic fence.
3. The employee attendance method based on artificial intelligence according to claim 1 is characterized in that: The step of performing attendance judgment according to each first distance in the first distance set and the first preset threshold to obtain a single attendance result to be stored corresponding to each first distance includes: When there is a first distance that is less than or equal to the first preset threshold, determining that the single attendance result to be stored corresponding to each first distance that is less than or equal to the first preset threshold is attendance; When there is a first distance greater than the first preset threshold, the single attendance result to be stored corresponding to each first distance greater than the first preset threshold is determined to be absent.
4. The employee attendance method based on artificial intelligence according to claim 1 is characterized in that: After the step of updating the single attendance result library according to each of the single attendance results to be stored, the method further includes: Get the preset attendance time range and target attendance employee data set; Obtaining a single attendance result from the single attendance result database according to the target attendance employee data set and the preset attendance time range, to obtain a single attendance result set to be calculated; When the attendance result of the single attendance result to be calculated exists in the set of single attendance results that is absent, each of the single attendance results that is absent is used as the set of single attendance results to be analyzed; Sending the single attendance result set to be analyzed to the attendance audit terminal; Obtaining a location data audit result set sent by the attendance audit terminal according to the single attendance result set to be analyzed; updating the single attendance result database and the single attendance result set to be calculated according to the position data audit result set; Attendance calculation is performed based on the set of single attendance results to be calculated to obtain a comprehensive employee attendance result.
5. The employee attendance method based on artificial intelligence according to claim 4 is characterized in that: After the step of performing attendance calculation based on the set of single attendance results to be calculated to obtain a comprehensive employee attendance result, the method further includes: Obtaining each of the single attendance results corresponding to the audit results that are not empty from the single attendance result database as a corrected single attendance result set; The electronic fence generation model is updated according to the corrected single attendance result set.
6. An employee attendance device based on artificial intelligence, applied to any of the above methods, characterized in that: The device comprises: a data acquisition module, configured to acquire a target electronic fence, wherein the target electronic fence is an electronic fence generated by an electronic fence generation model, wherein the electronic fence generation model is a model obtained based on machine learning; An employee location data determination module is used to obtain an employee data set and obtain employee location data corresponding to each employee data in the employee data set at a preset time interval; A first distance determination module is configured to respectively calculate the distance between each employee's location data and the boundary of the target electronic fence to obtain a first distance set; A module for determining a single attendance result to be stored, configured to obtain a first preset threshold value, perform attendance judgment based on each first distance in the first distance set and the first preset threshold value, and obtain a single attendance result to be stored corresponding to each first distance; The single attendance result library updating module is used to update the single attendance result library according to each of the single attendance results to be stored.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
