Attendance checking method, server of attendance checking system, electronic equipment and storage medium
By combining the two-factor verification method of geographical location and Bluetooth scanning equipment, the problem of fake check-in in mobile check-in is solved, and the accuracy and reliability of attendance check-in are achieved.
Patent Information
- Application Number
- CN202510722723.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-12
AI Technical Summary
Mobile check-in methods are prone to false check-in, resulting in insufficient accuracy of attendance check-in.
Through a two-factor verification method combining Bluetooth scanning equipment and geolocation verification, after initially verifying the geographical location of employees, the Bluetooth scanning equipment is used to scan terminal identification information, and the final check-in result is confirmed by combining the check-in intention and scanning results.
It significantly improves the accuracy of attendance check-in, prevents false check-in, and ensures accurate records of employees' attendance.
Smart Images

Figure CN120472556A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of attendance clocking in and out, and in particular to an attendance method, a server, an electronic device and a storage medium of an attendance system. Background Art
[0002] With the gradual development of companies and technological advancements, clocking in and out has undergone significant changes. Traditional manual sign-ins or time clocks have gradually become obsolete. With the widespread adoption of mobile internet, mobile clocking has emerged, allowing employees to clock in anytime, anywhere via their phones, further enhancing work flexibility. However, mobile clocking in inevitably leads to false clocking in, leading to urgent challenges in reducing false clocking in and improving attendance accuracy. Summary of the Invention
[0003] The embodiments of the present application provide an attendance method, a server, an electronic device, and a storage medium of an attendance system, which can improve the accuracy of attendance punching.
[0004] A first embodiment of the present application provides an attendance method, which is applied to a server of an attendance system, wherein the server is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at a target location. The method includes:
[0005] Obtaining a preliminary check-in result according to a check-in request sent by a target terminal, wherein the check-in request includes a current location of the target terminal. If the current location matches the target location, the preliminary check-in result is a successful check-in;
[0006] Obtaining a first scanning result from the Bluetooth scanning device, where the first scanning result includes identification information of at least one terminal scanned within a preset range of the target location;
[0007] A target punch-in result of the target terminal is obtained according to the preliminary punch-in result and the first scanning result.
[0008] In some possible embodiments, obtaining a first scanning result from the Bluetooth scanning device includes:
[0009] When receiving the clock-in request sent by the target terminal and the preliminary clock-in result indicates a successful clock-in, sending a start scanning instruction to the Bluetooth scanning device;
[0010] The first scanning result is received from the Bluetooth scanning device.
[0011] In some possible embodiments, the start scanning instruction further includes a scanning rule, where the scanning rule is used to indicate a scanning frequency and / or a scanning duration, so that the Bluetooth scanning device performs scanning according to the scanning rule.
[0012] In some possible embodiments, the method further includes:
[0013] Obtaining a punch-in intention, where the punch-in intention includes clocking in for work or clocking out for get off work;
[0014] Obtaining a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result includes:
[0015] Obtaining a target punch-in result of the target terminal according to the punch-in intention, the preliminary punch-in result, and the first scanning result;
[0016] Wherein, if the punching intention is to punch in for work, the preliminary punching result indicates successful punching in for work, and the first scanning result includes the identification information of the target terminal, the target punching result is successful punching in for work;
[0017] When the punching intention is to punch out, the preliminary punching result indicates a successful punching out, and the first scanning result does not include the identification information of the target terminal, the target punching result is a successful punching out.
[0018] In some possible embodiments, after obtaining a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result, the method further includes:
[0019] If the target clock-in result indicates a successful clock-in, obtaining a plurality of second scan results within a target time period from the Bluetooth scanning device, the target time period being a time period after the successful clock-in;
[0020] Determining, based on the multiple second scanning results, the on-the-job hours of the employee corresponding to the target terminal;
[0021] The attendance of the employee corresponding to the target terminal is obtained according to the preset on-the-job time corresponding to the on-the-job time and the target time period.
[0022] In some possible embodiments, determining the on-the-job hours of the employee corresponding to the target terminal according to the second scanning result includes:
[0023] In a case where the plurality of second scanning results all include identification information of the target terminal, the on-duty time is the preset on-duty time;
[0024] In the case that any target second scan result among the multiple second scan results does not include the identification information of the target terminal, the number of target second scan results is obtained, and the off-duty time is obtained based on the number of target second scan results and the scanning frequency. The on-duty time is the difference between the preset on-duty time and the off-duty time.
[0025] In some possible embodiments, the server of the attendance system establishes a communication connection with the personnel management system, and the method further includes:
[0026] When the on-the-job time is less than the preset on-the-job time, an attendance abnormality prompt is sent to the personnel management system.
[0027] A second embodiment of the present application provides a server for an attendance system, wherein the server is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at a target location. The server includes:
[0028] A preliminary clocking-in module, configured to obtain a preliminary clocking-in result based on a clocking-in request sent by a target terminal, wherein the clocking-in request includes the current location of the target terminal. If the current location matches the target location, the preliminary clocking-in result is a successful clocking-in;
[0029] a scanning module, configured to obtain a first scanning result from the Bluetooth scanning device, wherein the first scanning result includes identification information of at least one terminal scanned within a preset range of the target location;
[0030] A processing module is used to obtain a target punch-in result of the target terminal according to the preliminary punch-in result and the first scanning result.
[0031] The third aspect embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the embodiments of the first aspect of the present application are implemented.
[0032] The fourth aspect embodiment of the present application provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method described in any one of the embodiments of the first aspect of the present application.
[0033] The technical solutions provided by the embodiments of the present application include at least the following beneficial effects:
[0034] An embodiment of the present application proposes an attendance method, a server of an attendance system, an electronic device and a storage medium, the method being applied to a server of an attendance system, the server being connected to a Bluetooth scanning device, the Bluetooth scanning device being set at a target location, the method comprising: obtaining a preliminary punch-in result based on a punch-in request sent by a target terminal, the punch-in request including the current location of the target terminal, and when the current location matches the target location, the preliminary punch-in result being a successful punch-in; obtaining a first scanning result from the Bluetooth scanning device, the first scanning result including identification information of at least one terminal scanned within a preset range of the target location; obtaining a target punch-in result of the target terminal based on the preliminary punch-in result and the first scanning result, obtaining a more accurate target punch-in result through the preliminary punch-in result and the scanning of the target terminal corresponding to the preliminary punch-in result by the Bluetooth scanning device, thereby further preventing false punch-ins. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of an application scenario of an attendance method proposed in an embodiment of the present application;
[0036] Figure 2 A flowchart of an attendance method proposed in an embodiment of the present application;
[0037] Figure 3 A flowchart of another attendance method proposed in an embodiment of the present application;
[0038] Figure 4 A flowchart of another attendance method proposed in an embodiment of the present application;
[0039] Figure 5 A flowchart of another attendance method proposed in an embodiment of the present application;
[0040] Figure 6 A flowchart of another attendance method proposed in an embodiment of the present application;
[0041] Figure 7 A flowchart of another attendance method proposed in an embodiment of the present application;
[0042] Figure 8 A flowchart of another attendance method proposed in an embodiment of the present application;
[0043] Figure 9 A schematic diagram of the structure of a server of an attendance system proposed in an embodiment of the present application;
[0044] Figure 10 A schematic diagram of the structure of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0046] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first instruction and the second instruction are intended to distinguish different user instructions and do not limit their order. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0047] It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0048] In addition, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0049] It should be noted that, in the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0050] With the gradual development of companies and technological advancements, clocking in and out methods have undergone significant changes. Traditional manual sign-ins or time clocks have gradually become obsolete. With the widespread adoption of mobile internet, mobile clocking has emerged, allowing employees to clock in anytime, anywhere via their mobile phones, further increasing work flexibility. Mobile clocking in includes geo-location clocking: using the GPS function of their mobile phone, employees can clock in and out from a designated location. This method improves clocking efficiency and enables real-time monitoring of employee attendance. However, employees are prone to false clocking in, clocking in for work, then being away from their workstations for an extended period, leaving get off work early and clocking out near the office. This creates the problem of false clocking in, and how to reduce false clocking in and out and improve the accuracy of attendance clocking in and out is a pressing issue.
[0051] The following is a detailed explanation of an application scenario example of the embodiment of the present application. For example, Figure 1 As shown, it includes: a target terminal 101, a server 102 of the attendance system and a Bluetooth scanning device 103.
[0052] For example, the target terminal 101 can be a mobile phone, computer, tablet, or other terminal device with positioning capabilities. The target terminal 101 (e.g., an employee's mobile phone) must have both GPS and Bluetooth enabled: GPS for initial location verification, and Bluetooth for continuous device identification broadcasting. When an employee joins the company, their terminal's unique identifier (MAC address / UUID) is bound to their employee ID and stored in the server database. When the Bluetooth scanning device 103 detects the terminal identifier, the server matches it with pre-stored information to obtain the employee's attendance record.
[0053] For example, the attendance system's server 102 is the core hub of the entire system, typically deployed in an enterprise's data center or cloud platform. It oversees the overall management of all attendance-related data flows and rule execution. The server receives and processes clock-in requests from target terminals 101 in real time via an API interface. The server pre-sets geofencing rules (such as the company's office coordinates and error radius). When an employee submits GPS location data via a target terminal 101, such as a mobile phone or tablet, the server first verifies whether it is within the preset range. If so, a Bluetooth scan verification process is triggered.
[0054] Exemplarily, Bluetooth scanning devices 103 are deployed at key locations, such as office entrances and workstations, to scan for identification information on terminal devices. Exemplary Bluetooth scanning devices include: Dedicated Bluetooth beacons (such as Estimote's iBeacon devices) periodically broadcast signals and scan surrounding terminals, accurately capturing the MAC addresses / UUIDs of employees' mobile phones or work badges; Industrial-grade IoT gateways integrate multi-protocol communication capabilities and can simultaneously manage dozens of Bluetooth sub-devices, suitable for wide-area coverage across multiple floors. The choice can be based on actual needs.
[0055] After understanding an application scenario of the embodiment of the present application, we will now introduce in detail the execution steps of an attendance method proposed in the embodiment of the present application in the system. The method is applied to the server of the attendance system, the server is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at the target location, such as Figure 2 As shown, the method includes the following steps:
[0056] Step 201: Obtain a preliminary check-in result according to a check-in request sent by a target terminal. The check-in request includes the current location of the target terminal. If the current location matches the target location, the preliminary check-in result is a successful check-in.
[0057] When a target terminal (such as a clock-in APP on an employee's mobile phone) initiates a clock-in request, the server obtains the real-time geographic location reported by the terminal (for example, through GPS or base station positioning) and compares it with the pre-stored target location.
[0058] For example, the target location can be the scanning range of the Bluetooth scanning device or the actual coordinates of the Bluetooth scanning device. For example, the current location is the actual coordinates of the target terminal. If the two match, a "preliminary check-in success" result is generated.
[0059] Exemplarily, the current position matches the target position: the coordinate distance between the Bluetooth scanning device and the terminal device may be within an allowable error range, the terminal device may be within the scanning range of the Bluetooth scanning device, or the scanning range between the terminal device and the Bluetooth scanning device may be within a preset error range.
[0060] This step is mainly used to verify whether the user is within the macro-geographical location required for attendance. However, relying solely on location information may lead to false clocking in, so further verification is required in conjunction with subsequent steps.
[0061] Step 202: Obtain a first scanning result from the Bluetooth scanning device, where the first scanning result includes identification information of at least one terminal scanned within a preset range of the target location.
[0062] The server is linked to a Bluetooth scanning device deployed at the target location (such as an office entrance). The Bluetooth scanning device continuously scans all Bluetooth-enabled terminals within its preset physical range (e.g., a radius of 5-10 meters) and records the scanned terminal identification information (such as MAC address, device unique code, etc.). The server obtains these scan results in real time or at regular intervals as the "first scan result" to confirm whether the target terminal is actually in the physical space near the attendance point. The short-range feature of Bluetooth scanning (usually less than 30 meters) effectively supplements the shortcomings of location verification and prevents remote forgery of clocking in.
[0063] For example, after the initial clock-in is successful, a start scanning command can be sent after a preset time to turn on the Bluetooth scanning device to scan the terminal, for example, starting the scan 10 minutes after the initial clock-in, or a start scanning command can be sent immediately to turn on the Bluetooth scanning device to scan the terminal.
[0064] For example, during the implementation process, when an employee completes the GPS clock-in through the mobile phone App, the system automatically triggers the Bluetooth function to turn on (the user must pre-authorize the Bluetooth permission), so that the device continues to broadcast the Bluetooth signal; the Bluetooth scanning device (such as iBeacon) deployed at the attendance point scans the surrounding terminals (mobile phones with Bluetooth turned on) at a preset scanning frequency or the scanning rules sent by the server (such as once every 5 seconds), and obtains the MAC address or unique broadcast identifier (such as UUID) of the target terminal through the Bluetooth protocol stack. The scanned device identification is then encrypted and uploaded to the server, and matched with the bound device information pre-entered when the employee joins the company (such as the employee's registered mobile phone MAC address is AA:BB:CC:DD:EE:FF). If they are consistent, it is associated with the employee's file to complete the dual verification of identity and device, ensuring that the attendance records accurately correspond to individual employees.
[0065] Step 203: Obtain a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result.
[0066] In this step, the server performs a comprehensive verification of the preliminary punch-in result and the first scan result:
[0067] If the location verification of the target terminal passes (the preliminary punch-in result in step 201 is successful punch-in) and the identification information of the target terminal exists in the Bluetooth scan list, that is, the first scan result scans the identification information of the target terminal, it is determined to be "target punch-in successful", confirming that the employee is actually on the job.
[0068] If the location verification passes but the Bluetooth identifier is not scanned (for example, the employee turns off Bluetooth or the device malfunctions), or the Bluetooth is scanned but the location does not match (for example, another floor in the same building is mistakenly scanned), exception processing is triggered (such as marking it as a suspicious punch-in, requiring secondary verification, or directly determining it as a failure).
[0069] The above technical solution, through the dual verification of "geolocation + near-field scanning," not only avoids the risk of false clocking in based solely on location data, but also prevents terminal scan omissions that may occur when scanning with only a Bluetooth scanning device. For example, if an employee uses virtual positioning to falsify their location, even if they pass the verification in step 201, the system will determine that their clocking in has failed because the Bluetooth scanning device does not detect the actual device. Employees who are actually at work but forget to turn on Bluetooth may receive a reminder message to the target terminal or trigger a manual review process. The above technical solution significantly improves the reliability of the attendance system and further enhances the accuracy of attendance clocking in.
[0070] Exemplarily, the first scanning result is obtained from the Bluetooth scanning device, such as Figure 3 As shown, the following steps are included:
[0071] Step 301: When a check-in request is received from the target terminal and the preliminary check-in result indicates a successful check-in, a start scanning instruction is sent to the Bluetooth scanning device.
[0072] The initial state of the Bluetooth scanning device can be off. When the server detects a successful clock-in, it triggers the Bluetooth scanning device to turn on by sending a start scanning instruction. This can avoid the problem of the Bluetooth device being in the on state all the time and increasing the power consumption of the Bluetooth device.
[0073] For example, the activation and operating mode of the Bluetooth scanning device are dynamically controlled by the server. When a target terminal (such as an employee's mobile phone) sends a clock-in request, the server first verifies whether its geographic location is within a preset target range (e.g., a 100-meter radius from the company address) using GPS or base station positioning. If the initial clock-in is successful, the server immediately or after a preset period of time sends a startup instruction containing scanning rules to the Bluetooth scanning device.
[0074] Exemplarily, the start scanning instruction further includes a scanning rule, where the scanning rule is used to indicate a scanning frequency and / or a scanning duration, so that the Bluetooth scanning device performs scanning according to the scanning rule.
[0075] Exemplarily, the scanning rule includes a scanning frequency or a scanning time, or both. The scanning instructions sent by the server control the content of the above scanning rule, which can improve the scanning flexibility of the Bluetooth scanning device.
[0076] Exemplarily, within a preset time period after the preliminary punch-in result indicates a successful punch-in, a higher scanning frequency can be adopted for scanning, or after the preliminary punch-in result indicates a successful punch-in, the Bluetooth scanning device is allowed to scan for a preset scanning duration, or after the preliminary punch-in result indicates a successful punch-in, the Bluetooth scanning device is allowed to scan at a preset scanning frequency for a preset scanning duration, and the scanning result obtained is the first scanning result.
[0077] For example, the scanning rule in the embodiment of the present application can be a dynamic scanning frequency rule by time period. According to the employee's work rhythm and the employee's punch-in intention, the whole day is divided into five stages, and corresponding Bluetooth scanning strategies are formulated to balance attendance accuracy, device power consumption and employee privacy:
[0078] Exemplarily, if the preliminary punch-in result indicates a successful punch-in, high-frequency scanning (for example, every 1-2 minutes) is used one hour after punching in for work. Intensive monitoring ensures that employees are actually at work and prevents cheating such as "leaving immediately after punching in". If the identification information of the target terminal is not detected for 15 consecutive minutes, an alarm is triggered; during regular working hours, medium-frequency scanning is switched to (for example, every 5 minutes). While maintaining basic on-the-job monitoring, the energy consumption of the equipment is reduced, and a single absence from the post of no more than 30 minutes is allowed without being judged as an abnormality; exemplarily, the lunch break is further adjusted to low-frequency scanning (for example, every 15 minutes) to reduce interference with employees' free activities (such as eating and walking), and no abnormality is still marked even if there is no signal for 60 consecutive minutes; high-frequency scanning is re-enabled one hour before leaving get off work (every 2 minutes), focusing on preventing employees from "leaving work early", and an abnormality record is triggered if there is no signal for 15 minutes; a lower scanning frequency is used after leaving get off work to ensure that there is no problem of employees punching in at two terminals when leaving the company. If the target terminal is not scanned, the scanning function of the Bluetooth scanning device is turned off to avoid privacy disputes caused by continuous monitoring during non-working hours.
[0079] For example, if an employee needs to go out on business, he / she submits an out-of-state application (including time range, out-of-state location, and reason) through the Attendance App. After approval, the system automatically performs the following adjustments: turns off Bluetooth scanning monitoring during the out-of-state time period (if the employee is out-of-state all day, Bluetooth verification is completely disabled).
[0080] The above technical solution, by dynamically adjusting scanning rules, not only achieves strict supervision during critical periods, but also gives employees reasonable flexibility, while significantly extending the battery life of Bluetooth devices.
[0081] Step 302: Receive the first scanning result from the Bluetooth scanning device.
[0082] After the Bluetooth scanning device completes the scan according to the scanning rules, it summarizes the obtained terminal identification information (such as MAC address) as the "first scan result" and transmits it back to the server via a wireless network (such as Wi-Fi or 4G).
[0083] In the embodiment of the present application, steps 401 and 402 further refine the attendance rules. By introducing the judgment logic of punching intention (going to work or leaving get off work), the system can distinguish the verification requirements in different scenarios, thereby improving the rationality of the attendance results.
[0084] In some possible embodiments, such as Figure 4 As shown, the method further includes the following steps:
[0085] Step 401: Get the punch-in intention.
[0086] For example, the punch-in intention includes clocking in or clocking out. When a target terminal (such as an employee's mobile phone) initiates a punch-in request, the system needs to identify the user's operation intention.
[0087] For example, the intention to clock in can be actively selected by the user in the user interface (e.g., clicking the "Clock in" or "Clock out" button), or it can be automatically inferred by the system based on time rules (e.g., presetting the start time to 9:00 and the end time to 18:00). The core purpose of this step is to distinguish attendance scenarios and adopt different scanning rules in different attendance scenarios.
[0088] For example, in a clock-in scenario, it is necessary to verify whether the employee has actually arrived at the office. In this case, the system needs to confirm that the employee is within the target location range (using GPS / base station positioning) and that their target device is in the near-field environment of the office area (can be scanned by a Bluetooth scanning device).
[0089] For example, after an employee clocks in, the server sends a start scanning instruction to a Bluetooth scanning device. The Bluetooth scanning device scans the terminal, obtains a list of identification information of the terminal, collects statistics on it, and records it.
[0090] For example, after an employee clocks in, the mobile clock-in app can also automatically and periodically scan via Bluetooth. After the Bluetooth scanning device in the office area receives the identification information of the target terminal, it will count and record it.
[0091] For example, if it is found that the Bluetooth scanning device cannot scan the corresponding target terminal for a long time after the employee punches in, the employee is suspected of skipping work.
[0092] If it is a clock-out scenario, it is necessary to verify whether the employee has left the office. In this case, the system needs to confirm that the employee is still within the company's geographical range (to avoid premature remote clock-in), but the Bluetooth scan should not detect the target terminal.
[0093] Obtaining a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result includes:
[0094] Step 402: Obtain a target punch-in result of the target terminal according to the punch-in intention, the preliminary punch-in result, and the first scanning result.
[0095] After the punch-in intention is clear, the system will combine the preliminary positioning result with the first scanning result to obtain the target punch-in result of the target terminal.
[0096] Wherein, when the punching intention is to punch in for work, the preliminary punching result indicates successful punching in for work, and the first scanning result includes the identification information of the target terminal, the target punching result is successful punching in for work.
[0097] When the punching intention is to punch out, the preliminary punching result indicates a successful punching out, and the first scanning result does not include the identification information of the target terminal, the target punching result is a successful punching out.
[0098] For example, Figure 5 The present invention is a schematic flow chart of how a server of an attendance system obtains attendance information when the punching intention is to punch in for work.
[0099] Step 501: Receive a clock-in request sent by the target terminal.
[0100] Step 502: Determine whether the current location of the target terminal matches the target location.
[0101] If the current location of the target terminal does not match the target location, step 503 is executed; if the current location of the target terminal matches the target location, step 503 is executed.
[0102] Step 503: Prompt that the initial clock-in failed.
[0103] For example, the initial clock-in failure may be because the employee is not within the clock-in range, and the clock-in request will not be recorded. The initial clock-in failure may also be because the employee's device does not have positioning turned on. In this case, a prompt message can be output to ask the employee to clock in again.
[0104] Step 504: Send a start scanning instruction to the Bluetooth scanning device.
[0105] Step 505: Receive the first scanning result from the Bluetooth scanning device.
[0106] Step 506: Determine whether the first scanning result includes the target terminal.
[0107] If the first scanning result includes the target terminal, step 507 is executed, and the target punching result is a successful clocking in; if the first scanning result does not include the target terminal, step 508 is executed, and the target punching result is a failed clocking in.
[0108] In the scenario of clocking in for work, the initial clocking in is successful. The identification information list of all terminals scanned by the Bluetooth scanning device contains the identification information of the target terminal, which can further confirm that the employee corresponding to the target terminal has entered the company's preset attendance range and confirms that the employee is on duty. Therefore, the target clocking in result is a successful clocking in.
[0109] For example, when an employee goes to work, the target terminal (the employee's mobile phone) is located by GPS. At the same time, the Bluetooth scanning device in the office starts working, and the employee's BT MAC address in the database is put into a temporary map. Subsequently, a unified Bluetooth scan is performed at regular intervals, and the MAC address stored in the map is matched to confirm whether the device can be scanned every time.
[0110] For example, Figure 6 The present invention is a schematic flow chart of how a server of an attendance system obtains attendance information when the punch-in intention is to punch-in and out.
[0111] Step 601: Receive a clock-out request sent by the target terminal.
[0112] Step 602: Determine whether the current location of the target terminal matches the target location.
[0113] Step 603: Prompt that the initial clock-in failed.
[0114] In the scenario of clocking in after get off work, if the initial clocking in fails, the user will be prompted to check the reason for the failure and perform further clocking in. If the initial clocking in fails all the time, the user can also complete the preliminary clocking in by obtaining the first scan result of the Bluetooth scanning device in the target time period (the target time period is the time period after successfully clocking in to work), and uploading the matching result of the first scan result and the target terminal in the target time period to the clocking in APP of the target terminal.
[0115] Step 604: Send a start scanning instruction to the Bluetooth scanning device.
[0116] Step 605: Receive the first scanning result from the Bluetooth scanning device.
[0117] Step 606: Determine whether the first scanning result includes the target terminal.
[0118] If the first scanning result includes the target terminal, step 608 is executed, and the target punching result is failure to punch out. If the first scanning result does not include the target terminal, step 607 is executed, and the target punching result is success to punch out.
[0119] In the clock-out scenario, if the initial clock-in is successful, the target terminal's identification information should not be included in the list of all terminals scanned by the Bluetooth scanning device. After the employee leaves their post, if the employee's target terminal is still within the company's preset attendance range, there is a possibility of a false clock-in, for example, using two terminals to perform a false clock-in. This further confirms that the employee corresponding to the target terminal has left the company and that the employee has left work, so the target clock-in result is a successful clock-out.
[0120] For example, after an employee punches out of get off work, a less frequent scan is performed. If the target terminal cannot be scanned, it means that the employee did not use two devices to perform a false clocking in. The target terminal is removed from the map stored in the upper layer until the next time the employee punches in, and the attendance server sends the identification information of the target terminal to the Bluetooth scanning device again.
[0121] It should be understood that Figure 5 and Figure 6 The relevant steps have been explained in detail in the context of the embodiments of this application and will not be repeated here.
[0122] After completing the clock-in verification, the embodiment of the present application further realizes the continuous monitoring of the on-the-job status and the quantitative evaluation of attendance, such as Figure 7-Figure 8 The detailed steps are as follows.
[0123] Exemplarily, after obtaining the target check-in result of the target terminal according to the preliminary check-in result and the first scanning result, Figure 7 As shown, the method further includes:
[0124] Step 701: When the target clock-in result indicates a successful clock-in, a plurality of second scanning results within a target time period are obtained from the Bluetooth scanning device, where the target time period is a time period after a successful clock-in.
[0125] When the target terminal (such as an employee's mobile phone) is determined to have "successfully clocked in", the system starts tracking the employee's on-the-job time. The server continuously obtains scan results from the Bluetooth scanning device for the employee's area (such as the company's attendance range). These results are called "second scan results" and their data features include:
[0126] For example, the target time period is usually the interval from the time of successfully clocking in to work to the preset time of leaving get off work (such as 17:30) or the time when the employee actually initiates the clocking out.
[0127] Example: If an employee clocks in at 9:00 and their default end time is 18:00, the target time period is 9:00-18:00.
[0128] Exemplarily, the Bluetooth scanning device obtains a start scanning instruction sent by the server, where the start scanning instruction includes a scanning frequency.
[0129] The Bluetooth scanning device scans and reports the results according to the received scanning frequency (eg, once every 5 minutes), forming a terminal list at multiple time points as the second scanning result.
[0130] Step 702: Determine the on-the-job hours of the employee corresponding to the target terminal based on the multiple second scanning results.
[0131] The system converts the data of the second scanning result into on-the-job time through the following sub-steps.
[0132] Exemplarily, the on-the-job time of the employee corresponding to the target terminal is determined based on the second scanning result, such as Figure 8 As shown, the method includes the following steps:
[0133] Step 801: When the plurality of second scanning results all include identification information of the target terminal, the on-duty time is the preset on-duty time.
[0134] For example, in an ideal situation, if all second scan results within the target time period contain the employee's identification information (e.g., the MAC address persists), then it is determined that the employee was on duty during the target time period. For example, the on-duty time period is directly equal to the preset on-duty time period (e.g., 9 hours).
[0135] Exemplarily, the preset on-duty time can also be from successfully clocking in to the preset off-duty time, or from successfully clocking in to the first preset time (such as 12 o'clock for lunch break), the second preset time (such as 1:30 or 2 o'clock after lunch break) to the preset off-duty time. During the first preset time to the second preset time, that is, the lunch break period, the server sends a stop scanning instruction, which not only reduces the power consumption of the Bluetooth scanning device, but also more accurately counts the on-duty time of employees during actual working hours.
[0136] Step 802: When any target second scanning result among the plurality of second scanning results does not include identification information of the target terminal, obtain the number of the target second scanning results.
[0137] If an employee's device identification information is not found in any scan result, it is recorded as an absence event. The system iterates through all scan results and counts the number of missing identification information. For example, if an employee's device is not detected in six scans between 2:00 PM and 2:30 PM (one every five minutes), this indicates that the employee may have been away from their workstation for half an hour.
[0138] Step 803: Obtain the off-duty duration according to the number of second scanning results of the target and the scanning frequency, where the on-duty duration is the difference between the preset on-duty duration and the off-duty duration.
[0139] When the system detects that a second scan result does not contain the target device's identification information, the scan is marked as an "off-duty event." The number of off-duty events is the total number of target second scan results that did not detect the target device's identification information during the target time period. For example, if a Bluetooth scanning device performs a scan every 5 minutes (a scan frequency of 1 time / 5 minutes), and an employee fails to detect their target device in three scans between 10:00 AM and 11:00 AM, the number of off-duty events is 3.
[0140] For example, in the embodiment of the present application, the actual time away from work can be quantified based on the number of times away from work and the scanning frequency.
[0141] For example, the calculation formula may be:
[0142] Time off duty = number of times off duty × scanning interval. (1)
[0143] The scanning interval is the time interval between two consecutive scans, which is obtained by the scanning frequency and is the reciprocal of the scanning frequency. For example, if the scanning frequency is 1 time / 5 minutes, the scanning interval is 5 minutes.
[0144] For example, in order to reduce misjudgments (such as brief signal interruptions), the system can introduce a fault-tolerant mechanism - the absence time is only counted when the device is not detected for 2 or more consecutive scans.
[0145] For example, the fault-tolerance mechanism of the consecutive absence threshold is introduced into the attendance system to solve the problem of misjudgment caused by short-term fluctuations in Bluetooth signals, occasional device disconnection, or temporary movement of employees. The following is an explanation of the implementation logic and effect of this mechanism:
[0146] When analyzing the second scan results, the system will dynamically track the status of each time the target device is not detected:
[0147] For example, in the first case, if a target device is not detected once, the system will only record it as a "temporary absence" event, but will not count it towards the absence time. At this point, the system will start a continuous absence counter with an initial value of 1.
[0148] For example, in the second case: if the device is not detected continuously and the next scan still does not find the device, the counter increases to 2, triggering the fault tolerance threshold (preset to 2 consecutive times), the system determines that the employee has entered an effective off-duty state and starts to accumulate the off-duty time.
[0149] For example, if a device is detected again during a continuous counting process, the counter is immediately reset to 0, and a single scan or interruption that did not reach the threshold before is not counted in the off-duty time.
[0150] When the continuous absence conditions are met, the system calculates the actual absence time using formula (1).
[0151] Through this fault-tolerant mechanism, the attendance system finds a balance between technical stability and management rationality, avoiding employee resistance caused by "strict monitoring" while effectively identifying abnormal off-duty behavior.
[0152] Step 703: Obtain the attendance of the employee corresponding to the target terminal according to the preset on-the-job hours corresponding to the on-the-job hours and the target time period.
[0153] The system compares the calculated actual on-the-job time with the preset on-the-job time and generates the attendance result:
[0154] Exemplarily, the attendance compliance determination condition may be: if the actual on-the-job time reaches more than 95% of the preset on-the-job time (e.g., if the target time period is 9 hours, the actual on-the-job time must reach 8 hours and 33 minutes), it is marked as normal attendance.
[0155] Exemplarily, the server of the attendance system establishes a communication connection with the personnel management system, and the method further includes:
[0156] When the on-the-job time is less than the preset on-the-job time, an attendance abnormality prompt is sent to the personnel management system.
[0157] Exemplarily, the abnormal handling of attendance includes: if the on-the-job time is less than the preset on-the-job time, the system automatically marks it as "missing working hours", sends an attendance abnormality prompt to the personnel management system, and triggers the processing rules. For example, if an employee is actually on the job for 8 hours, and the company stipulates a minimum of 8.5 hours, the system will generate an absence record and notify the administrator. At the same time, frequent short-term absences (such as more than 1 time per hour) may be marked as "abnormal behavior" for further verification by the administrator of the personnel management system. In addition, the system can generate an off-the-job time distribution map in combination with the timestamp to help analyze the work patterns of employees (for example, whether it is reasonable to leave the job in batches during lunch breaks).
[0158] For example, a dynamic monitoring mechanism can also be used to effectively respond to abnormalities in the target terminal: if an employee's mobile phone Bluetooth failure causes continuous off-duty marking, the system can automatically switch to an alternative verification method (such as a Wi-Fi probe) to ensure data integrity.
[0159] For example, an early warning message may be output when attendance is abnormal, and when the early warning reaches a certain level, it may be sent to the personnel management system for further processing.
[0160] Exemplarily, the attendance system of the embodiment of the present application may also adopt a hierarchical warning mechanism to dynamically determine the employee's on-the-job status through Bluetooth signal monitoring and trigger an automated processing flow, as follows: including primary warning, intermediate warning and advanced warning.
[0161] For example, the primary alert targets short-term signal loss scenarios. If the system detects that an employee's device has been without the target terminal's identification information for 30 minutes, it automatically pushes a notification via the app or text message to remind the employee to confirm their presence (for example, "We've detected that you may be away from work. Please return to your workstation immediately or click to confirm your presence"). This phase primarily uses flexible reminders to avoid misjudgments due to temporary device failures or signal interference.
[0162] For example, the intermediate warning is upgraded to the management intervention level. If the employee's device has no signal within 1 hour and does not respond to the primary warning (such as not clicking to confirm or not returning to the scanning range), the system will automatically mark this attendance as abnormal and push the abnormality details (including the time period of absence from work and the positioning trajectory) to the employee personnel management system, triggering a manual verification process (such as the supervisor / HR phone confirmation of the actual work situation).
[0163] For example, the advanced warning targets serious violations. When an employee triggers two or more intermediate warnings in a single day, or the signal of the target terminal is offline all day (such as a combination of early leave and absenteeism), the system will directly generate an absence record and link it to the personnel management system to automatically execute the preset management strategy (such as deducting wages according to the length of absence and sending a written warning letter).
[0164] This technical solution ensures the accuracy of attendance data while also allowing for margins for temporary employee absences (such as meetings, restroom breaks, and other short periods of absence). It also significantly reduces manual inspection costs through automated processes. For example, if an employee's device runs out of battery and they're offline for the entire day, the system will skip the primary alert and trigger a higher-level alert. However, the personnel management system administrator can manually correct the record based on the employee's submitted paper leave request, thus achieving a balance between rigid rules and flexible management.
[0165] It should be understood that although Figure 2-8 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-8 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0166] In some embodiments, as Figure 9 As shown, a server of an attendance system is provided, the server is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at a target location. The server includes: a preliminary punching module 901, a scanning module 902 and a processing module 903, wherein:
[0167] A preliminary check-in module 901 is configured to obtain a preliminary check-in result based on a check-in request sent by a target terminal. The check-in request includes the current location of the target terminal. If the current location matches the target location, the preliminary check-in result is a successful check-in.
[0168] A scanning module 902 is configured to obtain a first scanning result from the Bluetooth scanning device, where the first scanning result includes identification information of at least one terminal scanned within a preset range of the target location;
[0169] The processing module 903 is configured to obtain a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result.
[0170] Further definitions of the various modules of the attendance system's server can be found in the aforementioned definitions of the attendance method and will not be repeated here. Each module in the attendance system's server can be implemented in whole or in part via software, hardware, or a combination thereof. Each of these modules can be embedded in or independent of a processor in a terminal device in hardware form, or stored in a memory in the terminal device as software, allowing the processor to call and execute operations corresponding to each of these modules.
[0171] Another embodiment provides a computer-readable storage medium for storing a computer program. This computer program includes instructions for implementing the methods described in the embodiments of this application. By installing this computer program on a computer, the computer can execute the corresponding method.
[0172] Another embodiment provides a computer program product that includes computer program code. When the computer program code is executed on a computer, it causes the computer to implement the method provided in the embodiment of the present application. In this way, a user can achieve the method by using this computer program product.
[0173] For example, Figure 10 1 is a schematic block diagram of an electronic device provided by an embodiment of the present application. The electronic device 1000 may include: a memory 1001 storing executable program code and a processor 1002 coupled to the memory 1001.
[0174] The processor 1002 calls the executable program code stored in the memory to execute any one of the methods disclosed in the embodiments of the present application. Those skilled in the art will understand that Figure 10 The electronic device structure shown in the figure does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0175] Processor 1002 is the control center of the electronic device. It connects the various parts of the entire electronic device using various interfaces and lines. By running or executing software programs and / or modules stored in memory and accessing data stored in memory, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor.
[0176] The memory 1001 can be used to store software programs and modules. The processor executes the various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the electronic device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state memory device.
[0177] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0178] During implementation, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor executes the instructions in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.
[0179] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.
[0180] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0181] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0182] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0183] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0184] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0185] The above description is merely a specific implementation of the embodiments of the present application, but the scope of protection of the embodiments of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the embodiments of the present application should be included in the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the embodiments of the present application should be based on the scope of protection of the claims.
Claims
1. A method for checking attendance, characterized in that: A server applied to an attendance system is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at a target location. The method includes: Obtaining a preliminary check-in result according to a check-in request sent by a target terminal, wherein the check-in request includes a current location of the target terminal. If the current location matches the target location, the preliminary check-in result is a successful check-in; Obtaining a first scanning result from the Bluetooth scanning device, the first scanning result including identification information of at least one terminal scanned within a preset range of the target location; A target punch-in result of the target terminal is obtained according to the preliminary punch-in result and the first scanning result.
2. The method according to claim 1, characterized in that The obtaining a first scanning result from the Bluetooth scanning device includes: When receiving the clock-in request sent by the target terminal and the preliminary clock-in result indicates successful clock-in, sending a start scanning instruction to the Bluetooth scanning device; The first scanning result is received from the Bluetooth scanning device.
3. The method according to claim 2, characterized in that The start scanning instruction further includes a scanning rule, where the scanning rule is used to indicate a scanning frequency and / or a scanning duration, so that the Bluetooth scanning device performs scanning according to the scanning rule.
4. The method according to claim 1, wherein The method further comprises: Obtaining a punch-in intention, where the punch-in intention includes clocking in for work or clocking out for get off work; Obtaining a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result includes: Obtaining a target punch-in result of the target terminal according to the punch-in intention, the preliminary punch-in result, and the first scanning result; Wherein, if the punching intention is to punch in for work, the preliminary punching result indicates successful punching in for work, and the first scanning result includes the identification information of the target terminal, the target punching result is successful punching in for work; When the punching intention is to punch out, the preliminary punching result indicates a successful punching out, and the first scanning result does not include the identification information of the target terminal, the target punching result is a successful punching out.
5. The method according to claim 4, characterized in that After obtaining a target check-in result of the target terminal according to the preliminary check-in result and the first scanning result, the method further includes: If the target clock-in result indicates a successful clock-in, obtaining a plurality of second scan results within a target time period from the Bluetooth scanning device, the target time period being a time period after the successful clock-in; Determining, based on the multiple second scanning results, the on-the-job hours of the employee corresponding to the target terminal; The attendance of the employee corresponding to the target terminal is obtained according to the preset on-the-job time corresponding to the on-the-job time and the target time period.
6. The method according to claim 5, characterized in that Determining the on-the-job hours of the employee corresponding to the target terminal according to the second scanning result includes: In a case where the plurality of second scanning results all include identification information of the target terminal, the on-duty time is the preset on-duty time; In the case that any target second scan result among the multiple second scan results does not include the identification information of the target terminal, the number of target second scan results is obtained, and the off-duty time is obtained based on the number of target second scan results and the scanning frequency. The on-duty time is the difference between the preset on-duty time and the off-duty time.
7. The method according to claim 5, characterized in that The server of the attendance system establishes a communication connection with the personnel management system, and the method further includes: When the on-the-job time is less than the preset on-the-job time, an attendance abnormality prompt is sent to the personnel management system.
8. A server for an attendance system, characterized in that: The server is connected to a Bluetooth scanning device, and the Bluetooth scanning device is set at a target location. The server includes: A preliminary clocking-in module, configured to obtain a preliminary clocking-in result based on a clocking-in request sent by a target terminal, wherein the clocking-in request includes the current location of the target terminal. If the current location matches the target location, the preliminary clocking-in result is a successful clocking-in; a scanning module, configured to obtain a first scanning result from the Bluetooth scanning device, wherein the first scanning result includes identification information of at least one terminal scanned within a preset range of the target location; A processing module is used to obtain a target punch-in result of the target terminal according to the preliminary punch-in result and the first scanning result.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that Computer instructions are stored, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Attendance checking data management method, device and equipment and storage medium
CN117635086A