Attendance statistics method and device, computing equipment and computer readable storage medium

By acquiring the attendance data of target users and combining it with national calendars and shift schedules, the problem of traditional attendance statistics methods being unable to adapt to differences in different countries and positions has been solved, achieving efficient and flexible attendance management and accurate calculation of working hours.

CN121745868APending Publication Date: 2026-03-27ZHONGKE YUNGU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Traditional attendance tracking methods cannot manage personnel from different countries in a unified manner, lack flexibility and scalability, have low calculation efficiency, and cannot adapt to differences between positions and roles.

Method used

By acquiring the attendance data of target users, and combining it with their country and position, target attendance groups are determined, including national calendars and shifts. Attendance statistics are then compiled based on this information, and work hours and other attendance details are calculated.

Benefits of technology

It enables unified attendance management for personnel from different countries, improves the efficiency and flexibility of attendance calculation, and ensures the accuracy of working hours calculation and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745868A_ABST
    Figure CN121745868A_ABST
Patent Text Reader

Abstract

The invention discloses an attendance statistical method and device, computing equipment and a computer readable storage medium. The method comprises the following steps: acquiring attendance data of a target user in a preset attendance date range; determining a target attendance group where the target user is located according to the country and post where the target user is located; the target attendance group comprises a national calendar and shifts used for describing attendance task time rules; and counting the attendance checking condition of the target user in the preset attendance checking date range based on the attendance checking data, the national calendar and the shift to obtain an attendance checking statistical result. Therefore, attendance management can be carried out on personnel of different countries in a unified manner, the calculation efficiency, flexibility and expansibility of the attendance condition are improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of attendance technology, and in particular to an attendance statistics method, apparatus, computing device, and computer-readable storage medium. Background Technology

[0002] Traditional work hour statistics are typically limited to a single country and only use fixed statutory holidays. Furthermore, they fail to consider differences between job positions and roles, and fix work cycles and attendance personnel. Therefore, existing attendance statistics methods suffer from problems such as inability to manage attendance for personnel from different countries, poor flexibility and scalability, and low computational efficiency. Summary of the Invention

[0003] The purpose of this application is to provide an attendance statistics method, device, computing equipment, and computer-readable storage medium that enables unified attendance management for personnel from different countries, improves the calculation efficiency, flexibility, and scalability of attendance data, and enhances the user experience.

[0004] To achieve the above objectives:

[0005] In a first aspect, embodiments of this application provide an attendance statistics method, including:

[0006] Obtain attendance data of the target user within a preset attendance date range;

[0007] Based on the target user's country and job position, determine the target attendance group to which the target user belongs; the target attendance group includes a national calendar and shifts used to describe the time rules for attendance tasks;

[0008] Based on the attendance data, the national calendar, and the shift schedule, the attendance of the target user within the preset attendance date range is statistically analyzed to obtain attendance statistics results.

[0009] Optionally, determining the target attendance group to which the target user belongs based on the target user's country and position includes:

[0010] Based on the target user's country and job position, obtain the candidate attendance group to which the target user belongs;

[0011] Based on the time zone of the target user, a target attendance group is determined from the candidate attendance groups; wherein, different candidate attendance groups correspond to different time zones.

[0012] Optionally, the attendance statistics result includes working hours; the step of statistically analyzing the attendance of the target user within the preset attendance date range based on the attendance data, the national calendar, and the shift to obtain the attendance statistics result includes:

[0013] Based on the attendance data, determine at least one attendance-pending day included in the preset attendance date range;

[0014] Based on the attendance data, the national calendar, and the shift schedule, the working hours of the target user on each of the days to be checked are determined;

[0015] Based on the working hours of each of the days to be checked, the working hours of the target user within the preset attendance date range are calculated.

[0016] Optionally, determining the target user's working hours on each of the days pending attendance based on the attendance data, the national calendar, and the shift schedule includes:

[0017] Obtain the attendance configuration information bound to the national calendar;

[0018] Based on the attendance data, the national calendar, the shift schedule, and the attendance configuration information, the working hours of the target user on each of the days to be checked are determined.

[0019] Optionally, the attendance configuration information includes leave duration calculation rules, date types for different dates, and work duration calculation rules for different date types; determining the target user's work duration on each pending attendance day based on the attendance data, the national calendar, the shift schedule, and the attendance configuration information includes:

[0020] The date type of the target attendance day is determined based on the national calendar and the date types of different dates; the target attendance day can be any attendance day.

[0021] If the date type of the target attendance day is a workday or a day off in lieu, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, the working hours calculation rules for workday type dates, and the leave calculation rules.

[0022] If the date type of the target attendance day is a non-working day, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, and the working hours calculation rules for the non-working day type date.

[0023] Optionally, the shift includes the attendance start time and attendance end time for each pending attendance day, and the attendance data includes at least one clock-in start time and at least one clock-in end time for each pending attendance day.

[0024] Optionally, determining the target user's working hours on the target attendance day based on the attendance data, the shift, the working hours calculation rules for the workday type, and the leave duration calculation rules includes:

