Attendance method, device and terminal based on compass, pedometer and GPS

By combining GPS, compass, and pedometer positioning methods with facial recognition verification, the problem of positioning errors in construction site attendance has been solved, achieving accuracy and reliability in construction site attendance.

CN117490684BActive Publication Date: 2026-06-02JINQIANMAO TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINQIANMAO TECH CO LTD
Filing Date
2022-08-29
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing construction site attendance methods, the positioning of safety helmets is prone to deviation in complex environments, leading to inaccurate attendance records.

Method used

The system employs a positioning method that combines GPS and a compass with a pedometer. It receives the positioning information from the safety helmet at regular intervals and determines whether the difference between the two positioning results is less than a preset value. If it is less, it is recorded as attendance positioning information and combined with facial recognition for identity verification.

Benefits of technology

It improves the accuracy and reliability of site attendance, avoids positioning errors caused by complex environments, and ensures the accuracy and reliability of attendance data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117490684B_ABST
    Figure CN117490684B_ABST
Patent Text Reader

Abstract

The application discloses a kind of attendance method, device and terminal based on compass, pedometer and GPS, first positioning information determined based on GPS sent by safety helmet is received in time, and second positioning information determined based on compass and pedometer;First positioning result determined based on GPS is determined according to first positioning information, and second positioning result determined based on compass and pedometer is determined according to second positioning information;Whether the difference between the first positioning result and second positioning result is less than the first preset value is judged, if yes, the first positioning information is recorded as attendance positioning information;When the staff of construction site is attended, attendance positioning is realized by means of safety helmet, and the positioning of safety helmet is realized using two ways, and the positioning mode based on GPS is convenient and fast, and the positioning mode based on compass and pedometer is accurate and universal, and is very suitable for complex environment such as construction site.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This case is a divisional application of the patent application with application number 202211040272.5, application date 2022-08-29, entitled "An attendance method, device and terminal based on safety helmet positioning". Technical Field

[0002] This invention relates to the field of construction site attendance tracking, and more particularly to an attendance tracking method, device, and terminal based on a compass, pedometer, and GPS. Background Technology

[0003] Currently, the most common attendance tracking method at construction sites is for workers to enter and leave using fingerprint or facial recognition through turnstiles. However, due to the complex environment of construction sites, there are limitations to using open-style turnstiles for attendance tracking; it cannot be guaranteed that all workers will pass through the turnstiles. Furthermore, since construction sites typically involve tasks like carrying and laying bricks, workers' hands are usually covered in dirt, which reduces the success rate of fingerprint recognition.

[0004] To address the aforementioned issues, given that construction workers are required to wear safety helmets, existing construction site attendance systems utilize helmet location tracking. This involves establishing an area within an electronic fence as the attendance zone, and then using the helmet's location information to determine if a worker is within this zone. However, this method is susceptible to errors when the helmet is at the edge of the electronic fence. Complex construction site environments (such as obstructions or underground locations) can cause inaccuracies in the helmet's location information, leading to misjudgments of worker entry and exit from the fence and ultimately, inaccurate attendance tracking. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide an attendance method, device and terminal based on safety helmet positioning, which can improve the accuracy of attendance.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0007] An attendance method based on helmet positioning includes the following steps:

[0008] S1. Periodically receive first location information determined by GPS and second location information determined by compass and pedometer from the safety helmet;

[0009] S2. Determine a first positioning result based on GPS according to the first positioning information, and determine a second positioning result based on compass and pedometer according to the second positioning information;

[0010] S3. Determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, record the first positioning information as attendance positioning information.

[0011] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:

[0012] An attendance device based on helmet positioning includes:

[0013] The receiving module is used to periodically receive the first positioning information determined by GPS and the second positioning information determined by a compass and a pedometer sent by the safety helmet;

[0014] The determining module is used to determine a first positioning result based on GPS based on the first positioning information, and to determine a second positioning result based on a compass and a pedometer based on the second positioning information.

[0015] The judgment module is used to determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, the first positioning information is recorded as attendance positioning information.

[0016] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:

[0017] A helmet-based attendance terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the helmet-based attendance method described above.

[0018] The beneficial effects of this invention are as follows: When taking attendance of workers on construction sites, attendance location is achieved by means of safety helmets, and two methods are used to locate the safety helmets: one is based on GPS, and the other is based on a compass and pedometer. The GPS-based positioning method is convenient and fast, while the compass and pedometer-based positioning method is accurate and universal, not limited by the environment, and is very suitable for complex environments such as construction sites. Therefore, by combining the two positioning methods, accurate location of attendance personnel can be achieved, thereby ensuring the accuracy of attendance on construction sites. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the steps of an attendance method based on helmet positioning according to an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the structure of an attendance device based on safety helmet positioning according to an embodiment of the present invention;

[0021] Figure 3This is a schematic diagram of the structure of an attendance terminal based on safety helmet positioning according to an embodiment of the present invention;

[0022] Figure 4 This is a detailed flowchart of an attendance method based on safety helmet positioning according to an embodiment of the present invention;

