CN114006674B - Time correction method, device, equipment and storage medium for attendance equipment - Google Patents

Time correction method, device, equipment and storage medium for attendance equipment Download PDF

Info

Publication number
CN114006674B
CN114006674B CN202111651541.7A CN202111651541A CN114006674B CN 114006674 B CN114006674 B CN 114006674B CN 202111651541 A CN202111651541 A CN 202111651541A CN 114006674 B CN114006674 B CN 114006674B
Authority
CN
China
Prior art keywords
current
attendance
attendance device
time
calibration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111651541.7A
Other languages
Chinese (zh)
Other versions
CN114006674A (en
Inventor
周波
段炼
苗瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Haiqing Zhiyuan Technology Co.,Ltd.
Original Assignee
Shenzhen HQVT Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen HQVT Technology Co Ltd filed Critical Shenzhen HQVT Technology Co Ltd
Priority to CN202111651541.7A priority Critical patent/CN114006674B/en
Publication of CN114006674A publication Critical patent/CN114006674A/en
Application granted granted Critical
Publication of CN114006674B publication Critical patent/CN114006674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0676Mutual
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G5/00Setting, i.e. correcting or changing, the time-indication
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C1/00Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people
    • G07C1/10Registering, indicating or recording the time of events or elapsed time, e.g. time-recorders for work people together with the recording, indicating or registering of other data, e.g. of signs of identity

Abstract

The embodiment of the application provides a time correction method, a time correction device, equipment and a storage medium for attendance equipment, wherein the method comprises the following steps: generating a time calibration request, and sending the time calibration request to each second attendance device through the local area network; acquiring response data sent by each second attendance device, wherein the response data of the second attendance device comprises the current local time and the current deviation value of the second attendance device; determining the current calibration time according to the current local time and the current deviation value of each attendance device; the current local time of the first attendance device is calibrated based on the current calibration time, the current calibration time is sent to each second attendance device, the current local time of each second attendance device is calibrated based on the current calibration time, the synchronization and the calibration of the local time of a plurality of attendance devices in the local area network are realized, the attendance accuracy is improved, and the time calibration safety is high.

Description

Time correction method, device, equipment and storage medium for attendance equipment
Technical Field
The embodiment of the application relates to the technical field of attendance equipment, in particular to a time correction method, a time correction device, time correction equipment and a storage medium for attendance equipment.
Background
In order to supervise employees to get on and off duty standardly, many companies and enterprises are provided with access attendance machines for attendance checking. For some large-scale enterprises or companies, a plurality of entrance guard attendance machines are often required to be arranged so as to meet the attendance requirements of various employees.
The accuracy of time is one of the core requirements of a plurality of entrance guard attendance machines, and in order to synchronize the time among the plurality of entrance guard attendance machines, the local time of the plurality of entrance guard attendance machines needs to be calibrated. The common time calibration mode is to calibrate the attendance equipment of a plurality of entrance guard attendance machines through a standard network timer on the internet. Adopt the time calibration mode based on the internet, need link into the internet with each entrance guard's attendance machine, lead to the staff data of the last storage of entrance guard's attendance machine to reveal easily, have the potential safety hazard.
Disclosure of Invention
The embodiment of the application provides a time correction method, a time correction device and a storage medium for attendance equipment, so that the time correction of the attendance equipment of a plurality of attendance equipment based on a local area network is realized, the data stored by the attendance equipment is prevented from being leaked, and the accuracy of the local time of the attendance equipment is improved.
In a first aspect, an embodiment of the present application provides a time calibration method for an attendance device, where the method is applied to a first attendance device, where the first attendance device is any one of multiple attendance devices in a local area network, and the method includes:
sending a time calibration request to each second attendance device through a local area network, wherein the second attendance device is the other attendance device except the first attendance device in a plurality of attendance devices in the local area network; acquiring response data sent by each second attendance device, wherein the response data of the second attendance device comprises the current local time and the current deviation value of the second attendance device; determining the current calibration time according to the current local time and the current deviation value of each attendance device; the current local time of the first attendance device is calibrated based on the current calibration time, and the current calibration time is sent to each second attendance device, so that each second attendance device is calibrated based on the current calibration time.
Optionally, determining the current calibration time according to the current local time of each attendance device and the current deviation value, including:
determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
Optionally, determining a current weight coefficient of each attendance device according to a current deviation value of each attendance device, including:
determining the repetition times of the current local time of each attendance device according to the current local time of each attendance device; and determining the current weight coefficient of each attendance device according to the current local time repetition times and the current deviation value of each attendance device.
Optionally, determining a current weight coefficient of each attendance device according to the current local time repetition number and the current deviation value of each attendance device, including:
and determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device, the current deviation value and a preset relational expression. Wherein, the preset relational expression is as follows:
Figure 787914DEST_PATH_IMAGE001
Figure 467157DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 350799DEST_PATH_IMAGE003
is composed of
Figure 824506DEST_PATH_IMAGE004
At the first moment
Figure 996861DEST_PATH_IMAGE005
A weight coefficient for each attendance device;
Figure 948637DEST_PATH_IMAGE006
the number of attendance devices;
Figure 217944DEST_PATH_IMAGE007
is a constant coefficient;
Figure 596973DEST_PATH_IMAGE008
is composed of
Figure 53362DEST_PATH_IMAGE004
At the first moment
Figure 12091DEST_PATH_IMAGE005
The number of repetitions of the local time of each attendance device;
Figure 374720DEST_PATH_IMAGE009
is composed of
Figure 190229DEST_PATH_IMAGE004
At the first moment
Figure 399494DEST_PATH_IMAGE005
An offset value of the local time of the respective attendance device.
Optionally, after determining the current calibration time according to the current local time of each attendance device and the current deviation value, the method further includes:
and determining a new deviation value according to the current calibration time and the current local time of the first attendance device so as to update the current deviation value of the first attendance device.
Optionally, after acquiring response data sent by each second attendance device, the method further includes:
acquiring the current local time and the current deviation value of the first attendance equipment; and sequencing the current local time of each attendance device.
Correspondingly, determining the current calibration time according to the current local time of each attendance device and the current deviation value, comprising:
and determining the current calibration time according to the current local time and the current deviation value of each attendance device of which the ranking of the current local time is positioned in a preset interval.
Optionally, the method further includes:
and saving the current local time of the first attendance device.
In a second aspect, an embodiment of the present application further provides a timing device for an attendance device, where the timing device is applied to a first attendance device, the first attendance device is any one of a plurality of attendance devices in a local area network, and the timing device includes:
the calibration instruction sending module is used for sending a time calibration request to each second attendance device through a local area network, wherein the second attendance device is the other attendance device except the first attendance device in a plurality of attendance devices in the local area network; a response data acquisition module, configured to acquire response data sent by each second attendance device, where the response data of the second attendance device includes a current local time and a current deviation value of the second attendance device; the calibration time determining module is used for determining the current calibration time according to the current local time and the current deviation value of each attendance device; and the time calibration module is used for calibrating the current local time of the first attendance equipment based on the current calibration time and sending the current calibration time to the second attendance equipment so as to calibrate the current local time of the second attendance equipment based on the current calibration time.
Optionally, the calibration time determining module includes:
the weight determining unit is used for determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and the calibration time determining unit is used for determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
Optionally, the weight determining unit includes:
the system comprises a repetition frequency determining subunit, a time counting unit and a time counting unit, wherein the repetition frequency determining subunit is used for determining the repetition frequency of the current local time of each attendance device according to the current local time of each attendance device; and the weight coefficient determining subunit is used for determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device and the current deviation value.
Optionally, the weight coefficient determining subunit is specifically configured to:
and determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device, the current deviation value and a preset relational expression. Wherein, the preset relational expression is as follows:
Figure 693072DEST_PATH_IMAGE001
Figure 609075DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 595486DEST_PATH_IMAGE003
is composed of
Figure 26467DEST_PATH_IMAGE004
At the first moment
Figure 123736DEST_PATH_IMAGE005
A weight coefficient for each attendance device;
Figure 956563DEST_PATH_IMAGE006
the number of attendance devices;
Figure 615339DEST_PATH_IMAGE007
is a constant coefficient;
Figure 736879DEST_PATH_IMAGE008
is composed of
Figure 372260DEST_PATH_IMAGE004
At the first moment
Figure 59593DEST_PATH_IMAGE005
The number of repetitions of the local time of each attendance device;
Figure 387806DEST_PATH_IMAGE009
is composed of
Figure 793380DEST_PATH_IMAGE004
At the first moment
Figure 498031DEST_PATH_IMAGE005
An offset value of the local time of the respective attendance device.
Optionally, the apparatus further comprises:
and the deviation value updating module is used for determining a new deviation value according to the current calibration time and the current local time of the first attendance device after determining the current calibration time according to the current local time and the current deviation value of each attendance device so as to update the current deviation value of the first attendance device.
Optionally, the apparatus further comprises:
the first data acquisition module is used for acquiring the current local time and the current deviation value of the first attendance equipment after acquiring the response data sent by each second attendance equipment; and the sequencing module is used for sequencing the current local time of each attendance device.
Correspondingly, the calibration time determination module is specifically configured to:
and determining the current calibration time according to the current local time and the current deviation value of each attendance device of which the ranking of the current local time is positioned in a preset interval.
Optionally, the apparatus further comprises:
and the local time saving module is used for saving the current local time of the first attendance device.
In a third aspect, an embodiment of the present application further provides a timing device for an attendance device, including a memory and at least one processor; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored by the memory, so that the at least one processor executes the timing method of the attendance device provided by any embodiment of the application.
In a fourth aspect, this embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is configured to implement the time calibration method for the attendance device as provided in any embodiment of the present application.
In a fifth aspect, this application further provides a computer program product, including a computer program, where the computer program, when executed by a processor, implements the timing method for the attendance device as provided in any of the embodiments of the present application.
The time correction method, device, equipment and storage medium for the attendance equipment provided by the embodiment of the application aim at a plurality of attendance equipment in the same local area network, sending time calibration requests to the rest attendance devices and the rest second attendance devices by the first attendance device through the local area network, and further determining a current calibration time based on the current local time and the current offset value in the response data sent by each second attendance device, and based on the current calibration time, the calibration of the current local time of each attendance device in the local area network is realized, therefore, time synchronization and calibration of multiple attendance devices are achieved, the accuracy of attendance is improved, the time correction mode based on the local area network is compared with the time correction mode based on the internet, the safety of employee data stored in the attendance devices is improved, and data leakage is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario diagram of a timing method of an attendance device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for timing an attendance device according to an embodiment of the present application;
FIG. 3 is a flow chart of a method for timing an attendance device according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of a timing device of the attendance device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of the attendance device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
The following explains an application scenario of the embodiment of the present application:
fig. 1 is an application scenario diagram of a timing method for attendance devices according to an embodiment of the present application, as shown in fig. 1, for a large-scale enterprise or organization, multiple attendance devices 110 are generally required to check attendance of an employee, and 4 devices are taken as an example in fig. 1, and the employee can check attendance by means of fingerprints, human faces, employee cards, and the like. The accuracy of the local time of the attendance device 110 is determined by the accuracy of the operating frequency of the crystal oscillator of the attendance device 110, and due to the influences of temperature, product quality and the like, the time characteristics of different crystal oscillators are inconsistent, and the time of the attendance devices 110 is not synchronized, so that the time calibration of the attendance devices 110 is required to make the local time of the attendance devices 110 consistent.
In the prior art, two common timing methods are adopted, the first method is to perform timing on each attendance device 110 manually and regularly by a worker, and the timeliness and the accuracy are poor. The second method is performed through a standard time corrector 120 of the internet, each attendance device 110 needs to be accessed to the internet, local time calibration is performed based on the time of the standard time corrector, and the attendance device is accessed to the internet, so that the risk of data leakage of the attendance device 110 exists, and the security is poor.
In order to improve the timing safety of the attendance device 110, an embodiment of the present application provides a timing method of the attendance device, and the main concept thereof is as follows: the method comprises the steps that time calibration and synchronization of each attendance device in the local area network are achieved based on active communication among a plurality of attendance devices through the local area network, specifically, one attendance device serves as a timing initiator, time calibration requests are initiated to the rest attendance devices, accordingly, calibration time is determined based on local time and deviation values of each attendance device, and calibration and synchronization of the local time of each attendance device are achieved through the calibration time.
Fig. 2 is a flowchart of a timing method of an attendance device according to an embodiment of the present application. The time calibration method for the attendance device can be executed by any attendance device in a local area network, such as a first attendance device, as shown in fig. 2, and the time calibration method for the attendance device provided by this embodiment includes the following steps:
step S201, sending the time calibration request to each second attendance device through the local area network.
The attendance device is used for carrying out employee attendance, and in some embodiments, the attendance device also becomes an attendance device.
Specifically, according to a fixed period, any one of the multiple attendance devices is used as a first attendance device, and a time calibration request is actively sent to the other attendance devices, namely, the second attendance devices, through the local area network.
Specifically, one attendance device may be randomly selected as the first attendance device, i.e., as the sender of the time alignment request.
Specifically, each attendance device may periodically initiate a time calibration request, and send the time calibration request to each second attendance device through the local area network. The second attendance device takes the first attendance device which initiates the time calibration request as the first attendance device.
During one time or one round of time calibration, only one attendance device in a plurality of attendance devices in the same local area network is used as a first attendance device to initiate time calibration requests to the rest attendance devices.
Step S202, obtaining response data sent by each second attendance device, where the response data of the second attendance device includes a current local time and a current deviation value of the second attendance device.
The current local time is the current time or the local time corresponding to the current period. The current deviation value is used to describe the degree of deviation of the local time from the calibration time at the last time calibration, i.e. the degree of deviation of the last local time from the last calibration time.
In some embodiments, the current degree of deviation is a ratio of a last calibration time to a last local time.
In some embodiments, the current degree of deviation is the difference between the last calibration time and the last local time.
Specifically, when each second attendance device receives a time calibration request, the current local time of the second attendance device is acquired based on the time calibration request, the stored latest deviation value, that is, the current deviation value is used, response data or a response message is generated based on the current local time and the current deviation value, and the response data corresponding to the current time calibration request is sent to the first attendance device.
Step S203, determining the current calibration time according to the current local time and the current deviation value of each attendance device.
Wherein, each equipment of attendance includes first equipment of attendance and each second equipment of attendance.
Specifically, the first attendance device may analyze response data sent by each second attendance device, so as to obtain a current local time and a current deviation value of each second attendance device. Before, simultaneously with or after the first attendance device sends the time calibration request to each second attendance device via the local area network, the first attendance device is further configured to read the current local time of the first attendance device and the current deviation value.
Specifically, the current local time of each attendance device may be screened according to the current deviation value of each attendance device, for example, the current local time of each attendance device whose current deviation value exceeds the preset range is deleted, and the current calibration time is determined based on the average value of the remaining current local times of each attendance device.
Optionally, determining the current calibration time according to the current local time of each attendance device and the current deviation value, including:
determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
In some embodiments, the greater the absolute value of the difference between the current departure value of the attendance device and 1, the smaller the current weighting factor of the attendance device.
In some embodiments, the weighting system may bias the values into a negative correlation relationship.
In some embodiments, the current weighting factor for the attendance devices may be determined from the distribution of the current offset values for each attendance device.
Specifically, the current calibration time may be determined according to a product of a current weighting factor of each attendance device and the current local time.
Step S204, calibrating the current local time of the first attendance device based on the current calibration time, and sending the current calibration time to each second attendance device so as to calibrate the current local time of each second attendance device based on the current calibration time.
Specifically, after the current calibration time is determined, the first attendance device sends the current calibration time to each second attendance device, so that each attendance device performs current local time calibration based on the current calibration time, and the time of each attendance device in the local area network is synchronized.
Specifically, each attendance device calibrates the current local time based on the current calibration time, so as to check attendance based on the calibrated local time.
The time correction method for the attendance device provided by the embodiment of the application is used for a plurality of attendance devices in the same local area network, the local area network is used, the first attendance device sends a time correction request to the rest of the attendance devices, the second attendance devices send time correction requests, further, based on the current local time and the current deviation value in response data sent by the second attendance devices, the current correction time is determined, and the current local time correction of the attendance devices in the local area network is realized based on the current correction time, so that the time synchronization and the correction of the attendance devices are realized, the attendance accuracy is improved, compared with the time correction mode based on the internet, the safety of employee data stored in the attendance devices is improved, and the data leakage is avoided.
Fig. 3 is a flowchart of a timing method for an attendance device according to another embodiment of the present application, where the timing method for an attendance device according to this embodiment is further detailed in step S203 on the basis of the embodiment shown in fig. 2, and a step of adding a deviation value update after step S203, as shown in fig. 3, the timing method for an attendance device according to this embodiment may include the following steps:
step S301, sending the time calibration request to each second attendance device through the local area network.
The second attendance device is the other attendance device except the first attendance device in the plurality of attendance devices in the local area network.
Step S302, acquiring response data sent by each second attendance device.
Wherein the response data of the second attendance device comprises a current local time of the second attendance device and a current deviation value.
Step S303, determining the number of times of repetition of the current local time of each attendance device according to the current local time of each attendance device.
The number of times of repetition of the current local time is used for describing the number of times that a certain current local time appears in the current local time of each attendance device.
Specifically, after the first attendance device obtains the current local time of each attendance device, the first attendance device may count the occurrence frequency of each current local time, so as to obtain the repetition frequency of the current local time of each attendance device.
In some embodiments, the first attendance device may further sort the current local time of each attendance device from early to late or from small to large based on the current local time, and determine the number of repetitions of the current local time of each attendance device based on a result of the sorting.
Specifically, if the difference value of the current local times of the two attendance devices is smaller than the preset time difference, the current local times of the two attendance devices are determined to be repeated.
Wherein, the preset time difference can be 0.1s, 0.3s, 0.5s or other smaller values.
Step S304, determining the current weight coefficient of each attendance device according to the current local time repetition times and the current deviation value of each attendance device.
In some embodiments, the weight factor is positively correlated with the number of repetitions.
Optionally, determining a current weight coefficient of each attendance device according to the current local time repetition number and the current deviation value of each attendance device, including:
determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device, the current deviation value and a preset relational expression; wherein, the preset relational expression is as follows:
Figure 39870DEST_PATH_IMAGE001
Figure 742247DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 369538DEST_PATH_IMAGE003
is composed of
Figure 845256DEST_PATH_IMAGE004
At the first moment
Figure 772761DEST_PATH_IMAGE005
A weight coefficient for each attendance device;
Figure 442777DEST_PATH_IMAGE006
the number of attendance devices;
Figure 557363DEST_PATH_IMAGE007
is a constant coefficient;
Figure 541500DEST_PATH_IMAGE008
is composed of
Figure 57932DEST_PATH_IMAGE004
At the first moment
Figure 898849DEST_PATH_IMAGE005
Repetition of local time of individual attendance devicesThe number of times;
Figure 500731DEST_PATH_IMAGE009
is composed of
Figure 350876DEST_PATH_IMAGE004
At the first moment
Figure 223279DEST_PATH_IMAGE005
An offset value of the local time of the respective attendance device.
In some embodiments, in order to improve the accuracy of the calibration time, after the current local time of each attendance device is obtained, the response data of each attendance device is sorted based on the current local time, the response data of each attendance device with the current local time ranking beyond a preset interval, that is, the current local time and the current deviation value, are deleted, and the current calibration time is determined based on the current local time and the current deviation value of each attendance device with the current local time ranking within the preset interval. In the above formula
Figure 235097DEST_PATH_IMAGE006
It indicates the number of each attendance device ranked outside the preset interval at the current local time.
Wherein, the preset interval can be 10% to 90%. I.e. removing the response data of the attendance device for the highest ranked 10% and the lowest ranked 10% of the current local time.
Optionally, the method further includes: and saving the current local time of the first attendance device.
Furthermore, each attendance device can also save the current local time so as to facilitate the maintenance of the attendance device.
Specifically, after the current local time is obtained, the current local time needs to be stored to a preset position by each attendance device, the first attendance device or the second attendance device, so as to perform device maintenance and data maintenance based on each local time.
Step S305, determining a current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
In particular, the current calibration time
Figure 261959DEST_PATH_IMAGE010
The expression of (a) is:
Figure 650215DEST_PATH_IMAGE011
wherein the content of the first and second substances,
Figure 875660DEST_PATH_IMAGE012
is composed of
Figure 323959DEST_PATH_IMAGE004
At the first moment
Figure 900434DEST_PATH_IMAGE005
The local time of the respective attendance device.
Step S306, calibrating the current local time of the first attendance device based on the current calibration time, and sending the current calibration time to each second attendance device so as to calibrate the current local time of each second attendance device based on the current calibration time.
Step S307, determining a new deviation value according to the current calibration time and the current local time of the first attendance device, so as to update the current deviation value of the first attendance device.
Specifically, for the next time calibration, the current deviation value of each attendance device needs to be updated, and each attendance device recalculates the next deviation value based on the received or determined current calibration time and the current local time.
In some embodiments, the first
Figure 826802DEST_PATH_IMAGE005
The expression for the next or new deviation value of the counter attendance device is:
Figure 110015DEST_PATH_IMAGE013
when receiving a time alignment request sent by the next first attendance device, the attendance device generates response data for the time alignment request based on the next deviation value or the new current deviation value and the current local time for the next or next round of time alignment.
In this embodiment, for a plurality of attendance devices connected to the same lan, one attendance device sends a time calibration request to the remaining attendance devices, that is, the second attendance devices, to obtain the current local time and the current deviation value of the second attendance devices, determines the current weight coefficient of each attendance device based on the current local time repetition number and the current deviation value of each attendance device, further determines the current calibration time based on the weighted average value of the current local time of each attendance device, calibrates the local time of each attendance device based on the current calibration time and updates the deviation value, realizes active time calibration based on the attendance devices, and determines the calibration time by adopting the weighted average value of the local time of each attendance device, the accuracy of time calibration is improved, and the data security is improved by carrying out data interaction through the local area network.
Fig. 4 is a schematic structural diagram of a timing device of an attendance device according to an embodiment of the present application, where the timing device is applied to a first attendance device, the first attendance device is any one of a plurality of attendance devices in a local area network, and as shown in fig. 4, the timing device of the attendance device according to this embodiment includes: a calibration instruction sending module 410, a response data obtaining module 420, a calibration time determining module 430 and a time calibration module 440.
The calibration instruction sending module 410 is configured to send a time calibration request to each second attendance device through a local area network, where the second attendance device is another attendance device except the first attendance device among multiple attendance devices in the local area network; a response data obtaining module 420, configured to obtain response data sent by each second attendance device, where the response data of the second attendance device includes a current local time and a current deviation value of the second attendance device; a calibration time determining module 430, configured to determine current calibration time according to the current local time of each attendance device and the current deviation value; and a time calibration module 440, configured to calibrate the current local time of the first attendance device based on the current calibration time, and send the current calibration time to each of the second attendance devices, so as to calibrate the current local time of each of the second attendance devices based on the current calibration time.
Optionally, the calibration time determining module 430 includes:
the weight determining unit is used for determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and the calibration time determining unit is used for determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
Optionally, the weight determining unit includes:
the system comprises a repetition frequency determining subunit, a time counting unit and a time counting unit, wherein the repetition frequency determining subunit is used for determining the repetition frequency of the current local time of each attendance device according to the current local time of each attendance device; and the weight coefficient determining subunit is used for determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device and the current deviation value.
Optionally, the weight coefficient determining subunit is specifically configured to:
and determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device, the current deviation value and a preset relational expression. Wherein, the preset relational expression is as follows:
Figure 729216DEST_PATH_IMAGE001
Figure 20083DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure 750142DEST_PATH_IMAGE003
is composed of
Figure 950179DEST_PATH_IMAGE004
At the first moment
Figure 943543DEST_PATH_IMAGE005
A weight coefficient for each attendance device;
Figure 963451DEST_PATH_IMAGE006
the number of attendance devices;
Figure 497201DEST_PATH_IMAGE007
is a constant coefficient;
Figure 817324DEST_PATH_IMAGE008
is composed of
Figure 512747DEST_PATH_IMAGE004
At the first moment
Figure 285531DEST_PATH_IMAGE005
The number of repetitions of the local time of each attendance device;
Figure 560655DEST_PATH_IMAGE009
is composed of
Figure 971170DEST_PATH_IMAGE004
At the first moment
Figure 103074DEST_PATH_IMAGE005
An offset value of the local time of the respective attendance device.
Optionally, the apparatus further comprises:
and the deviation value updating module is used for determining a new deviation value according to the current calibration time and the current local time of the first attendance device after determining the current calibration time according to the current local time and the current deviation value of each attendance device so as to update the current deviation value of the first attendance device.
Optionally, the apparatus further comprises:
the first data acquisition module is used for acquiring the current local time and the current deviation value of the first attendance equipment after acquiring the response data sent by each second attendance equipment; and the sequencing module is used for sequencing the current local time of each attendance device.
Correspondingly, the calibration time determination module 430 is specifically configured to:
and determining the current calibration time according to the current local time and the current deviation value of each attendance device of which the ranking of the current local time is positioned in a preset interval.
Optionally, the apparatus further comprises:
and the local time saving module is used for saving the current local time of the first attendance device.
The timing device of the attendance device provided by the embodiment of the application can execute the timing method of the attendance device provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of an attendance device according to an embodiment of the present application, and as shown in fig. 5, the attendance device includes: memory 510, processor 520, and computer programs.
Wherein a computer program is stored in the memory 510 and configured to be executed by the processor 520 to implement the timing method of the attendance device provided by any of the embodiments corresponding to fig. 2 to 3 of the present application. The transparent transmission device can be the main equipment or the auxiliary equipment.
Wherein the memory 510 and the processor 520 are connected by a bus 530.
The related description may be understood by referring to the related description and effect corresponding to the steps in fig. 2 to fig. 3, and redundant description is not repeated here.
In some embodiments, the attendance device further comprises a module for employee identification by one or more of a face recognition module, a fingerprint recognition module, a radio frequency identification module, and the like.
In some embodiments, the attendance device further comprises one or more of a display screen, a microphone, a speaker, a headphone interface, a temperature sensor, an ambient light sensor, a battery module, and the like.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the time calibration method for an attendance device provided in any one of the embodiments corresponding to fig. 2 to fig. 3 of the present application.
The computer readable storage medium may be, among others, ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
An embodiment of the present application provides a computer program product, which includes a computer program, where the computer program is executed by a processor of a timing device of an attendance device to control a timing apparatus of the attendance device to implement the timing method of the attendance device provided in any one of the embodiments corresponding to fig. 2 to fig. 3 of the present application.
The processor may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (9)

1. A timing method for an attendance device is applied to a first attendance device, wherein the first attendance device is any one of a plurality of attendance devices in a local area network, and the method comprises the following steps:
sending a time calibration request to each second attendance device through a local area network, wherein the second attendance device is the other attendance device except the first attendance device in a plurality of attendance devices in the local area network;
acquiring response data sent by each second attendance device, wherein the response data of the second attendance device comprises the current local time and the current deviation value of the second attendance device;
determining the current calibration time according to the current local time and the current deviation value of each attendance device;
calibrating the current local time of the first attendance device based on the current calibration time, and sending the current calibration time to each second attendance device so as to calibrate the current local time of each second attendance device based on the current calibration time;
wherein, the determining the current calibration time according to the current local time and the current deviation value of each attendance device includes:
determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
2. The method of claim 1, wherein determining the current weighting factor for each of the attendance devices based on the current offset value for each of the attendance devices comprises:
determining the repetition times of the current local time of each attendance device according to the current local time of each attendance device;
and determining the current weight coefficient of each attendance device according to the current local time repetition times and the current deviation value of each attendance device.
3. The method of claim 2, wherein determining the current weighting factor for each of the attendance devices based on the current local time repetitions for each of the attendance devices and the current offset value comprises:
determining the current weight coefficient of each attendance device according to the repetition times of the current local time of each attendance device, the current deviation value and a preset relational expression;
wherein, the preset relational expression is as follows:
M i (t) = (θ× A i (t)) + P i (t)
Figure 108822DEST_PATH_IMAGE002
wherein the content of the first and second substances,W i (t) Is composed oftAt the first momentiA weight coefficient for each attendance device;nthe number of attendance devices;θis a constant coefficient;A i (t) Is composed oftAt the first momentiThe number of repetitions of the local time of each attendance device;P i (t) Is composed oftAt the first momentiAn offset value of the local time of the respective attendance device.
4. A method according to any one of claims 1-3, characterized in that after determining the current calibration time on the basis of the current local time of the respective attendance device and the current deviation value, the method further comprises:
and determining a new deviation value according to the current calibration time and the current local time of the first attendance device so as to update the current deviation value of the first attendance device.
5. A method according to any of claims 1-3, wherein after acquiring the response data sent by each second attendance device, the method further comprises:
acquiring the current local time and the current deviation value of the first attendance equipment;
sequencing the current local time of each attendance device;
determining the current calibration time according to the current local time and the current deviation value of each attendance device, wherein the method comprises the following steps:
and determining the current calibration time according to the current local time and the current deviation value of each attendance device of which the ranking of the current local time is positioned in a preset interval.
6. The method according to any one of claims 1-3, further comprising:
and saving the current local time of the first attendance device.
7. The timing device of the attendance equipment is characterized in that the timing device is applied to first attendance equipment which is any one of a plurality of attendance equipment in a local area network, and the timing device comprises:
the calibration instruction sending module is used for sending a time calibration request to each second attendance device through a local area network, wherein the second attendance device is the other attendance device except the first attendance device in a plurality of attendance devices in the local area network;
a response data acquisition module, configured to acquire response data sent by each second attendance device, where the response data of the second attendance device includes a current local time and a current deviation value of the second attendance device;
the calibration time determining module is used for determining the current calibration time according to the current local time and the current deviation value of each attendance device;
the time calibration module is used for calibrating the current local time of the first attendance device based on the current calibration time, and sending the current calibration time to each second attendance device so as to calibrate the current local time of each second attendance device based on the current calibration time;
wherein the calibration time determination module comprises: the weight determining unit is used for determining the current weight coefficient of each attendance device according to the current deviation value of each attendance device; and the calibration time determining unit is used for determining the current calibration time according to the current weight coefficient of each attendance device and the current local time of each attendance device.
8. An attendance device, comprising: a memory and at least one processor;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of timing a attendance device as claimed in any of claims 1-6.
9. A computer-readable storage medium, having stored thereon computer-executable instructions, which, when executed by a processor, implement the method of timing attendance at an attendance device as claimed in any one of claims 1 to 6.
CN202111651541.7A 2021-12-31 2021-12-31 Time correction method, device, equipment and storage medium for attendance equipment Active CN114006674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111651541.7A CN114006674B (en) 2021-12-31 2021-12-31 Time correction method, device, equipment and storage medium for attendance equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111651541.7A CN114006674B (en) 2021-12-31 2021-12-31 Time correction method, device, equipment and storage medium for attendance equipment

Publications (2)

Publication Number Publication Date
CN114006674A CN114006674A (en) 2022-02-01
CN114006674B true CN114006674B (en) 2022-04-01

Family

ID=79932329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111651541.7A Active CN114006674B (en) 2021-12-31 2021-12-31 Time correction method, device, equipment and storage medium for attendance equipment

Country Status (1)

Country Link
CN (1) CN114006674B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708673B (en) * 2022-06-07 2022-09-06 深圳市海清视讯科技有限公司 Temperature correction method and device for attendance equipment, attendance equipment and readable storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859616A (en) * 2006-01-20 2006-11-08 华为技术有限公司 Method for correcting terminal device local time and terminal device
US8681896B1 (en) * 2010-05-13 2014-03-25 Qualcomm Incorporated Transmitter I/Q and carrier leak calibration
WO2014116763A1 (en) * 2013-01-25 2014-07-31 Medtronic, Inc. Using high frequency crystal from external module to trim real time clock
CN105187148A (en) * 2015-08-17 2015-12-23 武汉理工大学 ARM-based network clock synchronization system and method
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN107395307A (en) * 2017-07-12 2017-11-24 瑞斯康达科技发展股份有限公司 A kind of clock synchronizing method and equipment
CN111399367A (en) * 2020-03-20 2020-07-10 深圳市帅鸽美羽科技有限公司 Time correction method based on pigeon clock equipment, server and storage medium
CN111865466A (en) * 2020-07-10 2020-10-30 润电能源科学技术有限公司 Time synchronization method and device, timed equipment and storage medium
CN112214065A (en) * 2020-09-17 2021-01-12 北京普源精电科技有限公司 Equipment synchronization calibration method, device, equipment and storage medium
CN113014349A (en) * 2021-03-01 2021-06-22 北京嘀嘀无限科技发展有限公司 Time calibration method, device, electronic equipment, storage medium and program product
CN113365127A (en) * 2021-06-02 2021-09-07 众立智能科技(深圳)有限公司 Local area network multi-screen display synchronization method and device
CN113835336A (en) * 2021-11-24 2021-12-24 国网江苏省电力有限公司营销服务中心 Multi-dimensional self-adaptive metering device patrol and timing method for supporting electric power spot market

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7894488B2 (en) * 2006-04-13 2011-02-22 Cisco Technology, Inc. Apparatus and method for monitoring quality metrics associated with a wireless network
US8805505B1 (en) * 2013-01-25 2014-08-12 Medtronic, Inc. Using telemetry downlink for real time clock calibration
KR20170016438A (en) * 2014-06-03 2017-02-13 엘리먼트, 인크. Attendance authentication and management in connection with mobile devices
US9454751B1 (en) * 2015-03-30 2016-09-27 Api Healthcare Corporation System and method to track time and attendance of an individual at a workplace for a scheduled workshift
CN108269053A (en) * 2017-11-28 2018-07-10 北京讯飞乐知行软件有限公司 A kind of rest method and device
CN110572229B (en) * 2019-09-09 2021-03-26 Oppo广东移动通信有限公司 Time calibration method, device, terminal and storage medium
CN112600637B (en) * 2020-12-03 2023-12-05 深圳思凯微电子有限公司 Wireless broadcast time service calibration method, device and computer readable storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859616A (en) * 2006-01-20 2006-11-08 华为技术有限公司 Method for correcting terminal device local time and terminal device
US8681896B1 (en) * 2010-05-13 2014-03-25 Qualcomm Incorporated Transmitter I/Q and carrier leak calibration
WO2014116763A1 (en) * 2013-01-25 2014-07-31 Medtronic, Inc. Using high frequency crystal from external module to trim real time clock
CN105187148A (en) * 2015-08-17 2015-12-23 武汉理工大学 ARM-based network clock synchronization system and method
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN107395307A (en) * 2017-07-12 2017-11-24 瑞斯康达科技发展股份有限公司 A kind of clock synchronizing method and equipment
CN111399367A (en) * 2020-03-20 2020-07-10 深圳市帅鸽美羽科技有限公司 Time correction method based on pigeon clock equipment, server and storage medium
CN111865466A (en) * 2020-07-10 2020-10-30 润电能源科学技术有限公司 Time synchronization method and device, timed equipment and storage medium
CN112214065A (en) * 2020-09-17 2021-01-12 北京普源精电科技有限公司 Equipment synchronization calibration method, device, equipment and storage medium
CN113014349A (en) * 2021-03-01 2021-06-22 北京嘀嘀无限科技发展有限公司 Time calibration method, device, electronic equipment, storage medium and program product
CN113365127A (en) * 2021-06-02 2021-09-07 众立智能科技(深圳)有限公司 Local area network multi-screen display synchronization method and device
CN113835336A (en) * 2021-11-24 2021-12-24 国网江苏省电力有限公司营销服务中心 Multi-dimensional self-adaptive metering device patrol and timing method for supporting electric power spot market

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Research on time calibration Technical of Satellite Control System";Keqiang xia等;《2021 IEEE 5th information technology,Networking,Electronic and Automation Control Conference (ITNEC)》;20211113;全文 *
"同步局域网设备的时间";程芳等;《网络安全和信息化》;20170605;全文 *

Also Published As

Publication number Publication date
CN114006674A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
US9846632B2 (en) Real-time reporting based on instrumentation of software
US20210191783A1 (en) Data processing method and device
US20190312908A1 (en) Cyber chaff using spatial voting
CN108334774A (en) A kind of method, first server and the second server of detection attack
CN111783142B (en) Data protection method, device, server and medium
CN114006674B (en) Time correction method, device, equipment and storage medium for attendance equipment
US20210357466A1 (en) Recording ledger data on a blockchain
EP4293602A1 (en) Registration and execution methods and apparatuses of timed smart contract in blockchain
US20230327941A1 (en) Alarm processing method and apparatus, device, and readable storage medium
CN112035344A (en) Multi-scenario test method, device, equipment and computer readable storage medium
CN114757639A (en) Data processing method, device, equipment and storage medium
CN114328132A (en) Method, device, equipment and medium for monitoring state of external data source
US11822961B2 (en) Method and apparatus for data processing, server and storage medium
CN111367948B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113194339A (en) Live list generation method and device, electronic equipment and readable storage medium
CN108255704B (en) Abnormal response method of script calling event and terminal thereof
CN117009208A (en) Dependency information processing method, device, equipment and storage medium
CN114760121A (en) Method for controlling access frequency and access frequency control system
CN113590913B (en) Data resource display method and device, storage medium and electronic device
US20230180109A1 (en) Method and apparatus for terminal to access network, internet of things system, and computer program product
CN112637110B (en) Method for detecting password, password detection device and storage medium
US11226882B2 (en) Method and device for data center management
CN112291797B (en) Data processing method and device and electronic equipment
CN110895507B (en) Simulation test method and device, simulation server and storage medium
CN114528809A (en) Method and device for generating dynamic identifier of terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518000 Guangdong Shenzhen Baoan District Xixiang street, Wutong Development Zone, Taihua Indus Industrial Park 8, 3 floor.

Patentee after: Shenzhen Haiqing Zhiyuan Technology Co.,Ltd.

Address before: 518000 Guangdong Shenzhen Baoan District Xixiang street, Wutong Development Zone, Taihua Indus Industrial Park 8, 3 floor.

Patentee before: SHENZHEN HIVT TECHNOLOGY Co.,Ltd.