[0025] Based on at least one clock-in start time and at least one clock-in end time of the target user on the target attendance day, as well as the attendance start time and the attendance end time, determine the first clock-in start time and the first clock-in end time corresponding to the target user when working on the target attendance day, and the second clock-in start time and the second clock-in end time corresponding to the target user when taking leave on the target attendance day;

[0026] Based on the second check-in start time and the second check-in end time, as well as the leave duration calculation rules, the leave duration of the target user on the target attendance day is determined.

[0027] Based on the first check-in start time and the first check-in end time, determine the check-in duration of the target user on the target attendance day;

[0028] Based on the duration of the check-in and the duration of the leave request, the working hours of the target user on the target attendance day are determined.

[0029] Secondly, embodiments of this application provide an attendance statistics device, comprising:

[0030] The acquisition module is used to acquire the attendance data of the target user within a preset attendance date range;

[0031] The determination module is used to determine the target attendance group to which the target user belongs based on the target user's country and job position; the target attendance group includes a national calendar and shifts that describe the time rules for attendance tasks;

[0032] The statistics module is used to perform statistics on the attendance of the target user within the preset attendance date range based on the attendance data, the national calendar, and the shift, and to obtain attendance statistics results.

[0033] Thirdly, embodiments of this application provide a computing device, including: a processor and a memory storing a computer program, wherein when the processor runs the computer program, the above-mentioned attendance statistics method is implemented.

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described attendance statistics method.

[0035] The attendance statistics method, apparatus, computing device, and computer-readable storage medium provided in this application embodiment include: acquiring attendance data of a target user within a preset attendance date range; determining a target attendance group for the target user based on the target user's country and position; the target attendance group includes a national calendar and shifts describing attendance task time rules; and statistically analyzing the target user's attendance within the preset attendance date range based on the attendance data, the national calendar, and the shifts to obtain attendance statistics results. Thus, by acquiring the target user's attendance data within the preset attendance date range, along with the corresponding national calendar and shifts, and statistically analyzing the target user's attendance within the preset attendance date range, unified attendance management for personnel from different countries can be achieved, improving the calculation efficiency, flexibility, and scalability of attendance statistics, and enhancing the user experience. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the attendance statistics method provided in an embodiment of the present invention.

[0037] Figure 2 This is a schematic diagram of the attendance statistics device provided in an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram of the implementation architecture of the attendance statistics system provided in an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram illustrating the specific process of the attendance statistics method provided in this embodiment of the invention;

[0040] Figure 5 This is a schematic diagram of the composition of the attendance group in an embodiment of the present invention;

[0041] Figure 6 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present invention. Detailed Implementation

[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0043] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0044] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, can be interpreted as "when," "when," or "in response to determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising," "including," indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" as used herein are to be interpreted as inclusive, or mean any one or any combination thereof. Therefore, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A, B, and C". Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0045] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0046] It should be noted that step designations such as S101 and S102 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. In specific implementation, those skilled in the art may execute S102 first and then S101, etc., but these should all be within the protection scope of this application.

[0047] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0048] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0049] See Figure 1 This application provides an attendance statistics method, which can be executed by an attendance statistics device provided in this application. The attendance statistics device can be implemented using software and / or hardware, such as a computer or server. In this embodiment, a computer is used as the executing entity for the attendance statistics method. The attendance statistics method provided in this embodiment includes:

[0050] Step S101: Obtain the attendance data of the target user within the preset attendance date range.

[0051] Optionally, the target user can be any user whose working hours need to be tracked, specifically employees within a company or enterprise. The preset attendance date range indicates the date range for which working hours need to be tracked; this can be a single day or multiple days, such as a week or a month. Attendance data can include the target user's clock-in / clock-out data on the attendance application or device, specifically including clock-in and clock-out times. Additionally, attendance data can include leave data, specifically including leave start and end times. It should be noted that if the target user takes a short leave during work hours, the attendance data can also include the clock-in / clock-out times at the start and end of the leave.

[0052] Step S102: Determine the target attendance group for the target user based on the target user's country and position.

[0053] Each attendance group may include the country, national calendar, job position, and shifts that describe the time rules for attendance tasks.

[0054] It is understandable that, since different users of the same company or enterprise may be located in different countries and may hold different positions, the target attendance group can be determined based on the preset correspondence between different countries, different positions, and different attendance groups, according to the target user's country and position. The position can be used to indicate the user's specific job responsibilities, such as R&D engineer, after-sales service engineer, etc. To facilitate unified attendance management, this embodiment adds personnel belonging to the same country and the same position to the same attendance group.

[0055] Furthermore, since each attendance group manages personnel who may belong to the same country and hold the same position, or even those from the same country, time zone, and holding the same position, a corresponding national calendar and shifts describing the time rules for attendance tasks can be defined for each attendance group. The national calendar indicates the number of days in a year and month for that country, as well as information such as workdays and holidays. Specifically, it can include a list of countries, years, dates, and workday schedules (Monday to Sunday). Shifts can indicate the dates when normal work is required, as well as the start and end times for daily attendance. In addition, shifts can include shifts on weekdays and shifts on non-working days (i.e., holidays).