[0023] Figure 5 This is a motion diagram illustrating the use of a pedometer and compass for positioning in an attendance method based on helmet positioning according to an embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of a coordinate system established based on a safety helmet in an attendance method based on safety helmet positioning according to an embodiment of the present invention;

[0025] Figure 7 This is a schematic diagram illustrating the transformation of coordinate systems of two positioning methods to the same coordinate system in an attendance method based on safety helmet positioning according to an embodiment of the present invention.

[0026] Figure 8 This is a schematic diagram of the worker movement trajectory using two positioning methods in an attendance method based on safety helmet positioning according to an embodiment of the present invention.

[0027] Figure 9 This is a schematic diagram illustrating the positioning based on a compass and pedometer in an attendance method based on helmet positioning according to an embodiment of the present invention.

[0028] Figure 10 This is a schematic diagram of the origin search logic based on GPS positioning in an attendance method based on safety helmet positioning according to an embodiment of the present invention.

[0029] Figure 11 This is a schematic diagram of the coordinate system in which the displacement record after positioning transformation based on compass + pedometer is located in an attendance method based on safety helmet positioning according to an embodiment of the present invention.

[0030] Figure 12 This is a schematic diagram of the coordinate system in which the displacement record after positioning transformation based on GPS is located in an attendance method based on safety helmet positioning according to an embodiment of the present invention.

[0031] Figure 13 This is a schematic diagram of an attendance system based on helmet positioning according to an embodiment of the present invention. Detailed Implementation

[0032] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0033] The attendance method, device, and terminal based on safety helmet positioning described above are applicable to complex environments, such as construction sites. The following detailed implementation methods illustrate these methods:

[0034] In one alternative implementation, such as Figure 1 As shown, an attendance method based on helmet positioning is described in this embodiment from the perspective of the registration server, specifically including the following steps:

[0035] S1. Receive the first location information determined by GPS and the second location information determined by compass and pedometer sent by the safety helmet at regular intervals. The period interval for the safety helmet to report the information can be configured remotely, such as triggering a timed data reporting task once every 30 minutes. This period interval can be flexibly set according to the specific application scenario.

[0036] S2. Determine a first positioning result based on GPS according to the first positioning information, and determine a second positioning result based on compass and pedometer according to the second positioning information;

[0037] S3. Determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, record the first positioning information as attendance positioning information.

[0038] The step preceding step S1 includes:

[0039] Receive a registration request sent by a safety helmet. The registration request includes a safety helmet identifier, a safety helmet wearer identifier, and a facial photo of the safety helmet wearer. The safety helmet identifier may be, for example, a device serial number, and the safety helmet wearer identifier may be, for example, an ID card.

[0040] The registration request is used to bind the safety helmet identifier, the safety helmet wearer identifier, and the face photo of the safety helmet wearer, and the corresponding binding relationship is stored.

[0041] Based on the binding relationship, the facial photo of the helmet wearer is sent to the helmet corresponding to the helmet identifier;

[0042] The first and second location information received are sent by the safety helmet after comparing the self-taken photo of the helmet wearer with the received facial photo of the helmet wearer. After receiving the facial photo of the helmet wearer sent by the registration server, before reporting the location data to the registration server, the safety helmet first takes a photo of the wearer's face using the self-taken device, and then compares the captured facial photo with the facial photo received from the registration server. If they match, the location data is reported; otherwise, an error is prompted, such as by emitting a beeping sound, and the reporting of location data is terminated. At the same time, the helmet waits for the next reporting cycle to arrive and re-comparison and authentication.

[0043] In the above implementation, facial recognition is used to achieve timed identity recognition and then report location data. More accurate attendance is achieved through facial recognition and timed location triggering. Since it does not rely on fingerprint recognition, it can avoid the problem of attendance recognition difficulties caused by dirt and other stains. Furthermore, due to the presence of facial authentication, it can prevent fraud and also standardize the wearing of safety helmets by workers.

[0044] S1 further includes the following steps:

[0045] Receive the helmet identifier sent by the helmet;

[0046] Based on the safety helmet logo, determine whether there is a binding relationship corresponding to the safety helmet logo. If there is, send the attendance location information to the application server; if not, discard the location data, terminate the subsequent process, and return to S1.

[0047] When receiving the location data reported by the safety helmet, the system also receives the safety helmet identifier sent by the safety helmet. Before forwarding the location data reported by the safety helmet, it first determines whether there is a binding relationship corresponding to the safety helmet identifier. If there is, it means that the safety helmet has been registered and verified. Therefore, the corresponding attendance location information is sent to the application server. Through the cooperation of the safety helmet and the registration server, the most important and reliable attendance location information is finally sent to the application server for subsequent attendance work, which greatly facilitates the automatic and timely collection of attendance information on the construction site while ensuring the reliability of the attendance information.

[0048] The attendance location information also includes the location time, that is, the time when the safety helmet performs the corresponding location. Each location information has a corresponding location time.

[0049] It also includes the following steps:

