A DBSCAN-based positioning punch-in method, device, electronic device and storage medium
Dynamically adjusting the clock-in range through the DBSCAN algorithm solves the problem of employees being unable to clock in on time due to special circumstances, provides a fairer attendance environment, ensures that employees can clock in smoothly under unpredictable circumstances, and reduces the unfair impact of attendance data.
Patent Information
- Application Number
- CN202410865105.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-01
AI Technical Summary
Existing technology cannot effectively deal with the problem of employees being unable to clock in on time due to special circumstances. It lacks flexibility and adaptability, causing employee attendance rates to be unfairly affected.
The DBSCAN-based location check-in method is used to dynamically adjust the check-in radius by calculating the average moving distance and confidence of employees to ensure that the check-in range is automatically adjusted in the event of natural disasters or traffic jams, providing a fairer attendance environment.
It achieves fairness in employee attendance rates under unpredictable circumstances, ensures that employees can clock in smoothly under special circumstances, reduces the unfair impact of attendance data, and improves employee satisfaction and corporate social image.
Smart Images

Figure CN118411767B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of positioning and data analysis technology, and in particular to a positioning punch-in method, device, electronic device and storage medium based on DBSCAN. Background Art
[0002] Currently, most companies use fixed time clocks or web-based time clock systems to monitor employee attendance. These systems usually require employees to clock in at a specific time and place to record their attendance status. This method is unfair to employees and may affect their attendance records when encountering emergencies such as traffic congestion or natural disasters. There is currently a lack of solutions on the market that can flexibly respond to such special situations.
[0003] From the above, we can see that the existing technology cannot effectively deal with the problem of employees being unable to punch in on time due to special circumstances. It lacks flexibility and adaptability. Strict punch-in time and location requirements may lead to unfair impact on employees' attendance rate in force majeure situations, such as natural disasters or traffic accidents.
[0004] Therefore, there is an urgent need for a fair, reasonable, flexible and reliable positioning clocking method that can perform cluster analysis on employees' geographic location data, intelligently adjust the clocking range based on employees' full attendance records and real-time location information. Summary of the invention
[0005] The embodiments of the present invention provide a method for clocking in and out based on DBSCAN to solve the problem that the existing technology cannot effectively deal with the limitation that employees cannot clock in and out on time due to special circumstances, and lacks flexibility and adaptability. The technical solution is as follows:
[0006] According to one aspect of the present invention, a positioning punch-in method based on DBSCAN, the method comprising: setting a maximum punch-in radius and an adjustment time point according to company regulations; calculating, at the adjustment time point, the confidence that a special situation has occurred to the employee who has not punched in based on the punch-in situation of the employee who has not punched in within the set time period at the current moment; obtaining employee gathering points through the DBSCAN algorithm at the adjustment time point, and calculating the average moving distance of each employee in the gathering point between adjacent adjustment time points; if the average moving distance of the employee meets the set conditions, calculating the distance between the gathering point and the company, and updating the punch-in radius according to the maximum punch-in radius and the confidence.
[0007] In one of the embodiments, the confidence level of a special situation occurring to the employee who has not punched in at the adjustment time point is calculated based on the punch-in status of the employee who has not punched in at the current time within the set time period by the following steps: obtaining the average full attendance rate of the employee who has not punched in within three months, and using an exponential decay function to calculate the confidence level of a special situation occurring to the employee who has not punched in based on the full attendance rate;
[0008] The confidence calculation formula is as follows:
[0009] ;
[0010] Among them, λ is a coefficient used to adjust the impact of average attendance rate on confidence.
[0011] In one of the embodiments, employee gathering points are obtained by using the DBSCAN algorithm at the adjustment time points, and the average moving distance of each employee in the gathering points between adjacent adjustment time points is calculated by the following steps: using the DBSCAN algorithm to find the employee gathering points at the adjustment time points, and calculating the centroid position and coverage radius of each gathering point; and calculating the average moving distance of the employees between adjacent adjustment time points based on the positions of the employees in each gathering point at adjacent adjustment time points.
[0012] In one of the embodiments, if the average moving distance of the employee meets the set conditions, the distance between the gathering point and the company is calculated, and the punch-in radius is updated according to the maximum punch-in radius and the confidence level through the following steps: if the average moving distance of the employee is lower than a preset threshold, it is determined that an unexpected situation has occurred at the gathering point, and the gathering point with the largest distance between the centroid position and the company position is taken as the core gathering point;
[0013] The formula for updating the punch-in radius is as follows:
[0014] ;
[0015] in, is the check-in radius of the previous adjustment time point. is the maximum punch-in radius, It is the ideal punch-in radius.
[0016] In one embodiment, the calculation formula of the ideal punching radius is as follows:
[0017] ;
[0018] Among them, D is the distance from the centroid of the core aggregation point to the company, and δ is the coverage radius of the core aggregation point.
[0019] In one of the embodiments, the updating of the punch-in radius does not reduce the punch-in radius.
[0020] In one of the embodiments, obtaining employee gathering points through the DBSCAN algorithm is achieved through the following steps: setting a minimum number of gathering people and a maximum gathering radius, and using the minimum number of gathering people and the maximum gathering radius as the minimum number of points and field radius of the DBSCAN algorithm, respectively.
[0021] According to one aspect of the present invention, a positioning device based on DBSCAN includes: a parameter setting module, which is used to set a maximum punch-in radius and an adjustment time point according to company regulations; a confidence calculation module, which is used to calculate the confidence that a special situation has occurred to the employee who has not punched in within a set time period at the adjustment time point based on the punch-in situation of the employee who has not punched in at the current moment; a gathering point analysis module, which is used to obtain employee gathering points through the DBSCAN algorithm at the adjustment time point, and calculate the average moving distance of each employee in the gathering point between adjacent adjustment time points; a punch-in radius update module, which is used to calculate the distance between the gathering point and the company if the average moving distance of the employee meets the set conditions, and update the punch-in radius according to the maximum punch-in radius and the confidence.
[0022] According to one aspect of the present invention, an electronic device includes at least one processor and at least one memory, wherein the memory stores computer-readable instructions; the computer-readable instructions are executed by one or more of the processors, so that the electronic device implements the DBSCAN-based positioning punch-in method as described above.
[0023] According to one aspect of the present invention, a storage medium stores computer-readable instructions thereon, and the computer-readable instructions are executed by one or more processors to implement the DBSCAN-based positioning punch-in method as described above.
[0024] The beneficial effects brought by the technical solution provided by the present invention are:
[0025] In the above technical scheme, the present invention first sets the maximum punch-in radius and adjustment time point according to the company regulations, calculates the confidence of special circumstances of employees who have not punched in according to the punch-in situation of employees who have not punched in within the set time at the adjustment time point, obtains employee gathering points through DBSCAN algorithm at the adjustment time point, calculates the average moving distance of each employee in the gathering point between adjacent adjustment time points, calculates the distance between the gathering point and the company if the average moving distance of the employee meets the set conditions, updates the punch-in radius according to the maximum punch-in radius and confidence, and automatically adjusts the punch-in range in special circumstances such as natural disasters or traffic jams by real-time analysis of the employee's geographic location data, thereby providing a fairer attendance environment for employees. This flexibility ensures that even in unpredictable circumstances, the attendance rate of employees will not be unfairly negatively affected, thereby effectively solving the limitations of the prior art that employees cannot effectively deal with the inability to punch in on time due to special circumstances, and lacks flexibility and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in describing the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0027] Figure 1 is a flow chart of a DBSCAN-based positioning punch-in method according to an exemplary embodiment;
[0028] Figure 2 is a schematic diagram of a DBSCAN-based positioning punch-in method according to an exemplary embodiment;
[0029] Figure 3 yes Figure 2 Schematic diagram of the confidence calculation process in the corresponding application scenario;
[0030] Figure 4 is a block diagram of a positioning device based on DBSCAN according to an exemplary embodiment;
[0031] Figure 5 is a hardware structure diagram of an electronic device according to an exemplary embodiment;
[0032] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0033] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0034] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0035] The present invention provides a DBSCAN-based positioning punching method, which can automatically adjust the punching range in special circumstances such as natural disasters or traffic jams by analyzing employees' geographic location data in real time, solving the problem that the prior art cannot effectively deal with the limitation that employees cannot punch in on time due to special circumstances, and lacks flexibility and adaptability. The DBSCAN-based positioning punching method is suitable for a DBSCAN-based positioning device, which can be an electronic device. The DBSCAN-based positioning punching method in the embodiment of the present invention can be applied to a variety of scenarios, such as corporate attendance punching.
[0036] See also Figure 1 The embodiment of the present invention provides a positioning punch-in method based on DBSCAN, which is applicable to electronic devices.
[0037] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.
[0038] like Figure 1 As shown, the method may include the following steps:
[0039] Step 110, set the maximum punch-in radius and adjust the time point according to company regulations.
[0040] Step 130, at the adjustment time point, calculate the confidence level of the special situation of the employee who did not punch in based on the punch-in status of the employee who did not punch in within the set time period at the current moment.
[0041] In a possible implementation, the average full attendance rate of employees who did not punch in within three months is obtained, and an exponential decay function is used to calculate the confidence level that a special situation has occurred in the employees who did not punch in according to the full attendance rate.
[0042] Specifically, the formula for calculating confidence is as follows:
[0043] ;
[0044] Among them, λ is a coefficient used to adjust the impact of average attendance rate on confidence.
[0045] Step 150, at the adjustment time point, employee clustering points are obtained by using the DBSCAN algorithm to calculate the average moving distance of each employee in the clustering points between adjacent adjustment time points.
[0046] Among them, DBSCAN, namely Density-Based Spatial Clustering of Applications with Noise, is a density-based spatial clustering algorithm used to identify clusters of arbitrary shapes in noisy data.
[0047] In one possible implementation, the DBSCAN algorithm is used to find the clustering points of the employees at the adjustment time points, and the centroid position and coverage radius of each clustering point are calculated. The average movement distance of the employees between adjacent adjustment time points is calculated based on the positions of the employees in each clustering point at adjacent adjustment time points.
[0048] Step 170: If the average moving distance of the employees meets the set conditions, the distance between the gathering point and the company is calculated, and the punch-in radius is updated according to the maximum punch-in radius and confidence.
[0049] In one possible implementation, if the average moving distance of the employees is lower than the preset threshold, it is determined that an unexpected situation has occurred at the gathering point, and the gathering point with the largest distance between the centroid position and the company position is taken as the core gathering point.
[0050] Specifically, the formula for updating the punch-in radius is as follows:
[0051] ;
[0052] in, is the check-in radius of the previous adjustment time point. is the maximum punch-in radius, It is the ideal punch-in radius.
[0053] The calculation formula for the ideal punch-in radius is as follows:
[0054] ;
[0055] Among them, D is the distance from the centroid of the core aggregation point to the company, and δ is the coverage radius of the core aggregation point.
[0056] In one possible implementation, the punch-in radius will not be reduced when the punch-in radius is updated.
[0057] In a possible implementation, a minimum number of people gathered and a maximum gathering radius are set, and the minimum number of people gathered and the maximum gathering radius are used as the minimum number of points and the domain radius of the DBSCAN algorithm, respectively.
[0058] Through the above process, the present invention first sets the maximum punch-in radius and adjustment time point according to the company regulations, calculates the confidence of special circumstances of employees who have not punched in according to the punch-in situation of employees who have not punched in within the set time at the adjustment time point, obtains employee gathering points through the DBSCAN algorithm at the adjustment time point, calculates the average moving distance of each employee in the gathering point between adjacent adjustment time points, calculates the distance between the gathering point and the company if the average moving distance of the employee meets the set conditions, updates the punch-in radius according to the maximum punch-in radius and the confidence, and automatically adjusts the punch-in range in special circumstances such as natural disasters or traffic jams by real-time analysis of the employee's geographic location data, thereby providing a fairer attendance environment for employees. This flexibility ensures that even in unpredictable circumstances, the attendance rate of employees will not be unfairly negatively affected, thereby effectively solving the limitations of the prior art that employees cannot effectively deal with the inability to punch in on time due to special circumstances, and lacks flexibility and adaptability.
[0059] In one application scenario, Figure 2 It shows a flow chart of a DBSCAN-based positioning punch-in method. Figure 3 A schematic diagram of the confidence calculation process is shown.
[0060] like Figure 2 As shown, first, according to the preset distance value, distance degree, adjustment time point and adjustment intensity parameters stipulated by the company, it is determined whether the adjustment time has been reached. If it has been reached, wait. If it has reached the adjustment time, the full attendance rate of employees who have not punched in at the current time in the past quarter is counted, and then the confidence of the accident is calculated, the aggregation degree of employees who have not punched in at the previous time node is obtained and the aggregation degree of employees who have not punched in at the current time node is calculated, and the average moving distance of employees in each gathering area between the current time node and the previous time node is calculated. Each gathering area is traversed, and it is cyclically determined whether the average moving distance of each gathering area is lower than the preset value. If it is lower than the preset value, it is pessimistically determined that an accident has occurred, and this gathering area is added to the accident queue. After the traversal of each gathering area is completed, the distance between all gathering areas in the accident queue and the company is calculated, and the distance between the gathering area with the farthest distance and the company and the current radius are obtained. The punching radius is calculated according to the confidence, and it is determined whether the punching distance is greater than the current radius and less than the current radius. If so, the punching radius is updated, otherwise or after the punching radius is updated, continue to wait until the adjustment time.
[0061] like Figure 3 As shown, the confidence level that the reason for not clocking in at a specific time, i.e., the current time, is an unexpected situation is calculated based on the employee's full attendance rate in the past three months, i.e., one quarter.
[0062] Specifically, we first count the current employees who have not clocked in, traverse each employee who has not clocked in, calculate the number of working days and non-late days for each employee who has not clocked in in the past 90 days, and obtain the attendance rate of each employee who has not clocked in by dividing the number of non-late days by the number of working days. After the traversal is completed, we calculate the confidence level based on the attendance rate.
[0063] The specific calculation formula for attendance rate is as follows:
[0064] ;
[0065] Among them, an exponential decay function is used to calculate the confidence level of the accident according to the attendance rate. λ is a coefficient used to adjust the impact of the attendance rate on the confidence level. It needs to be adjusted according to the actual situation. It is a common exponential decay function, which is often used to describe the growth or decay of some phenomena. The graph of this function will start from 0 at n=0 and approach 1 as n increases, but will not exceed 1.
[0066] Among them, the full attendance rate record records the full attendance data of each employee in the past three months, including whether he / she punches in on time every day, and calculates the full attendance rate of each employee. For example, if an employee punches in on time for 55 out of 60 working days in 90 days, the full attendance rate is 55 / 60.
[0067] Furthermore, the punch-in radius is dynamically adjusted based on a series of factors to ensure that employees can punch in smoothly under special circumstances. Assuming that 9 o'clock is the last punch-in time, the radius may be adjusted at 8:30, 8:40, and 8:50. The closer the time is to 9 o'clock, the greater the adjustment made based on unexpected circumstances.
[0068] Among them, normal clocking in will have a radius range, that is, the minimum clocking in radius. It is necessary to preset a maximum clocking in range and only make adjustments within the maximum clocking in range. Even if an accident occurs, the radius adjustment will not exceed the preset maximum clocking in range. In order to ensure the fairness of clocking in, the radius will not be reduced each time it is changed.
[0069] Through the above process, the embodiment of the present invention can automatically adjust the punch-in range in special circumstances such as natural disasters or traffic jams by analyzing the employee's geographic location data in real time, thereby providing a fairer attendance environment for employees. If an unexpected situation occurs, the punch-in range will be relaxed to give employees some care. This flexibility ensures that even in unpredictable circumstances, the employee's attendance rate will not be unfairly negatively affected, thereby effectively solving the problem that the existing technology cannot effectively deal with the limitations of employees who are unable to punch in on time due to special circumstances, and lacks flexibility and adaptability.
[0070] In another application scenario, the DBSCAN-based positioning punch-in method may include the following steps:
[0071] Step S1: data collection and DBSCAN clustering.
[0072] Specifically, the DBSCAN algorithm is used at each time node (8:30, 8:40, 8:50) to find the gathering points of employees, calculate the centroid and coverage radius of each gathering point, and set the minimum number of gathering people and the maximum gathering radius.
[0073] Step S2, analyzing the moving distance of the gathering point.
[0074] Specifically, the gathering points of consecutive time nodes are compared, the positions of employees at all gathering points in the previous time node (the previous time node of 8:30 is 8:20) at the current time node are counted, the moving distance of employees at each gathering point from the previous time node to the current time node is calculated, and their average moving distance is calculated.
[0075] Among them, it is necessary to set the distance threshold in advance. For example, if the moving distance is 200 meters in 10 minutes, if the moving distance is lower than the preset distance threshold, it is pessimistically determined that an accident may occur in the gathering area. If multiple gathering points are determined to have an accident, the gathering point with the largest centroid distance is considered.
[0076] Step S3, adjust the punch-in radius:
[0077] Specifically, the punch-in radius calculation formula is as follows:
[0078] ;
[0079] in, is the check-in radius of the previous time node, is the maximum punch-in radius, is the ideal punch-in radius, calculated as follows:
[0080] ;
[0081] Among them, D is the distance from the centroid of the gathering point to the company, and δ is an increment adjusted according to the confidence level, which is used to ensure that the punch-in radius is slightly larger than the centroid distance. It can be set to the maximum gathering radius, so that all employees gathered due to unexpected circumstances can complete the punch-in.
[0082] Among them, 0.3, 0.6 and 1.0 in the punch-in radius formula indicate that the percentages of the adjusted distances at the preset time points of 8:30, 8:40 and 8:50 to the expected distances are 30%, 60% and 100% respectively. Because the unexpected situation may or may not continue, the adjustment intensity is set according to the urgency of time. If an unexpected situation occurs at 8:30, it may delay the progress of some employees in rushing to the company. The 30% provided by the company is also a tolerance range for employees. If the accident continues, the tolerance range gradually increases to 100%, which can ensure that employees punch in. The confidence level and employee attendance rate have a certain impact on the calculation of the punch-in radius.
[0083] Furthermore, the minimum number of people gathered and the maximum gathering radius are set to correspond to the two parameters on which the BSCAN algorithm is based: the minimum number of points (MinPts) and the neighborhood radius (ε).
[0084] Specifically, the BSCAN algorithm first defines the core point: if a point has at least MinPts points (including itself) in its ε neighborhood, then the point is marked as a core point. Boundary points are those points that have less than MinPts points in their ε neighborhood but are in the neighborhood of at least one core point. Noise points are neither core points nor boundary points. Then, starting from any core point, all core points that are density-reachable with it are found recursively to form a cluster. Boundary points are classified into the clusters of the core points adjacent to it. Each core point and all points that are density-reachable with it form a cluster, and noise points are not classified into any cluster.
[0085] The core of the DBSCAN algorithm is to define whether a point is a core point based on the distance and the number of points.
[0086] First, the distance between each pair of points is calculated. The distance can be Euclidean distance or other types of distance. The specific calculation method depends on the nature of the data.
[0087] Specifically, the calculation formula of Euclidean distance is as follows:
[0088] ;
[0089] Among them, p and q are two points, p1, p2, …, pn and q1, q2, …, qn are their coordinates in n-dimensional space.
[0090] Specifically, for each point, the number of points in its ε-neighborhood is calculated. The ε-neighborhood refers to the area with a radius of ε centered on the point. If the number of points in the ε-neighborhood is greater than or equal to MinPts, the point is a core point. Starting from the core point, all core points in the ε-neighborhood are connected into a piece to form a cluster. This process is iterated until no new core points can be added to the cluster.
[0091] In the above process, the advantage of DBSCAN is that it does not require the number of clusters to be specified in advance and can handle noisy data well.
[0092] Through the above process, the embodiment of the present invention can dynamically adjust the punch-in range according to the actual situation, and can allow employees to complete the punch-in within the expanded range under certain emergency situations, such as traffic delays, to ensure the accuracy and fairness of the attendance data. By combining the employee's full attendance rate and real-time location information, an attendance evaluation standard for special circumstances is established, allowing the enterprise to make a fair assessment of the employee's attendance status when an emergency occurs, while reducing the adverse effects of special circumstances, thereby effectively solving the problem that the existing technology cannot effectively deal with the limitations of employees who are unable to punch in on time due to special circumstances, and lacks flexibility and adaptability.
[0093] The following is an embodiment of the device of the present invention, which can be used to execute the positioning punch-in method based on DBSCAN involved in the present invention. For details not disclosed in the embodiment of the device of the present invention, please refer to the method embodiment of the positioning punch-in method based on DBSCAN involved in the present invention.
[0094] See also Figure 4 In an embodiment of the present invention, a positioning and punching device 800 based on DBSCAN is provided.
[0095] The DBSCAN-based positioning and punching device 800 includes but is not limited to: a parameter setting module 810, a confidence calculation module 830, a gathering point analysis module 850 and a punching radius update module 870.
[0096] Among them, the parameter setting module 810 is used to set the maximum punch-in radius and adjust the time point according to company regulations.
[0097] The confidence calculation module 830 is used to calculate the confidence that a special situation has occurred to the employee who has not punched in at the adjustment time point based on the punching-in situation of the employee who has not punched in at the current moment within the set time period.
[0098] The clustering point analysis module 850 is used to obtain the employee clustering points through the DBSCAN algorithm at the adjustment time points, and calculate the average moving distance of each employee in the clustering points between adjacent adjustment time points.
[0099] The punch-in radius update module 870 is used to calculate the distance between the gathering point and the company if the average movement distance of the employees meets the set conditions, and update the punch-in radius according to the maximum punch-in radius and confidence.
[0100] It should be noted that the DBSCAN-based positioning provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the DBSCAN-based positioning device will be divided into different functional modules to complete all or part of the functions described above.
[0101] In addition, the DBSCAN-based positioning device and the DBSCAN-based positioning punch-in method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiments and will not be repeated here.
[0102] Figure 5 The present invention schematically illustrates the structure of an electronic device according to an exemplary embodiment.
[0103] It should be noted that the electronic device is only an example adapted to the present invention and cannot be considered to provide any limitation on the scope of use of the present invention. The electronic device cannot be interpreted as requiring dependence on or having Figure 5 One or more components of exemplary electronic device 2000 are shown.
[0104] The hardware structure of the electronic device 2000 may vary greatly due to differences in configuration or performance, such as Figure 5 As shown, the electronic device 2000 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .
[0105] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the electronic device 2000 .
[0106] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted by the present invention, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Figure 5 As shown, this is not intended to be a specific limitation.
[0107] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.
[0108] Among them, the operating system 251 is used to manage and control various hardware devices and application programs 253 on the electronic device 2000 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
[0109] The application program 253 is a computer-readable instruction that performs at least one specific task based on the operating system 251, and may include at least one module ( Figure 5 (not shown), each module may respectively include computer-readable instructions for the electronic device 2000. For example, the positioning device based on DBSCAN may be regarded as an application 253 deployed on the electronic device 2000.
[0110] The data 255 may be signal information, etc., stored in the memory 250 .
[0111] The central processor 270 may include one or more processors, and is configured to communicate with the memory 250 through at least one communication bus to read the computer-readable instructions stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the positioning punch-in method based on DBSCAN is completed by the central processor 270 reading a series of computer-readable instructions stored in the memory 250.
[0112] In addition, the present invention can also be implemented by hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present invention is not limited to any specific hardware circuits, software, or a combination of the two.
[0113] See also Figure 6 In an embodiment of the present invention, an electronic device 4000 is provided. The electronic device 4000 may include: a desktop computer, a laptop computer, a server, etc. with sensor recognition capability.
[0114] exist Figure 6 In the embodiment, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.
[0115] The data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0116] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception, etc. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0117] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0118] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program instructions or codes in the form of instructions or data structures and can be accessed by the electronic device 4000, but is not limited to this.
[0119] Computer-readable instructions are stored in the memory 4003 , and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002 .
[0120] The computer-readable instructions are executed by one or more processors 4001 to implement the DBSCAN-based positioning and punching-in method in the above-mentioned embodiments.
[0121] In addition, an embodiment of the present invention provides a storage medium on which computer-readable instructions are stored. The computer-readable instructions are executed by one or more processors to implement the DBSCAN-based positioning punch-in method as described above.
[0122] A computer program product is provided in an embodiment of the present invention. The computer program product includes computer-readable instructions, and the computer-readable instructions are stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, so that the electronic device implements the DBSCAN-based positioning and punch-in method as described above.
[0123] Compared with the related art, the present invention has the following beneficial effects:
[0124] 1. The present invention sets the maximum punch-in radius and adjustment time point according to the company regulations at first, calculates the confidence of special circumstances of employees who have not punched in according to the punch-in situation of employees who have not punched in within the set time at the current time point, obtains employee gathering points by DBSCAN algorithm at the adjustment time point, calculates the average moving distance of each employee in the gathering point between adjacent adjustment time points, calculates the distance between the gathering point and the company if the average moving distance of the employee meets the set conditions, updates the punch-in radius according to the maximum punch-in radius and the confidence, and automatically adjusts the punch-in range in special circumstances such as natural disasters or traffic jams by analyzing the employee's geographic location data in real time, thereby providing a fairer attendance environment for employees. This flexibility ensures that even in unpredictable circumstances, the attendance rate of employees will not be unfairly negatively affected, thereby effectively solving the limitations of the prior art that employees cannot effectively deal with the inability to punch in on time due to special circumstances, and lacks flexibility and adaptability.
[0125] 2.2. Compared with the traditional fixed clock-in range, the system proposed in the present invention can dynamically adjust the clock-in range according to actual conditions. This dynamic adjustment mechanism can allow employees to complete the clock-in within the expanded range under certain emergencies, such as traffic delays, to ensure the accuracy and fairness of attendance data.
[0126] 3. The present invention establishes attendance evaluation standards for special circumstances by combining employees' full attendance rate and real-time location information, allowing enterprises to make fair assessments of employees' attendance status when emergencies occur, while mitigating the adverse effects of special circumstances.
[0127] 4. The present invention takes employee welfare and work efficiency into consideration and can provide necessary support when employees encounter inconveniences, which not only enhances employee satisfaction and loyalty to the enterprise, but also improves the enterprise's social image and the brand value of employee care.
[0128] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0129] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A positioning punch-in method based on DBSCAN, characterized in that: The method comprises: Set the maximum punch-in radius and adjust the time point according to company regulations; At the adjustment time point, the confidence level of the special situation of the employee who did not punch in is calculated based on the punch-in status of the employee who did not punch in within the set time period at the current moment; At the adjustment time points, employee gathering points are obtained by using the DBSCAN algorithm, and the average moving distance of each employee in the gathering points between adjacent adjustment time points is calculated; If the average moving distance of the employee meets the set conditions, the distance between the gathering point and the company is calculated, and the punch-in radius is updated according to the maximum punch-in radius and the confidence level; The calculation of the confidence level of a special situation occurring to the employee who has not punched in at the adjustment time point according to the punching-in situation of the employee who has not punched in at the current moment within the set time period includes: Obtain the average full attendance rate of the employees who did not punch in within three months, and use an exponential decay function to calculate the confidence level that a special situation has occurred to the employees who did not punch in based on the full attendance rate; The confidence calculation formula is as follows: ; Among them, λ is a coefficient used to adjust the impact of average attendance rate on confidence; If the average moving distance of the employees meets the set conditions, the distance between the gathering point and the company is calculated, and the punch-in radius is updated according to the maximum punch-in radius and the confidence level, including: If the average moving distance of the employee is lower than the preset threshold, it is determined that an accident has occurred at the gathering point, and the gathering point with the largest distance between the centroid position and the company position is taken as the core gathering point; The formula for updating the punch-in radius is as follows: ; in, is the check-in radius of the previous adjustment time point. is the maximum punch-in radius, is the ideal punch-in radius; The calculation formula of the ideal punch radius is as follows: ; Among them, D is the distance from the centroid of the core aggregation point to the company, and δ is the coverage radius of the core aggregation point.
2. The DBSCAN-based positioning punch-in method according to claim 1, characterized in that: Obtaining employee gathering points by using the DBSCAN algorithm at the adjustment time points, and calculating the average moving distance of each employee in the gathering points between adjacent adjustment time points, include: At the adjustment time point, the DBSCAN algorithm is used to find the gathering points of the employees, and the centroid position and coverage radius of each gathering point are calculated; The average moving distance of employees between adjacent adjustment time points is calculated based on the positions of employees in each gathering point at adjacent adjustment time points.
3. The DBSCAN-based positioning punch-in method according to claim 1, characterized in that: The employee gathering points are obtained by using the DBSCAN algorithm, including: The minimum number of people gathered and the maximum gathering radius are set, and the minimum number of people gathered and the maximum gathering radius are used as the minimum number of points and the domain radius of the DBSCAN algorithm respectively.
4. A positioning punching device based on DBSCAN, characterized in that: The device is used to execute the DBSCAN-based positioning punch-in method according to any one of claims 1 to 3, and the device includes: Parameter setting module, used to set the maximum punch-in radius and adjust the time point according to company regulations; A confidence calculation module, used to calculate the confidence that a special situation has occurred to the employee who has not punched in at the adjustment time point according to the punching-in situation of the employee who has not punched in at the current moment within the set time period; A gathering point analysis module, used to obtain employee gathering points at the adjustment time points by using the DBSCAN algorithm, and calculate the average moving distance of each employee in the gathering points between adjacent adjustment time points; The punch-in radius update module is used to calculate the distance between the gathering point and the company if the average moving distance of the employee meets the set conditions, and update the punch-in radius according to the maximum punch-in radius and confidence.
5. An electronic device, characterized in that: include: at least one processor and at least one memory, wherein: The memory has computer-readable instructions stored thereon; The computer-readable instructions are executed by one or more of the processors, so that the electronic device executes the DBSCAN-based positioning and punching-in method as described in any one of claims 1 to 3.
6. A storage medium having computer-readable instructions stored thereon, characterized in that: The computer-readable instructions are executed by one or more processors to perform the DBSCAN-based positioning and punching method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Abnormal attendance data screening method and device, computer equipment and storage medium
CN110399362A
Automatic attendance checking method based on mobile terminal
CN111784862A
User attendance control method and related equipment
CN116343355A
Method for the management of work processes
WO2005013205A1