[0056] In one implementation, the target attendance group for the target user is determined based on the target user's country and job position, including:

[0057] Based on the target user's country and job position, obtain the candidate attendance group to which the target user belongs;

[0058] The target attendance group is determined from the candidate attendance groups based on the time zone of the target user; different candidate attendance groups correspond to different time zones.

[0059] It's understandable that different regions within the same country may have different time zones, and these time zone differences affect get off work schedules. Therefore, different users in different regions of the same country may have different daily start and end times for attendance. For example, the eastern part of a country might be in the UTC+4 time zone, with a start time of 7:00 AM, while the western part might be in the UTC+8 time zone, with a start time of 8:00 AM, and so on. Based on this, after obtaining candidate attendance groups for target users according to their country and job position, it's necessary to further consider their time zone to determine the target attendance group from the candidate groups. This allows for unified attendance management for personnel within the same country but located in different time zones. In this way, by determining the corresponding attendance group based on the country and time zone, attendance data from different countries and time zones can be processed automatically, avoiding errors caused by manually adjusting the time zone. At the same time, the corresponding attendance time can be automatically determined according to the attendance group, ensuring the accuracy of global working hours calculation and avoiding errors in subsequent working hours calculation due to time zone errors.

[0060] Step S103: Based on attendance data, national calendar, and shift, statistically analyze the attendance of target users within the preset attendance date range to obtain attendance statistics results.

[0061] Understandably, since the corresponding attendance calculation rules can be obtained based on the national calendar and shift schedule, attendance data can be combined to statistically analyze the attendance of target users within a preset attendance date range, thus obtaining attendance statistics. These statistics can include information such as the target user's working hours, leave duration, and overtime hours within the preset attendance date range.

[0062] In one implementation, attendance statistics are obtained by statistically analyzing the attendance of target users within a preset attendance date range based on attendance data, national calendar, and shift schedule, including:

[0063] Based on attendance data, determine at least one day to be recorded within the preset attendance date range;

[0064] Based on attendance data, national calendar, and shift schedule, determine the working hours of the target user on each day to be checked in;

[0065] Based on the working hours of each pending attendance day, calculate the total working hours of the target user within the preset attendance date range.

[0066] The "pending attendance day" refers to the date on which attendance data indicates a clock-in activity (i.e., the start and end time of clock-in). It's understandable that, since it's necessary to calculate the target user's working hours within the preset attendance date range, it's only necessary to calculate the target user's working hours on the dates with clock-in activity, i.e., the pending attendance days. Furthermore, since the national calendar can determine whether each pending attendance day is a workday, and shift assignments can indicate whether the target user clocked in on time on each pending attendance day, the working hours of the target user on each pending attendance day can be determined based on attendance data, the national calendar, and shift assignments. After knowing the target user's working hours on each pending attendance day, the total working hours of the target user within the preset attendance date range can be calculated, thus obtaining the corresponding attendance statistics.

[0067] In one implementation, based on attendance data, the national calendar, and shift schedule, the working hours of the target user on each day pending attendance are determined, including:

[0068] Retrieve attendance configuration information linked to the national calendar;

[0069] Based on attendance data, national calendar, shift schedule, and attendance configuration information, determine the working hours of the target user on each day to be checked.

[0070] The attendance configuration information may include rules for calculating leave duration and working hours. The leave duration calculation rules mainly include how to accurately calculate leave duration. For example, if the minimum leave duration is set to two hours, any leave duration less than two hours is rounded up to the nearest two hours as the actual leave duration. For instance, in a 24-hour clock, if a user selects 08:30 as the leave start time and 12:00 as the leave end time, the calculated leave duration will be four hours. The working hours calculation rules for holidays may include whether the holiday is included in working hours. Taking China as an example, if the administrator sets attendance configurations named "May Day" and "Adjusted Workday," where May Day is not included in working hours but adjusted workdays are, then if the user's calculated attendance time range spans May Day, the actual working hours will not include May Day. Conversely, if the user's calculated attendance time range spans adjusted workdays, the actual working hours will include the adjusted workdays. It should be noted that the attendance configuration information can be set according to the actual needs of the national calendar. For example, if a non-working day needs to be worked as usual due to the adjustment of holidays, the non-working day can be marked as a day off in lieu of holidays through the national calendar, and the attendance configuration for the day off in lieu of holidays can be set accordingly.

[0071] It's understandable that target users might need to take short breaks or adjust their schedules during the designated attendance days, such as taking half an hour or an hour off. Therefore, it's necessary to combine attendance configuration information to accurately determine the target user's working hours on each designated attendance day. For example, assuming the attendance data includes a target user's clock-in data for Saturday, if the attendance configuration information for that Saturday in the national calendar is used to determine if it counts as working hours, then the target user's working hours on Saturday will be included in the calculation. In this way, by combining the national calendar and attendance configuration, the efficiency and flexibility of working hour calculation are further improved, while ensuring the accuracy of attendance settings.