[0050] Receive an attendance rule setting request, set attendance rules according to the attendance rule setting request, the attendance rules include attendance area and attendance time period, the area can be defined by configuring the latitude and longitude coordinates of at least three points as the attendance area, when the location data is not within the area range, it is considered to have left the premises, and vice versa, when the location data is within the area range, it is considered to have entered the premises;

[0051] The attendance rules are sent to the application server, so that the application server determines the attendance information based on the attendance rules and the attendance location information;

[0052] Attendance rules can be received and forwarded to the application server through the registration server, or they can be set directly on the application server. Flexible settings of attendance rules can improve the flexibility of attendance tracking. Attendance rules can be configured according to the actual application scenario requirements to achieve convenient and flexible attendance statistics.

[0053] like Figure 4 The diagram shown is a detailed flowchart of one implementation of the helmet-based attendance method:

[0054] Configure the required attendance rules in advance on the application server;

[0055] The registration server pre-enters a unique identifier for the safety helmet, a unique identifier for the person, and a facial photo;

[0056] The registration server binds the unique identifier of the safety helmet with the unique identifier of the person and the facial photo;

[0057] The registration server will configure the facial information of the registered personnel onto the corresponding safety helmet;

[0058] The safety helmet periodically transmits location data to the registration server;

[0059] Before reporting location data, the safety helmet first performs facial authentication, comparing the current wearer's facial information with the pre-configured face. If the safety helmet's facial authentication determines that they are inconsistent, it will sound a beep, then terminate the subsequent reporting action and wait for the next reporting cycle to arrive for re-authentication.

[0060] After receiving the reported location data, the communication server performs protocol parsing and re-encapsulates the parsed data before forwarding it to the registration server.

[0061] The registration server filters the location data and forwards the filtered location data to the application server. Specifically, it determines whether the unique identifier of the reported safety helmet is stored in the binding relationship stored on the registration server. If it exists, the corresponding location data is forwarded to the application server. If it does not exist, the corresponding location data is deleted, and the step of periodically transmitting location data to the registration server is returned.

[0062] The application server receives and stores location data, and calculates attendance information according to attendance rules.

[0063] In another alternative implementation, S1 includes:

[0064] It periodically receives the first location information determined by GPS from the safety helmet;

[0065] Obtain the range of the electronic fence, and determine the distance between the current location of the safety helmet and the boundary of the electronic fence based on the range of the electronic fence and the currently received first positioning information;

[0066] Determine whether the distance is less than a preset distance threshold. If not, directly record the currently received first positioning information as attendance positioning information. Otherwise, periodically receive the second positioning information sent by the safety helmet based on the compass and pedometer.

[0067] By determining the distance between the GPS positioning information acquired periodically and the boundary of the attendance area (i.e., the electronic fence) used for attendance tracking, it is determined whether the safety helmet is at the boundary of the attendance area. This determines whether to trigger the combination of the two positioning methods to determine the attendance positioning information, avoiding the problem of high power consumption caused by using the combination of the two positioning methods in locations where GPS is not prone to deviation.

[0068] To further ensure the accuracy of the above judgment results, it can be set that the background will send an instruction to trigger the safety helmet to use GPS positioning to achieve attendance positioning only when the distance between a number of consecutive preset GPS positioning points and the boundary exceeds a specified threshold. Since workers on the construction site are in motion, as the workers move, the positioning at the previous moment may not be at the edge of the attendance area, but at the next moment it may be at the edge of the attendance area. Therefore, by examining the attendance data over a period of time, it is possible to more accurately determine whether the worker is at the edge of the attendance area.

[0069] In another alternative implementation, a step is further included between S1 and S2:

[0070] Based on time alignment of the first and second location information, one location information can be used as a basis to find another location information whose corresponding location time is closest to that of the other location information, and this other location information can be used as the matching location information.

[0071] Since there is a time difference between the acquisition time of positioning based on compass and pedometer and the reporting time of positioning based on GPS, when obtaining comparison points, the data of the current GPS positioning coordinate acquisition time can be compared with the data of the acquisition time of compass + pedometer positioning, and the positioning data with the closest time difference can be selected, thereby improving the accuracy of the positioning information comparison between the two positioning methods.

[0072] S2 includes:

[0073] The first relative displacement between adjacent time points determined by GPS is determined based on the first positioning information received at the current time and the first positioning information received at the previous time point, and the first positioning result is determined based on the first relative displacement.

[0074] The second relative displacement between adjacent time points is determined based on the current second positioning information aligned with the currently received first positioning information and the second positioning information aligned with the first positioning information received at the previous time point, and the second positioning result is determined based on the second relative displacement.

[0075] Wherein, the first relative displacement includes a first relative distance and a first relative direction angle. The first relative displacement is determined based on the latitude and longitude information of adjacent time points determined based on GPS, and the first relative direction angle is determined based on the direction of adjacent time points determined based on GPS.

[0076] The second relative displacement includes a second relative distance and a second relative direction angle. The second relative displacement is determined based on the distance between adjacent time points determined by the pedometer and compass, and the second relative direction angle is determined based on the direction between adjacent time points determined by the pedometer and compass.

[0077] S3 includes:

[0078] Determine whether the difference between the first relative distance and the second relative distance is less than a first preset distance value, and whether the difference between the first relative direction angle and the second relative direction angle is less than a first preset angle value. If so, record the first positioning information as attendance positioning information.

[0079] By adding a pedometer to the safety helmet, the worker's acceleration during walking can be obtained, and the walking direction can be obtained through a compass;

[0080] A pedometer essentially uses a gyroscope to measure the magnitude of acceleration along the xyz axes of a three-dimensional coordinate system. It counts steps by calculating the acceleration generated by each regular step, excluding irregular accelerations caused by shaking or other factors. To measure the distance a person displaces, it listens to the acceleration and timing of each valid step, as well as the time when the step stops, and calculates the displacement using the formula v0t + 1 / 2 * at. 2 The displacement distance of the personnel is obtained, where v0 is the initial velocity, a is the acceleration, and t is the interval between the time when the effective step (stop step) acceleration of the gyroscope is detected and the time when the effective step (stop step) acceleration is obtained last time. The distance is not calculated for two consecutive stop step time intervals.

[0081] like Figure 5 As shown, 0 is the origin of the coordinate system, which is the time point when the function is started and the effective stepping (stopping) acceleration of the gyroscope is first obtained. That is, when the safety helmet receives the command to start the positioning method combining compass + pedometer and GPS positioning, a rectangular coordinate system is established and the coordinate of (0,0) point is created. The current position of the safety helmet is corresponding to the coordinate of (0,0) point. The position obtained by the compass + pedometer positioning is then compared with the coordinate of (0,0) point to determine the relative distance.

[0082] Figure 5 In the diagram, A represents the time point at which the gyroscope's effective step (stopping) acceleration is obtained for the second time. Assuming each step is a uniformly accelerated linear motion, the displacement at point A, obtained using the displacement formula above, is v0tA + 1 / 2 * a0t.A 2 Where v0 uses the average velocity returned by the positioning system, a0 represents the average acceleration of segment OA, and t A This represents the time interval of segment OA. Similarly, the displacement relative to point A when the displacement reaches point B is (v0 + a0 * t). A )t B +1 / 2*a A t B 2 a A t represents the average acceleration of segment AB. B This represents the time interval of segment AB. By analogy, the distance between two adjacent points can be calculated.

[0083] Since the comparison involves positioning results from two different positioning methods, the results must be converted to the same coordinate system before comparison. For example, GPS positioning obtains latitude and longitude coordinates. Therefore, when comparing relative distances, the latitude and longitude coordinates of two adjacent points can be converted into the corresponding distance between the two adjacent points, and then compared with the distance between two adjacent points determined by the compass + pedometer positioning method.

[0084] For comparing relative orientation angles, one feasible approach is to specify that the compass and gyroscope use the same set of coordinate axes, such as... Figure 6 As shown, the y-axis points directly in front of the safety helmet, the z-axis is perpendicular to the helmet, and the x-axis passes through both sides of the helmet. Compass definitions: Azimuth: The angle between magnetic north and the y-axis, around the z-axis (0 to 35°); 0 = North, 90 = East, 180 = South, 270 = West; Pitch: Rotation around the x-axis (-180 to 180°), positive when the z-axis moves towards the y-axis; Roll: Rotation around the y-axis (-90 to 90°) increases as the equipment moves clockwise.

[0085] like Figure 7 OB represents the compass direction (magnetic north), OA represents the gyroscope acceleration direction, and EFGH represents the horizontal plane. When the helmet rotates, the x, y, and z axes will deflect accordingly. Since the compass always points to magnetic north, it is assumed that the compass direction is equivalent to the horizontal plane. The offset can be determined by the angle between the compass direction and the coordinate axes. OA is flipped using trigonometric functions according to the compass deflection direction to obtain OC, which is the acceleration relative to the horizontal plane. Through trigonometric conversion, the projection OD of OC onto the horizontal plane EFGH can be obtained. OD is then the direction of displacement of the helmet on the horizontal plane. Through trigonometric transformation, ∠BOD can be obtained, which is the offset of the motion direction relative to magnetic north. Therefore, it can be seen that... Figure 5 The trajectory is drawn using a plane coordinate system pointing to magnetic north;

[0086] Convert the latitude and longitude coordinates in GPS positioning to, for example: Figure 5The rectangular coordinate system shown points to magnetic north. The distance between any two points and the offset relative to the x and y axes can be calculated using trigonometric functions.

[0087] Convert the above GPS latitude and longitude coordinates and the coordinates based on compass + pedometer positioning to a rectangular coordinate system pointing to magnetic north, such as... Figure 8 OABCD represents the coordinates after GPS latitude and longitude conversion, and OEFGH represents the coordinates located by the compass and pedometer. By comparing the relative displacement of coordinates at adjacent times, if the displacement exceeds a preset threshold, the positioning coordinate is ignored. For example, if the deviation between B and F is large, point B is ignored. Since there is a time difference between the acquisition time of the compass and pedometer positioning and the time of the timed GPS reporting, when obtaining the comparison point, the data of the current GPS positioning coordinate acquisition time is compared with the data of the compass and pedometer positioning acquisition time, and the positioning data with the closest time difference is taken.