[0072] In one embodiment, the attendance configuration information includes leave duration calculation rules, date types for different dates, and work duration calculation rules for different date types; based on attendance data, national calendar, shifts, and attendance configuration information, the work duration of the target user on each pending attendance day is determined, including:

[0073] The date type of the target attendance day is determined based on the national calendar and the date type of different dates; the target attendance day can be any attendance day.

[0074] If the date type of the target attendance day is a workday or a day off in lieu, then the working hours of the target user on the target attendance day are determined according to the attendance data, shift, working hours calculation rules for workday type dates, and the leave duration calculation rules.

[0075] If the target attendance day is a non-working day, the target user's working hours on the target attendance day are determined based on attendance data, shift, and the working hours calculation rules for non-working day types.

[0076] Understandably, based on actual needs, users can configure attendance information. This configuration allows setting the date type for each day in the national calendar, which can include weekdays, non-working days (including holidays), and adjusted workdays. Therefore, the date type of the target attendance day can be determined based on the national calendar and the date type of different days. When the target attendance day's date type is a weekday or adjusted workday, it indicates that the target user's working hours on that day need to be calculated. The working hours for the target user on the target attendance day are then determined based on attendance data, shift schedules, and the working hours calculation rules for weekday types and leave calculation rules. When the target attendance day's date type is a non-working day, it can first be determined whether the working hours for that target attendance day need to be calculated based on the working hours calculation rules for non-working day types. Once it is determined that the working hours for that target attendance day need to be calculated, the working hours for the target user on the target attendance day are determined based on attendance data, shift schedules, and the working hours calculation rules for non-working day types.

[0077] The shifts include the start and end times of attendance for each pending attendance day, and the attendance data includes at least one clock-in start time and at least one clock-in end time for each pending attendance day. It can be understood that based on the start and end times of attendance for each pending attendance day, as well as the at least one clock-in start and end time for each pending attendance day, information such as whether the target user clocked in on time and whether they requested leave can be obtained. Combining this information, the working hours of the target user on the target pending attendance day can be calculated.

[0078] In one implementation, the working hours of a target user on a target pending attendance day are determined based on attendance data, shift schedule, working day type date working hours calculation rules, and the leave duration calculation rules, including:

[0079] Based on the target user's at least one clock-in start time and at least one clock-in end time on the target pending attendance day, as well as the attendance start time and attendance end time, determine the first clock-in start time and the first clock-in end time corresponding to the target user when working on the target pending attendance day, and the second clock-in start time and the second clock-in end time corresponding to the target user when taking leave on the target pending attendance day;

[0080] Based on the start and end times of the second check-in and the rules for calculating leave duration, determine the leave duration for the target user on the target day of attendance.

[0081] Based on the first check-in start time and the first check-in end time, determine the duration of check-in for the target user on the target pending attendance day;

[0082] Based on the duration of check-in and leave, determine the working hours of the target user on the target day to be checked in.

[0083] In this embodiment, we take an example where there is only one attendance start time and one attendance end time on the same attendance day, and the target user has a temporary short leave in the middle. It can be understood that based on the target user's attendance data on the target pending attendance day, at least one check-in start time and at least one check-in end time can be determined for the target user on the target pending attendance day. Furthermore, based on the target user's shift on the target pending attendance day, the attendance start time and attendance end time can be determined for the target user on the target pending attendance day. Where the earliest check-in start time for the target user on the target pending attendance day is earlier than the attendance start time, the earliest check-in start time can be used as the first check-in start time corresponding to the target user's work on the target pending attendance day, or the attendance start time can be used as the first check-in start time corresponding to the target user's work on the target pending attendance day. Similarly, when the latest clock-in end time of a target user on the target pending attendance day is later than the attendance end time, if overtime hours can be counted towards working hours, then the latest clock-in end time can be used as the first clock-in end time for the target user on the target pending attendance day. Alternatively, if overtime hours are not counted towards working hours, then the attendance end time can be used as the first clock-in end time for the target user on the target pending attendance day. Furthermore, the duration of the target user's clock-in activity on the target pending attendance day can be determined based on the first clock-in start time and the first clock-in end time. Since target users typically need to clock in and out at the beginning and end of a short-term leave during the target attendance period, the second clock-in start time and second clock-out end time for the target user on the target attendance period can be determined based on at least one clock-in start time and at least one clock-in end time. Then, based on the second clock-in start time, second clock-out end time, and the leave duration calculation rules, the leave duration for the target user on the target attendance period can be determined. After determining the clock-in duration and leave duration, the difference between the clock-in duration and the leave duration can be defined as the target user's working hours on the target attendance period.

[0084] It should be noted that, when overtime hours are not included in working hours and the attendance times for the first and last days within the preset attendance period are different from other days, the working hours of a target user within the preset attendance period can be calculated by first summing the working hours for the first and last days, then summing the working hours for all other days within the preset attendance period, and finally calculating the total working hours for the target user within the preset attendance period based on both sums. This allows for quick and accurate calculation of a user's working hours on each pending attendance day, improving the accuracy of working hour calculations.

[0085] In summary, the attendance statistics method provided in the above embodiments, after obtaining the attendance data of the target user within the preset attendance date range, as well as the corresponding national calendar and shift, performs statistics on the attendance of the target user within the preset attendance date range. This enables unified attendance management for personnel from different countries, improves the calculation efficiency, flexibility, and scalability of attendance data, and enhances the user experience.

[0086] Based on the same inventive concept as the foregoing embodiments, this application provides an attendance statistics device, such as... Figure 2 As shown, it includes:

[0087] The acquisition module is used to acquire the attendance data of the target user within a preset attendance date range;

[0088] The determination module is used to determine the target attendance group for the target user based on the target user's country and job position; the target attendance group includes the country calendar and the shift that describes the time rules for attendance tasks;

[0089] The statistics module is used to statistically analyze the attendance of target users within a preset attendance date range based on attendance data, national calendar, and shift schedule, and obtain attendance statistics results.

[0090] In one implementation, the determining module is specifically used for:

[0091] Based on the target user's country and job position, obtain the candidate attendance group to which the target user belongs;

[0092] The target attendance group is determined from the candidate attendance groups based on the time zone of the target user; different candidate attendance groups correspond to different time zones.

[0093] In one implementation, the attendance statistics results include working hours; the statistics module is specifically used for:

[0094] Based on the attendance data, determine at least one attendance-pending day included in the preset attendance date range;

[0095] Based on the attendance data, the national calendar, and the shift schedule, the working hours of the target user on each of the days to be checked are determined;

[0096] Based on the working hours of each of the days to be checked, the working hours of the target user within the preset attendance date range are calculated.

[0097] In one implementation, the statistics module is specifically used for:

[0098] Obtain the attendance configuration information bound to the national calendar;

[0099] Based on the attendance data, the national calendar, the shift schedule, and the attendance configuration information, the working hours of the target user on each of the days to be checked are determined.

[0100] In one embodiment, the attendance configuration information includes leave duration calculation rules, different date types, and work duration calculation rules for different date types; the statistics module is specifically used for:

[0101] The type of the target attendance day is determined based on the national calendar and the date types of different dates; the target attendance day can be any attendance day.

[0102] If the date type of the target attendance day is a workday or a day off in lieu, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, the working hours calculation rules for workday type dates, and the leave calculation rules.

[0103] If the date type of the target attendance day is a non-working day, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, and the working hours calculation rules for the non-working day type date.

[0104] In one embodiment, the shift includes the attendance start time and attendance end time for each pending attendance day, and the attendance data includes at least one clock-in start time and at least one clock-in end time for each pending attendance day.

[0105] In one implementation, the statistics module is specifically used for:

[0106] Based on at least one clock-in start time and at least one clock-in end time of the target user on the target attendance day, as well as the attendance start time and the attendance end time, determine the first clock-in start time and the first clock-in end time corresponding to the target user when working on the target attendance day, and the second clock-in start time and the second clock-in end time corresponding to the target user when taking leave on the target attendance day;

[0107] Based on the second check-in start time and the second check-in end time, as well as the leave duration calculation rules, the leave duration of the target user on the target attendance day is determined.

[0108] Based on the first check-in start time and the first check-in end time, determine the check-in duration of the target user on the target attendance day;

[0109] Based on the duration of the check-in and the duration of the leave request, the working hours of the target user on the target attendance day are determined.

[0110] In summary, the attendance statistics device provided in the above embodiments, after obtaining the attendance data of the target user within the preset attendance date range, as well as the corresponding national calendar and shift, performs statistics on the attendance of the target user within the preset attendance date range. This enables unified attendance management for personnel from different countries, improves the calculation efficiency, flexibility, and scalability of attendance data, and enhances the user experience.

[0111] Based on the same inventive concept as the foregoing embodiments, the foregoing embodiments will be described in detail below through a specific example. In this example, attendance statistics are used to calculate working hours and attendance configuration information is used to configure holidays.

[0112] This embodiment proposes an attendance statistics system to implement the attendance statistics method provided in this embodiment, such as... Figure 3 As shown, this attendance statistics system mainly includes the following modules: basic framework module, attendance personnel module, data collection module, and functional module. Among them,

[0113] 1. Basic framework module, with the following functions:

[0114] 1) Shift Setup: To meet global deployment requirements, shifts need to be set up at the country level. The necessary attributes for shifts in the method for calculating working hours include: shift type, start and end times, and country. The shift type uniformly adopts a fixed shift system, ensuring consistent start and end times for each employee within the attendance group using that shift. The attendance group for the corresponding country only needs to schedule that shift daily from Monday to Sunday. Start and end times define the range of working hours, determining the start and end times of the shift.