[0088] By comparing relative displacements (including relative distance and relative direction angle), it is possible to accurately and reliably determine whether there is a deviation in the GPS-based positioning method, thereby switching the positioning method in a timely manner to ensure the accuracy and reliability of attendance positioning.

[0089] In another alternative implementation, S3 further includes:

[0090] If not, the safety helmet is triggered to repeatedly perform GPS-based positioning and compass and pedometer-based positioning a preset number of times, and to obtain the first positioning information and the second positioning information corresponding to each positioning.

[0091] For each location acquisition, the first location information and the second location information are executed respectively, and the difference between the first location result and the second location result corresponding to each location is determined.

[0092] If the difference between any location is less than the first preset value, the first location information corresponding to that location is recorded as the attendance location information; otherwise, the second location information is recorded as the attendance location information.

[0093] In this embodiment, if the deviation between GPS positioning and positioning based on compass and pedometer is large, it indicates that the GPS positioning has a large error and the current GPS positioning result cannot be used. In order to ensure the accuracy of the positioning result, when it is determined that there is a deviation in GPS positioning, the safety helmet is triggered to repeat the GPS positioning and positioning based on compass and pedometer a preset number of times. For example, it can be repeated three times. Then, the first relative displacement of GPS positioning relative to the previous time point and the second relative displacement of positioning based on compass and pedometer relative to the previous time point are calculated for each positioning. Then, the difference between the first relative displacement and the second relative displacement corresponding to each positioning is determined. If the difference corresponding to any positioning is less than the first preset value, it means that the GPS positioning is valid and the GPS positioning result is recorded as attendance positioning information. Otherwise, that is, if the GPS positioning results are invalid in three positioning attempts, the positioning result based on compass and pedometer is used as attendance positioning information.

[0094] For example, Figure 8 As shown, OABCD represents the GPS coordinates after latitude and longitude conversion, and OEFGH represents the coordinates obtained from compass and pedometer positioning. When a worker is active near point E, the GPS data is compared with the edge of the electronic fence to determine that the worker is currently at the edge of the electronic fence. At this time, the two positioning methods are combined to achieve attendance positioning. When the system is triggered again, the positioning results of the two methods are obtained. By comparing the relative displacements of the two methods, it can be found that there is a large difference between points B and F. Therefore, it can be determined that the GPS positioning is inaccurate. Thus, the system can be triggered to continuously execute GPS positioning and compass + pedometer positioning three times, and the relative displacements of these three positioning results with the previous positioning result can be determined. That is, GPS positioning calculates the relative displacement between point A and point E, and compass + pedometer positioning calculates the relative displacement between point E and point E. If any of the three GPS positioning and compass + pedometer positioning meet the preset threshold, the GPS positioning result of the corresponding time is used. Otherwise, the second relative displacement corresponding to the last compass + pedometer positioning is recorded. Then, the actual positioning result is calculated based on the GPS coordinates at point A and the second relative displacement. This result is used as the attendance positioning result. In other words, if the second positioning result is used as the attendance positioning information, the actual positioning result needs to be determined based on the second positioning result and the first positioning result that is closest to the second positioning result and cannot have any deviation.

[0095] like Figure 9 As shown, when point B is the offset point, the approximate positioning position should be calculated by translating EF so that E coincides with A, and the resulting point F1 is considered the positioning point at this time. In other words:

[0096] When there is a deviation between the GPS positioning result and the compass + pedometer positioning result, obtain the current corresponding second positioning result and the first positioning result that is closest to the current corresponding second positioning result and has no deviation.

[0097] Determine the second positioning result corresponding to the first positioning result without deviation. Based on the relative displacement between the current second positioning result and the second positioning result corresponding to the first positioning result without deviation, and the first positioning result without deviation, determine the current actual positioning result. Specifically, using the first positioning result without deviation as a reference, translate the relative displacement to the location of the first positioning result without deviation, and make the second positioning result corresponding to the first positioning result without deviation coincide with the first positioning result without deviation. Then, the other end of the translated relative displacement is the actual positioning result.

[0098] When using a combination of two positioning methods for attendance tracking, specifically when the compass and pedometer positioning functions are activated, the current GPS coordinates are used as the origin (0,0) after conversion to a Cartesian coordinate system (hereinafter referred to as the positioning coordinate system). If this GPS position already has an error, subsequent comparisons of all nodes using both positioning methods will also have errors. Therefore, to solve this error problem, in one optional implementation:

[0099] When the compass + pedometer positioning function is activated, it triggers the origin search logic during GPS coordinate system transformation (i.e., the Cartesian coordinate system after GPS coordinate transformation). Specifically, it acquires GPS location data every preset time interval, such as 10 seconds, and repeats this process a preset number of times, such as 5 times. The first acquired GPS coordinates are mapped to the origin coordinates in the positioning coordinate system. If no abnormal offset points are found in these five location points, the first acquired GPS coordinates are used as the origin coordinates. Otherwise, the above logic is repeated to acquire the current GPS coordinates as the origin coordinates and continue the search until a usable origin is found. Figure 10 As shown, the point on the left side of the O2 coordinate system is an abnormal offset point and is not used as the origin of the positioning coordinate system;

[0100] The above search logic ensures that when using a combination of two positioning methods to achieve attendance positioning, at least one of the GPS-based positioning methods corresponding to the compass + pedometer positioning method is accurate. Therefore, when determining the actual positioning result based on the compass + pedometer positioning result, an accurate GPS positioning result can be found as a reference point, thus ensuring the accuracy of the determined actual positioning result.

[0101] In the above search logic, there are two Cartesian coordinate systems. One is the coordinate system used when the compass + pedometer positioning function is activated, with the starting point as the origin. All subsequent displacement records based on the compass + pedometer are located in the following coordinate system: Figure 11 The coordinate system O1 shown is referred to as the displacement coordinate system. Another system is a rectangular coordinate system based on the GPS latitude and longitude system, with a specific latitude and longitude coordinate as the origin, and other positioning locations based on the distribution of that point. Figure 12 The coordinate system O2 shown is referred to as the positioning coordinate system; the two are correlated through time, such as... Figure 11 The time t1 for obtaining the relative displacement point of A is Figure 12 When the time t2 obtained by the origin point O2 (i.e., the GPS positioning point) is equal to or close to that of the origin point O2, then it is considered that... Figure 12 The location corresponding to the central point O2 Figure 11 Mid-displacement position A; such as Figure 10 As shown, after superimposing the coordinate system, the relative position of the displacement position in the positioning coordinate system can be easily seen. By converting the positioning coordinate system to GPS, the GPS position of other points in the positioning coordinate system can be calculated.

[0102] In another alternative implementation, such as Figure 2 As shown, an attendance device based on helmet positioning includes:

[0103] The receiving module is used to periodically receive the first positioning information determined by GPS and the second positioning information determined by a compass and a pedometer sent by the safety helmet;

[0104] The determining module is used to determine a first positioning result based on GPS based on the first positioning information, and to determine a second positioning result based on a compass and a pedometer based on the second positioning information.

[0105] The judgment module is used to determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, the first positioning information is recorded as attendance positioning information.

[0106] The specific steps performed by each module include the corresponding steps in the helmet-based attendance method in the aforementioned implementation methods.

[0107] In this embodiment, the helmet-based attendance device can be a registration server, which, together with the application server, communication server, and helmet, constitutes a helmet-based attendance system. Figure 13 As shown, by using the communication server as the entry point, positioning data from different safety helmet positioning and reporting devices can be received, and the reported positioning data can be filtered and forwarded to the application server by the registration server. Multiple communication servers can also be deployed in the worker attendance system based on safety helmet positioning as needed.

[0108] Application server 201 is used to manage attendance rules, store location data, and analyze attendance information;

[0109] Registration server 202 is used for communication between application server 201 and communication server 203. It filters the location data forwarded by communication server 203 and forwards it to application server 201.

[0110] The communication server 203 is used for communication between the registration server 202 and the safety helmet positioning reporting device 204. It parses the positioning data reported by the safety helmet positioning reporting device 204, and then re-encapsulates it into a data structure that can be recognized by the registration server 202 and the application server 201 before forwarding the encapsulated data to the registration server 202.

[0111] The safety helmet positioning and reporting device 204 is used to periodically report the positioning data of personnel after their identity verification is passed to the communication server 203.

[0112] The safety helmet positioning and reporting device 204 includes a positioning data timed reporting device 204-1, a positioning device 204-2, and a Selfie device 204-3;

[0113] The positioning device 204-2 includes two types of positioning modules: one is a positioning module that realizes GPS positioning, and the other is a positioning module that includes a pedometer and a compass.

[0114] Among them, the positioning device 204-2 can determine whether to start positioning based on pedometer + compass under the trigger of the registration server. The specific triggering mechanism is the same as the implementation method in the aforementioned attendance method based on safety helmet positioning, that is, to compare the acquired GPS positioning data with the edge of the electronic fence. If it is determined from the GPS positioning data that the safety helmet is at the edge of the electronic fence, then the positioning based on pedometer + compass is started, and the attendance positioning information is determined by combining the two positioning methods.

[0115] The selfie device 204-3 is a camera mounted on the brim of a safety helmet. The camera is aimed at the face to capture images of the person's face.

[0116] The location data timed reporting device 204-1 has a timed task, and the task cycle interval can be configured remotely. The default cycle is to trigger a reporting task once every 30 minutes. When the task cycle arrives, the selfie device 204-3 will be triggered to capture a face. The captured photo will be compared with the pre-configured personnel face photos of the location data timed reporting device 204-1. If the face does not match, a buzzer alarm will be sounded and the subsequent process will be terminated until the next task cycle arrives and the comparison will be performed again. If the face matches, the GPS positioning module in the positioning device 204-2 will be triggered to obtain the current latitude and longitude coordinates. The obtained latitude and longitude coordinates, the current acquisition time, and the unique identifier of the safety helmet positioning reporting device will be encapsulated into a positioning data transmission and sent to the communication server 203.