[0115] 2) Attendance Group Equipment: Attendance groups are structured around a combination of country and job type. Essential attributes for an attendance group include: country, job type, list of attendance personnel, unified shifts, shift list (length 7 represents Monday to Sunday), and special day shift setting list. The country determines the attendance group's affiliation; the job type differentiates attendance personnel, narrowing the impact of settings changes and achieving one group per job; the attendance personnel list binds the employee-attendance group relationship; the unified shifts bind the shift-attendance group relationship; and the shift list dynamically synchronizes weekday and rest day data on a weekly basis when setting the country calendar. The special day shift setting list is used to set special workday shifts, special restday shifts, and special holiday shifts, used when dynamically selecting special dates to synchronize special days when setting the country calendar.

[0116] 3) National Calendar Settings: Essential attributes of the national calendar include: country, year, date list, workday setting list (Monday to Sunday), and attendance group list. The country sets the tone for the calendar and subsequent configurations, and is also the filtering condition for binding relationships at each stage. Since some holidays are not fixed each year, the year is needed for control. The date list represents every weekday of the year, and each weekday can be set as a workday, rest day, or holiday. The workday setting list focuses on the weekly dimension; by arbitrarily selecting Monday to Sunday as workdays, it will be mapped to the entire calendar, and the selection will be synchronized to the attendance group's shift list. The selected portion will be uniformly assigned to the corresponding national shifts, while the unselected portion will represent rest days, using rest shifts by default. The attendance group list represents the attendance groups bound to this calendar. When setting holidays, rest days, and special workdays (time off in lieu), these dates will be synchronized to the attendance group's special shift list. Holidays and rest days default to rest shifts, while special workdays default to uniform shifts.

[0117] 4) Holiday Settings: Essential attributes for holiday settings include: holiday type, holiday name, requesting unit, minimum leave duration, and whether it is counted towards leave. The holiday type determines whether the holiday is a statutory or private holiday; the holiday name is the holiday's designation; the leave unit is mainly divided into hours and days; the minimum leave duration refers to the shortest time unit an employee can request when applying for leave. This time unit is usually set according to company policy or labor regulations and can be half a day, one hour, etc. The purpose of setting a minimum leave duration is to facilitate management while ensuring the fairness and reasonableness of the leave system. For example, if the minimum leave duration is one hour, then any leave less than one hour will be converted to one hour. This calculation strategy can prevent frequent short-term leave from disrupting work arrangements. In global working hours calculation algorithms, the minimum leave duration may vary according to the labor regulations of different countries or regions to adapt to local legal and cultural requirements. Whether it is counted towards leave is usually used for statutory holidays. If leave is requested or attendance is recorded on statutory holidays, it is not counted by default and requires manual intervention.

[0118] 2. Attendance personnel module

[0119] Attendance personnel are added to attendance groups by their respective country's administrators based on their job positions, and clock in and out through the Lark application.

[0120] 3. Data Collection Module

[0121] The attendance data of the staff is collected into the database on a daily scheduled basis.

[0122] 4. Functional modules, with the following functions:

[0123] 1) Leave and Outing Statistics: Employees use the leave and outing functions to set start and end times. The actual working hours within these ranges are calculated and used as leave / outing time, which is then used in downstream processes such as deduction of leave allowance. Accurate calculation of leave duration ensures that employee leave allowance deductions perfectly correspond to the actual leave time, avoiding over- or under-deductions and guaranteeing fairness. Preventing Errors: Inaccurate calculations may lead to incorrect deductions of employee leave allowances, affecting employee rights and job satisfaction. Accurate calculations prevent this from happening.

[0124] 2) Daily Working Hours Calculation: Actual working hours are calculated within the employee's daily clock-in and clock-out timeframes to determine weekly working hours. Working hour regulations may vary across different countries and regions; weekly hourly calculations ensure employee work hours comply with local labor laws and regulations, avoiding legal risks arising from overtime or insufficient working hours. Furthermore, monitoring working hours helps management better understand employee workloads, allocate tasks appropriately, and ensure optimal utilization of team resources. Weekly hourly calculations also form the basis for payroll and overtime pay, especially in situations where hourly wages are paid or overtime is required. The data can also serve as a reference for assessing employee engagement and output, helping management make fairer performance evaluations.

[0125] See Figure 4 The working time calculation process in this embodiment includes:

[0126] 1) Obtain the start time of check-in (or the start time of leave request) and the end time of check-in (or the end time of leave request).

[0127] 2) Obtain the user's attendance group based on country and position.

[0128] 3) Obtain the country calendar, linked shifts, and holiday configuration information based on the user's attendance group.

[0129] 4) Obtain the date data set within the time range from the start time to the end time in the national calendar, the start and end times of the shift, and the leave application unit and minimum leave duration in the holiday configuration.

[0130] 5) Determine whether the start time and end time belong to the same day.

[0131] 6) If the start time and end time are on the same day, calculate the working hours for that day.

[0132] The process first determines whether the day is a workday. If it is, the difference between the clock-in end time and clock-in start time is used as the calculated working time, which is then rounded up to obtain the total working hours for that day. For leave duration calculation, it can be converted to hours or days depending on the leave unit. If it is not a workday, the working hours for that day are determined to be zero if rest days are set not to be included in the time calculation or if the holiday configuration is set to exclude them from the time calculation. Otherwise, the difference between the clock-in end time and clock-in start time is used as the calculated working time, which is then rounded up to obtain the total working hours for that day.

[0133] 7) When the start time and end time are not on the same day, calculate the total duration of the first and last dates and the total duration of the middle date respectively, and determine the working time from the start time to the end time.

[0134] For the first and last dates, first determine if they are working days, and then calculate the corresponding working hours according to the above method to obtain the total working hours for the first and last dates. For working days in the middle dates, count the number of working days, then calculate the working hours for a day based on the attendance start and end times, and then use the product of the number of working days and the working hours for a day as the working day's duration. For non-working days in the middle dates, count the number of non-working days included in the calculation, then calculate the included hours based on the attendance start and end times, and then use the product of the number of included non-working days and the included hours as the non-working day's duration. Next, round up the sum of the working day duration and the non-working day duration to obtain the total working hours for the middle dates. Finally, sum the total working hours for the first and last dates and the total working hours for the middle dates as the working hours from the start time to the end time.

[0135] The calculation of working hours includes the following key points:

[0136] ① Obtain the user's attendance group: The attendance group is the central hub of all configuration relationships. It locates the specific attendance group by analyzing the employee's country and job type in their personal information. The upstream data for the attendance group is shift data, and the downstream data is the country's calendar data. The attendance group is used to integrate surrounding data for subsequent calculations.

[0137] ② Basic data acquisition: Obtain the date data set within the time range from the national calendar; obtain the start and end times of the shift; (additional leave data) obtain the leave-taking unit and minimum leave duration from the leave configuration.

[0138] ③ Calculation Rules: The calculation rules are relatively complex, using the calendar to determine the duration of each day. Each day needs to be determined whether it is a workday or a non-workday. If it is a workday, the end time is subtracted from the start time, converted to milliseconds for precision, and then rounded up. For non-workdays, it is first determined whether leave is counted; if not, the duration is 0; otherwise, the workday algorithm is repeated.

[0139] Furthermore, the world has a complex and diverse range of time zones, and even within the same country, multiple time zones may exist, resulting in time differences during commuting hours. Therefore, the unique identifier for attendance groups can be further refined into a combination of country + time zone + job title to ensure more precise coverage. Figure 5 As shown.

[0140] It's worth noting that the inclusion of shifts, attendance groups, national calendars, and holiday configurations in the global work hour calculation method enhances the overall management and control of global data. This solution can also be expanded to accommodate new national or subsidiary operations. In other words, through multiple configuration options, this solution flexibly implements work hour calculations based on different countries, job roles, and customized private leave, providing a better user experience for both users and operations personnel.

[0141] In summary, the attendance statistics method provided in this embodiment has the following advantages: 1) It can automatically process attendance data across national borders and time zones, avoiding errors caused by manually adjusting time zones. Simultaneously, it automatically adjusts the clock-in time based on the time zone configuration of the employee's different attendance group, ensuring the accuracy of global working hours calculation. Therefore, it significantly improves the accuracy of attendance data, avoiding errors in working hours calculation due to time zone errors, and is particularly suitable for multilingual support in globally distributed enterprises. 2) It supports dynamic configuration of statutory holidays, private holidays, and shift rules based on country and job type in different countries. Traditional solutions, in the current context, require a set of calculation rules for each country's different policies. Therefore, it reduces the burden on managers to manually maintain and update holidays and shifts, automating and improving the accuracy of calculations while ensuring employees comply with local policies, achieving the application of one set of rules in multiple locations. 3) It flexibly sets specific attendance rules for different countries and positions, making attendance more flexible and adaptable compared to traditional fixed-rule solutions. Therefore, it can accurately reflect the actual working conditions of various regions and positions, ensuring fair and reasonable calculation of overtime hours and improving employee satisfaction.

[0142] Based on the same inventive concept as the foregoing embodiments, this embodiment of the invention provides a computing device, such as... Figure 6 As shown, the computing device includes: a processor 310 and a memory 311 storing computer programs; wherein, Figure 6The processor 310 shown in the diagram does not indicate that there is only one processor 310, but only indicates the positional relationship of the processor 310 relative to other devices. In practical applications, there can be one or more processors 310; similarly, Figure 6 The memory 311 shown in the diagram has the same meaning, that is, it is only used to indicate the positional relationship of memory 311 relative to other devices. In practical applications, there can be one or more memories 311. When the processor 310 runs the computer program, the attendance statistics method described above is implemented.

[0143] The computing device may also include at least one network interface 312. The various components of the computing device are coupled together via a bus system 313. It is understood that the bus system 313 is used to implement communication between these components. In addition to a data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The general designated all buses as Bus System 313.