[0117] The communication server 203 includes a protocol parsing unit 203-1;

[0118] The protocol parsing unit 203-1 is used to perform protocol parsing on the positioning data reported by the positioning data timed reporting device 204-1, and to parse out the unique identifier of the safety helmet positioning reporting device, latitude and longitude coordinates, latitude and longitude coordinate acquisition time, and repackage it into a data structure that can be recognized by the registration server 202 and the application server 201.

[0119] Registration server 202 includes registration unit 202-1 and filtering unit 202-2;

[0120] Registration unit 202-1 is used to store the unique identifier and basic information of the safety helmet positioning and reporting device, such as serial number, MAC address, IP address, port, remote operation login username, password, etc.; it also stores the unique identifier of the worker and the worker's facial photo information, such as ID number, name, gender, job title, education, photo, etc. By binding the unique identifier of the safety helmet positioning and reporting device stored in registration unit 202-1 with the unique identifier of the worker, the bound worker's facial photo is then remotely configured into the safety helmet positioning and reporting device 204 for its identity verification.

[0121] The filtering unit 202-2 is used to parse the unique identifier of the safety helmet positioning and reporting device contained in the positioning data forwarded by the communication server 203 and compare it with the unique identifier of the safety helmet positioning and reporting device stored in the registration unit 202-1. If a matching unique identifier of the safety helmet positioning and reporting device is found, the positioning data is forwarded to the application server 201. Otherwise, if they do not match, the data is discarded and the subsequent process is terminated.

[0122] Application server 201 includes location data storage unit 201-1, attendance statistics unit 201-2, and attendance rules unit 201-3;

[0123] The location data storage unit 201-1 is used to persist the location data forwarded by the registration server 202;

[0124] The attendance statistics unit 201-2 is used to obtain rule information from the attendance rule unit 201-3 and apply the rule information to the location data stored in the location data storage unit 201-1 to calculate attendance information from the location data.

[0125] The attendance rule unit 201-3 is used to configure the statistical rules used by the attendance statistics unit 201-2. The rules include configuring an area enclosed by the latitude and longitude coordinates of at least three points as the attendance area. If the location data is not within the range of this area, it is considered as leaving the venue; conversely, if the location data is within the range, it is considered as entering the venue. At the same time, the attendance rules configure the valid attendance time period, that is, at least one time period consisting of start and end times. Only data whose location data acquisition time is within the valid attendance time period is included in the attendance statistics.

[0126] The attendance rules can be set on the application server, or alternatively, they can be set on the registration server and then sent to the application server.

[0127] In another alternative implementation, such as Figure 3 As shown, an attendance terminal based on helmet positioning includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the attendance method based on helmet positioning in the above embodiments.

[0128] In summary, the present invention provides an attendance method, device, and terminal based on safety helmet positioning. When tracking the attendance of workers on construction sites, it utilizes safety helmets for positioning, employing two methods: GPS-based and compass / pedometer-based positioning. GPS-based positioning is convenient and fast, while compass / pedometer-based positioning is accurate and universal, unrestricted by the environment, and highly suitable for complex environments such as construction sites. Therefore, combining these two positioning methods enables accurate positioning of personnel, ensuring the accuracy of attendance tracking on construction sites. Furthermore, facial recognition authentication during attendance tracking prevents forgery and avoids the uploading of irrelevant location data. After acquiring the location data, further verification and filtering based on safety helmet identification improves the reliability and reduces redundancy. The attendance rules are adaptively set, enhancing flexibility. From the generation, transmission, verification, and filtering of location data to its application, the entire process ensures high efficiency, reliability, and accuracy in attendance tracking.

[0129] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An attendance method based on compass, pedometer, and GPS, characterized in that, Including the following steps: S1. Periodically receive the first location information determined by GPS and the second location information determined by compass and pedometer sent by the safety helmet; configure the periodic reporting interval for the safety helmet through remote configuration. S2. Determine a first positioning result based on GPS according to the first positioning information, and determine a second positioning result based on compass and pedometer according to the second positioning information; S3. Determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, record the first positioning information as attendance positioning information. The steps between S1 and S2 include: The first and second location information are aligned based on time; one of the location information is used as a basis to find another location information whose corresponding location time is closest to that of the other location information, which is used as the other location information to match it. S2 includes: The first relative displacement between adjacent time points determined by GPS is determined based on the first positioning information received at the current time and the first positioning information received at the previous time point, and the first positioning result is determined based on the first relative displacement. The second relative displacement between adjacent time points is determined based on the current second positioning information aligned with the currently received first positioning information and the second positioning information aligned with the first positioning information received at the previous time point, and the second positioning result is determined based on the second relative displacement. The first relative displacement includes a first relative distance and a first relative direction angle. The first relative displacement is determined based on the latitude and longitude information of adjacent time points determined by GPS, and the first relative direction angle is determined based on the direction of adjacent time points determined by GPS. The second relative displacement includes a second relative distance and a second relative direction angle. The second relative displacement is determined based on the distance between adjacent time points determined by the pedometer and compass, and the second relative direction angle is determined based on the direction between adjacent time points determined by the pedometer and compass. S3 includes: Determine whether the difference between the first relative distance and the second relative distance is less than a first preset distance value, and whether the difference between the first relative direction angle and the second relative direction angle is less than a first preset angle value. If so, record the first positioning information as attendance positioning information. By adding a pedometer to the safety helmet, the worker's acceleration during walking can be obtained, and the walking direction can be obtained through a compass; S3 further includes: If not, the safety helmet is triggered to repeatedly perform GPS-based positioning and compass and pedometer-based positioning a preset number of times, and to obtain the first positioning information and the second positioning information corresponding to each positioning. For each location acquisition, the first location information and the second location information are executed respectively, and the difference between the first location result and the second location result corresponding to each location is determined. If the difference corresponding to any positioning is less than the first preset value, the first positioning information corresponding to that positioning is recorded as the attendance positioning information; otherwise, the second positioning information is recorded as the attendance positioning information. The current actual positioning result is determined based on the relative displacement between the current corresponding second positioning result and the second positioning result corresponding to the first positioning result without deviation, and the first positioning result without deviation. Specifically, the relative displacement is translated to the first positioning result without deviation based on the first positioning result without deviation, and the second positioning result corresponding to the first positioning result without deviation coincides with the first positioning result without deviation. Then, the other end of the translated relative displacement is the actual positioning result. When comparing, the positioning results of the two positioning methods are converted to the same coordinate system. When the positioning function of the compass + pedometer is activated, the origin search logic of GPS coordinate system conversion is triggered. GPS positioning is acquired once every preset time, and the GPS positioning is repeatedly acquired a preset number of times. The GPS coordinates acquired for the first time are mapped to the origin coordinates on the positioning coordinate system. If there are no abnormal offset points in the positioning points of the preset number of times, the GPS coordinates acquired for the first time are used as the origin coordinates. Otherwise, the above logic is repeated to reacquire the current GPS coordinates as the origin coordinates and continue to detect until a usable origin is obtained.

2. The attendance method based on compass, pedometer, and GPS according to claim 1, characterized in that, S1 includes: It periodically receives the first location information determined by GPS from the safety helmet; Obtain the range of the electronic fence, and determine the distance between the current location of the safety helmet and the boundary of the electronic fence based on the range of the electronic fence and the currently received first positioning information; Determine whether the distance is less than a preset distance threshold. If not, directly record the currently received first location information as attendance location information. Otherwise, periodically receive the second location information sent by the safety helmet based on the compass and pedometer.

3. The attendance method based on a compass, pedometer, and GPS according to any one of claims 1 to 2, characterized in that, The step preceding S1 includes: Receive a registration request sent by a safety helmet, the registration request including a safety helmet identifier, a safety helmet wearer identifier, and a facial photograph of the safety helmet wearer; The registration request is used to bind the safety helmet identifier, the safety helmet wearer identifier, and the face photo of the safety helmet wearer, and the corresponding binding relationship is stored. Based on the binding relationship, the facial photo of the helmet wearer is sent to the helmet corresponding to the helmet identifier; The first and second location information received are sent by the helmet after comparing the self-taken photo of the helmet wearer with the received photo of the helmet wearer's face.

4. The attendance method based on compass, pedometer, and GPS according to claim 3, characterized in that, S1 further includes the following steps: Receive the helmet identifier sent by the helmet; Based on the safety helmet logo, determine whether there is a binding relationship corresponding to the safety helmet logo. If there is, send the attendance location information to the application server.

5. The attendance method based on compass, pedometer, and GPS according to claim 4, characterized in that, The attendance location information also includes the location time; It also includes the following steps: Receive an attendance rule setting request, and set attendance rules according to the attendance rule setting request. The attendance rules include attendance area and attendance time period. The attendance rules are sent to the application server, so that the application server can determine the attendance information based on the attendance rules and the attendance location information.

6. An attendance device based on a compass, pedometer, and GPS, characterized in that, The attendance method based on compass, pedometer and GPS as described in any one of claims 1-5; include: The receiving module is used to periodically receive the first positioning information determined by GPS and the second positioning information determined by a compass and a pedometer sent by the safety helmet; The determining module is used to determine a first positioning result based on GPS based on the first positioning information, and to determine a second positioning result based on a compass and a pedometer based on the second positioning information. The judgment module is used to determine whether the difference between the first positioning result and the second positioning result is less than a first preset value. If so, the first positioning information is recorded as attendance positioning information.

7. An attendance terminal based on a compass, pedometer, and GPS, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the attendance method based on safety helmet positioning as described in any one of claims 1 to 5.