[0144] The memory 311 can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 311 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0145] The memory 311 in this embodiment of the invention is used to store various types of data to support the operation of the computing device. Examples of this data include: any computer programs used to operate on the computing device, such as operating systems and applications; contact data; phonebook data; messages; pictures; videos, etc. The operating system includes various system programs, such as the framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications, such as media players, browsers, etc., used to implement various application services. Here, the program implementing the method of this embodiment of the invention can be included in the application.

[0146] Based on the same inventive concept as the foregoing embodiments, this embodiment also provides a computer storage medium storing a computer program. The computer storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it can also be various devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc. When the computer program stored in the computer storage medium is run by a processor, it implements the attendance statistics method described above. For the specific steps implemented when the computer program is executed by the processor, please refer to [link to relevant documentation]. Figure 1 The description of the illustrated embodiments will not be repeated here.

[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0148] In this document, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, which includes not only the elements listed but also other elements not expressly listed.

[0149] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An attendance statistics method, characterized in that, include: Obtain attendance data of the target user within a preset attendance date range; Based on the target user's country and job position, determine the target attendance group to which the target user belongs; the target attendance group includes a national calendar and shifts used to describe the time rules for attendance tasks; Based on the attendance data, the national calendar, and the shift schedule, the attendance of the target user within the preset attendance date range is statistically analyzed to obtain attendance statistics results.

2. The method according to claim 1, characterized in that, The step of determining the target attendance group to which the target user belongs based on the target user's country and job position includes: Based on the target user's country and job position, obtain the candidate attendance group to which the target user belongs; Based on the time zone of the target user, a target attendance group is determined from the candidate attendance groups; wherein, different candidate attendance groups correspond to different time zones.

3. The method according to claim 1 or 2, characterized in that, The attendance statistics results include working hours; the attendance statistics results are obtained by statistically analyzing the attendance of the target user within the preset attendance date range based on the attendance data, the national calendar, and the shift, including: Based on the attendance data, determine at least one attendance-pending day included in the preset attendance date range; Based on the attendance data, the national calendar, and the shift schedule, the working hours of the target user on each of the days to be checked are determined; Based on the working hours of each of the days to be checked, the working hours of the target user within the preset attendance date range are calculated.

4. The method according to claim 3, characterized in that, The step of determining the target user's working hours on each of the days pending attendance based on the attendance data, the national calendar, and the shift schedule includes: Obtain the attendance configuration information bound to the national calendar; Based on the attendance data, the national calendar, the shift schedule, and the attendance configuration information, the working hours of the target user on each of the days to be checked are determined.

5. The method according to claim 4, characterized in that, The attendance configuration information includes leave duration calculation rules, date types for different dates, and work duration calculation rules for different date types; determining the target user's work duration for each pending attendance day based on the attendance data, the national calendar, the shift schedule, and the attendance configuration information includes: The date type of the target attendance day is determined based on the national calendar and the date types of the different dates; the target attendance day is any attendance day. If the date type of the target attendance day is a workday or a day off in lieu, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, the working hours calculation rules for workday type dates, and the leave calculation rules. If the date type of the target attendance day is a non-working day, then the working hours of the target user on the target attendance day are determined according to the attendance data, the shift, and the working hours calculation rules for the non-working day type date.

6. The method according to claim 5, characterized in that, The shift includes the attendance start time and attendance end time for each pending attendance day, and the attendance data includes at least one clock-in start time and at least one clock-in end time for each pending attendance day.

7. The method according to claim 6, characterized in that, The step of determining the target user's working hours on the target attendance day based on the attendance data, the shift, the working day type date calculation rules, and the leave duration calculation rules includes: Based on at least one clock-in start time and at least one clock-in end time of the target user on the target attendance day, as well as the attendance start time and the attendance end time, determine the first clock-in start time and the first clock-in end time corresponding to the target user when working on the target attendance day, and the second clock-in start time and the second clock-in end time corresponding to the target user when taking leave on the target attendance day; Based on the second check-in start time and the second check-in end time, as well as the leave duration calculation rules, the leave duration of the target user on the target attendance day is determined. Based on the first check-in start time and the first check-in end time, determine the check-in duration of the target user on the target attendance day; Based on the duration of the check-in and the duration of the leave request, the working hours of the target user on the target attendance day are determined.

8. An attendance tracking device, characterized in that, include: The acquisition module is used to acquire the attendance data of the target user within a preset attendance date range; The determination module is used to determine the target attendance group to which the target user belongs based on the target user's country and job position; The target attendance group includes a national calendar and shifts used to describe the time rules for attendance tasks; The statistics module is used to perform statistics on the attendance of the target user within the preset attendance date range based on the attendance data, the national calendar, and the shift, and to obtain attendance statistics results.

9. A computing device, characterized in that, include: The processor and the memory storing a computer program implement the attendance statistics method according to any one of claims 1 to 7 when the processor runs the computer program.

10. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the attendance statistics method according to any one of claims 1 to 7.