Attendance method, device, system and electronic equipment based on face recognition
By introducing logical judgment modules and cache modules into the face attendance system, the problem that the terminal card machine cannot record attendance when the server download permission is provided is solved, ensuring the integrity of attendance data and the accuracy of management.
Patent Information
- Application Number
- CN201910322493.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-22
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2039-04-22
AI Technical Summary
When the existing face attendance system downloads attendance permission information on the server, the terminal card machine cannot record attendance normally, resulting in the matching face image failure or data loss, affecting salary accounting and management.
A attendance device based on face recognition is designed, including a trigger module, a logic judgment module, a cache module and a storage module. The logic judgment module determines whether the storage module is used by the server. If used, the face image to be matched will be sent to Cache module caches to avoid data loss and make matching records at the end of server use.
Ensure that the terminal card machine can record attendance normally, avoid the loss of face images to be matched, and ensure the integrity of attendance records and the accuracy of salary accounting.
Smart Images

Figure CN111832363B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of attendance technology, and in particular to an attendance method, device, system and electronic equipment based on face recognition. Background Art
[0002] Attendance refers to obtaining the attendance information of employees or certain groups at a specific place and within a specific time period in some way.
[0003] In the existing face attendance system, in order to obtain the attendance authority information in each terminal card machine, the server needs to download the attendance authority information from the terminal card machine, wherein the attendance authority information refers to the personnel information that the terminal card machine can record attendance, and at least includes the personnel's identification information and the corresponding face image information. When the server downloads the attendance authority information from the terminal card machine, the face image information stored in the terminal card machine is in an unavailable state. If a user performs a clock-in operation at this time, the terminal card machine collects the face image to be matched. Since the face image information stored in the terminal card machine cannot be called, it will not be possible to match the face image to be matched with the stored face image information, so that the attendance corresponding to the face image cannot be recorded normally. Moreover, if other face images to be matched are collected, the data of the face image to be matched previously collected may be lost, which will affect the attendance record, causing the salary accounting to be invalid, and thus bringing difficulties to attendance management. Summary of the invention
[0004] The embodiment of the present invention provides an attendance method, device, system and electronic device based on face recognition, which is used to solve the problem in the prior art that when a server downloads attendance authority information from a terminal card machine, the existing terminal card machine cannot normally record attendance.
[0005] The embodiment of the present invention provides an attendance device based on face recognition, the device comprising: a trigger module, a logic judgment module, a cache module and a storage module;
[0006] The trigger module is used to collect the face image to be matched;
[0007] The logic judgment module is used to judge whether the storage module is currently used by the server, and if not, to notify the trigger module to send the face image to be matched to the storage module; otherwise, to notify the trigger module to send the face image to be matched to the cache module;
[0008] The cache module is used to receive and cache the face image to be matched sent by the trigger module;
[0009] The storage module is used to receive the face image to be matched sent by the trigger module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0010] Further, the storage module is also used to receive an attendance authority download request sent by a server, wherein the attendance authority download request contains attendance authority information to be downloaded; according to the attendance authority information to be downloaded, determine the remaining time of the storage module being used by the server, and send the remaining time information to the logic judgment module;
[0011] The logic judgment module is specifically used to determine whether the storage module is currently used by the server according to the current time, the time when the remaining time information is received, and the remaining time information.
[0012] Furthermore, the storage module is specifically used to determine the remaining time for the storage module to be used by the server according to a preset time interval, the attendance authority information to be downloaded and the attendance authority information that has been downloaded.
[0013] Furthermore, the logic judgment module is also used to determine the end time of the use of the storage module based on the time of the received remaining duration information and the remaining duration information, and to update the last determined end time saved locally.
[0014] Furthermore, the logic judgment module is also used to notify the cache module when the end time of use of the storage module is reached;
[0015] The cache module is further configured to send the face image to be matched to the storage module according to the notification of the logic judgment module;
[0016] The storage module is also used to receive the face image to be matched sent by the cache module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0017] An embodiment of the present invention provides an attendance method based on face recognition, the method comprising:
[0018] When the trigger module collects the face image to be matched, the logic judgment module determines whether the storage module is currently used by the server;
[0019] If not, instruct the trigger module to send the face image to be matched to the storage module, so that the storage module matches the face image to be matched with the pre-stored face image information, and records the attendance information corresponding to the successfully matched target face image;
[0020] Otherwise, the trigger module is notified to send the face image to be matched to the cache module for cache.
[0021] Further, the determining whether the storage module is currently used by the server includes:
[0022] According to the current time, the time when the information of the remaining duration sent by the storage module is received, and the information of the remaining duration, it is determined whether the storage module is currently used by the server, wherein the information of the remaining duration is determined by the storage module according to the attendance authority download request sent by the server received, which includes the attendance authority information to be downloaded.
[0023] Furthermore, the method further comprises:
[0024] According to the received time of the remaining duration information and the remaining duration information, the end time of the use of the storage module is determined; and the last determined end time stored locally is updated.
[0025] Furthermore, the method further comprises:
[0026] When the end time of the use of the storage module is reached, the logic judgment module notifies the cache module, so that the cache module sends the face image to be matched to the storage module according to the notification, and the storage module matches the received face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the successfully matched target face image.
[0027] An embodiment of the present invention provides an electronic device, which includes the above-mentioned attendance device based on face recognition.
[0028] The embodiment of the present invention provides an attendance system based on face recognition, the system comprising: a terminal card machine including an attendance device based on face recognition, and a server using the terminal card machine.
[0029] The embodiment of the present invention provides an attendance method, device, system and electronic device based on face recognition, the device includes: a trigger module, a logic judgment module, a cache module and a storage module; the trigger module is used to collect a face image to be matched; the logic judgment module is used to judge whether the storage module is currently used by a server, if not, to notify the trigger module to send the face image to be matched to the storage module, otherwise, to notify the trigger module to send the face image to be matched to the cache module; the cache module is used to receive the face image to be matched sent by the trigger module and cache it; the storage module is used to receive the face image to be matched sent by the trigger module, match the face image to be matched with the face image information stored in advance, and record the attendance information corresponding to the target face image that is successfully matched. Because in the embodiment of the present invention, when the logic judgment module judges that the storage module is currently used by the server, the face image to be matched is cached by the cache module, avoiding the loss of the face image to be matched, thereby ensuring that the terminal card machine can record attendance normally. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of an attendance device based on face recognition provided in Example 1 of the present invention;
[0032] Figure 2 A schematic diagram of an attendance device based on face recognition provided in Example 4 of the present invention;
[0033] Figure 3 A flowchart of an attendance method based on face recognition provided in Example 5 of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Embodiment 1:
[0036] Figure 1A schematic diagram of the structure of an attendance device based on face recognition provided by an embodiment of the present invention, the device comprises: a trigger module 101, a logic judgment module 102, a cache module 103 and a storage module 104;
[0037] Wherein, the trigger module 101 is used to collect the face image to be matched;
[0038] The logic judgment module 102 is used to judge whether the storage module 104 is currently used by the server, and if not, to notify the trigger module 101 to send the face image to be matched to the storage module 104; otherwise, to notify the trigger module 101 to send the face image to be matched to the cache module 103;
[0039] The cache module 103 is used to receive and cache the face image to be matched sent by the trigger module 101;
[0040] The storage module 104 is used to receive the face image to be matched sent by the trigger module 101, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0041] In the embodiment of the present invention, the terminal card machine further includes a logic judgment module and a cache module compared to the terminal card machine in the prior art.
[0042] The logic judgment module can exchange information with the storage module to learn whether the storage module is currently used by the server, and the logic judgment module is also connected to the trigger module and the cache module. If the server is downloading the data stored in the storage module from the storage module, it can be considered that the storage module is currently used by the server, wherein the data stored in the storage module can be downloaded from any data of the facial image information and the identification information of each user pre-stored in the storage module. The trigger module is used to collect the facial image to be matched. Specifically, an image acquisition device is provided in the trigger module, and the trigger module collects the facial image to be matched through the image acquisition device. When the trigger module collects the facial image to be matched, the trigger module notifies the logic judgment module to determine whether the storage module is currently used by the server. Specifically, the format of the notification information can be preset between the trigger module and the logic judgment module, so that the logic judgment module can determine whether a subsequent judgment is required according to the notification information sent by the trigger module. Specifically, the notification information can be a trigger information.
[0043] Specifically, when the logic judgment module judges whether the storage module is currently used by the server, a possible implementation method is that when the server downloads the attendance authority information from the storage module, the storage module can send a first notification message to the logic judgment module, and the logic judgment module knows that the storage module has started to be used by the server according to the first notification message; when the server completes downloading from the storage module, the storage module can send a second notification message to the logic judgment module, and the logic judgment module knows that the storage module has ended being used by the server according to the second notification message. If the logic judgment module receives the trigger message sent by the trigger module within the time period from the beginning to the end of the storage module being used by the server, it can be determined that the storage module is currently used by the server.
[0044] If the logic judgment module determines that the current storage module is used by the server, the facial image information stored in the storage module is in an unavailable state. At this time, if the facial image to be matched is sent to the storage module, the storage module cannot match the facial image to be matched with the pre-stored facial image information, resulting in unsuccessful matching of the facial image to be matched, and may also cause data loss of the facial image to be matched. Therefore, the logic judgment module notifies the trigger module to send the facial image to be matched to the cache module, and the cache module caches the facial image to be matched; if the current storage module is not used by the server, it means that even if the facial image to be matched is directly sent to the storage module, it will not cause data loss of the facial image to be matched. Therefore, the logic judgment module notifies the trigger module to send the facial image to be matched to the storage module, and the storage module receives the facial image to be matched, and matches the facial image to be matched with the pre-stored facial image information, and records the attendance information corresponding to the successfully matched target facial image, wherein the attendance information contains the identification information of the user corresponding to the target facial image.
[0045] Because in the embodiment of the present invention, when the logic judgment module determines that the storage module is currently used by the server, the cache module caches the face image to be matched, avoiding the loss of the face image to be matched, thereby ensuring that the terminal card machine can record attendance normally.
[0046] Embodiment 2:
[0047] In order to enable the logic judgment module to obtain information about the length of time the storage module is used by the server, based on the above embodiment, in an embodiment of the present invention:
[0048] The storage module is further used to receive an attendance authority download request sent by a server, wherein the attendance authority download request contains attendance authority information to be downloaded; according to the attendance authority information to be downloaded, determine the remaining time for the storage module to be used by the server, and send the remaining time information to the logic judgment module;
[0049] The logic judgment module is specifically used to determine whether the storage module is currently used by the server according to the current time, the time when the remaining time information is received, and the remaining time information.
[0050] The server can download the attendance authority information from the storage module of the terminal card machine, and the downloaded attendance authority information is used for attendance information management of the user. Specifically, when the server downloads the attendance authority information from the storage module of the terminal card machine, the server sends an attendance authority download request to the storage module of the terminal card machine, wherein the attendance authority download request includes the attendance authority information to be downloaded, and specifically the attendance authority information to be downloaded includes the identification information of the user whose attendance authority is to be downloaded.
[0051] Because the image acquisition device contained in the trigger module of each terminal card machine is fixed, the resolution of images that each image acquisition device can capture is determined, or the resolution of facial images that the terminal card machine can capture is within a certain range, and the network bandwidth of the terminal card machine's installation environment is also determined, so the time required for downloading a facial image captured by the terminal card machine between the server and the terminal card machine is also determined.
[0052] Because the attendance authority download request contains the identification information of the user whose attendance authority is to be downloaded, and the download time of a face image is also known, the download time can be estimated based on general circumstances. Specifically, the storage module receives the attendance authority download request, estimates the remaining time used by the server based on the identification information of the user whose attendance authority is to be downloaded, and sends the information of the estimated remaining time to the logic judgment module so that the logic judgment module can know the time the storage module is used by the server.
[0053] When the logic judgment module receives the notification information sent by the trigger module, the logic judgment module estimates the end time of the storage module being used by the server based on the time when the information about the remaining time is received and the remaining time, and determines whether the storage module is currently being used by the server based on whether the time when the notification information is received is before the end time. For example, if the current time is 10:00, i.e., the time when the notification information is received, the time when the information about the remaining time is received is 9:58, and the remaining time is 5 seconds, then the end time of the storage module being used by the server is 10:03. Since 10:00 is before 10:03, it can be determined that the storage module is currently being used by the server. If the time when the notification information is received is 10:04, since 10:04 is after 10:03, it can be determined that the storage module is not currently being used by the server.
[0054] Embodiment 3:
[0055] When the server downloads the facial image information from the storage module of the terminal card machine, due to the influence of factors such as the network, the time for downloading each facial image information may vary, and the remaining time estimated by the storage module may be inaccurate. Therefore, in order to more accurately determine the remaining time of the storage module used by the server, based on the above embodiments, in the embodiment of the present invention:
[0056] The storage module is specifically used to determine the remaining time for the storage module to be used by the server according to the attendance authority information to be downloaded and the attendance authority information that has been downloaded at a preset time interval.
[0057] Because the attendance authority download request contains the identification information of the user whose attendance authority is to be downloaded, and the downloading time of a piece of facial image information is also known, the downloading time can be estimated according to the general situation. Specifically, after receiving the attendance authority download request, the storage module can estimate the remaining time used by the server according to the identification information of the user whose attendance authority is to be downloaded contained in the attendance authority download request, and send the estimated remaining time information to the logic judgment module. When actually downloading multiple pieces of facial image information, due to the influence of various factors such as the network, the time used by the storage module to download a piece of facial image information may change, that is, the remaining time estimated by the storage module may be inaccurate.
[0058] Therefore, in order to more accurately determine whether the storage module is currently being used by the server, the storage module can determine the remaining time the storage module is used by the server according to a preset time interval. Specifically, when determining the remaining time the storage module is used by the server, because the attendance authority download request sent by the server contains the user's identification information, that is, the total number of facial image information that needs to be downloaded can be known, and the storage module can also know the first number of facial image information that has actually been downloaded. Therefore, the second number of facial image information that has not been downloaded can be determined, and the remaining time can be estimated based on the second number and the time to download a piece of facial image information.
[0059] Specifically, the storage module determines the remaining time that the storage module will be used by the server according to the attendance authority information to be downloaded and the attendance authority information that has been downloaded, according to the preset time interval, which can be set to 10 seconds, 20 seconds or 30 seconds, etc. For example, the attendance authority information to be downloaded includes downloading the attendance authority information of 5 users, that is, downloading the facial image information of 5 users, and the attendance authority information that has been downloaded includes the attendance authority information of 3 users, that is, the facial image information of 3 users has been downloaded, then according to the facial image information corresponding to the remaining 2 users, it is determined that the storage module will be used by the server.
[0060] Because the storage module periodically sends information about the remaining duration, in order to more accurately determine whether the storage module is currently used by the server, based on the above embodiments, in an embodiment of the present invention:
[0061] The logic judgment module is also used to determine the end time of the use of the storage module according to the time of the received remaining duration information and the remaining duration information, and to update the last determined end time stored locally.
[0062] Specifically, the logic judgment module can periodically receive the remaining time information sent by the storage module. After receiving the remaining time information each time, the end time of the storage module can be determined according to the current time and the remaining time information. Therefore, the storage module will periodically send the remaining time information. Therefore, after determining the end time each time, the logic judgment module can determine whether the end time is consistent with the last saved end time. If not, the end time determined this time is used to update the last saved end time.
[0063] Because the storage module periodically sends the remaining time information, after the last remaining time information is sent to the logic judgment module, the storage module may not send the notification of the end of the use of the storage module to the logic judgment module, and the logic judgment module can determine whether the use of the storage module has ended based on the locally saved end time. That is to say, if the storage module no longer sends new remaining time information, the logic judgment module can assume that the end time of the use of the storage module is the end time saved locally.
[0064] Embodiment 4:
[0065] When the facial image to be matched is cached in the cache module, in order to further enable normal attendance record of the user corresponding to the facial image to be matched, on the basis of the above embodiments, in the embodiment of the present invention, the logic judgment module is further used to notify the cache module when the end time of the use of the storage module is reached;
[0066] The cache module is further configured to send the face image to be matched to the storage module according to the notification of the logic judgment module;
[0067] The storage module is also used to receive the face image to be matched sent by the cache module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0068] When the storage module is used by the server, if the trigger module collects the face image to be matched, the logic judgment module will notify the trigger module to store the face image to be matched in the cache module. If the face image to be matched is cached in the cache module during the use of the storage module by the server, the attendance of the user corresponding to the face image to be matched is recorded after the storage module is used, thereby avoiding the data loss of the face image to be matched during the use of the storage module.
[0069] Specifically, according to the method for determining the remaining time of the storage module being used by the server provided by the above-mentioned embodiments, after determining the remaining time of the storage module being used by the server, the logic judgment module can determine the end time of the storage module being used by the server based on the remaining time information, and when the end time is reached, the logic judgment module notifies the cache module; the cache module sends the face image to be matched in the cache module to the storage module based on the notification of the logic judgment module; the storage module receives the face image to be matched, matches the face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the target face image that is successfully matched.
[0070] When the storage module is used, the facial images to be matched cached in the cache module may include multiple ones. Specifically, when the facial images to be matched are cached in the cache module, the time when the trigger module receives the facial images to be matched is cached in the cache module. When the cache module sends the cached facial images to be matched to the storage module, it also sends the time when the trigger module receives the facial images to be matched to the storage module, so that the storage module can record the attendance information corresponding to the target facial image according to the time.
[0071] like Figure 2 A schematic diagram of a face recognition-based attendance device provided for an embodiment of the present invention includes a card machine management platform and a terminal card machine, wherein the card machine management platform is a server, and the terminal card machine includes a trigger module, a logic judgment module, a cache module and a storage module.
[0072] The server sends an attendance authority download request to the storage module of the terminal card machine, wherein the attendance authority download request includes attendance authority information to be downloaded, and specifically the attendance authority information to be downloaded includes identification information of the user whose attendance authority is to be downloaded; because the attendance authority download request includes the identification information of the user whose attendance authority is to be downloaded, and the downloading time of a facial image information is also known, the downloading time can be estimated according to general circumstances, specifically, the storage module can estimate the remaining time used by the server according to the identification information of the user whose attendance authority is to be downloaded, and send the information of the remaining time to the logic judgment module, so that the logic judgment module can know the time the storage module is used by the server.
[0073] The logic judgment module receives the remaining time information sent by the storage module, and determines the end time of the storage module according to the time of the received remaining time information and the remaining time information, and updates the last determined end time saved locally.
[0074] When the trigger module collects the face image to be matched, the trigger module can actively give notification information to the logic judgment module. After receiving the notification information, the logic judgment module determines whether the storage module is currently used by the server. If not, the notification trigger module sends the face image to be matched to the storage module. The storage module receives the face image to be matched, matches the face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the target face image that successfully matches; otherwise, the notification trigger module sends the face image to be matched to the cache module, and the cache module caches the face image to be matched. When the end time of the use of the storage module is reached, the logic judgment module notifies the cache module, and the cache module sends the face image to be matched to the storage module. The storage module receives the face image to be matched, matches the face image to be matched with the pre-saved face image information, and records the attendance information of the user corresponding to the target face image that successfully matches. The storage module uploads the recorded user's attendance information to the server, thereby completing the download of attendance authority information, the comparison of face image information, and the closed-loop control process of attendance information transmission.
[0075] Embodiment 5:
[0076] Figure 3 A flowchart of a method for attendance based on face recognition provided by an embodiment of the present invention includes the following steps:
[0077] S301: When the trigger module collects a face image to be matched, the logic judgment module determines whether the storage module is currently used by the server.
[0078] In the embodiment of the present invention, the terminal card machine further includes a logic judgment module and a cache module compared to the terminal card machine in the prior art.
[0079] The logic judgment module can exchange information with the storage module to learn whether the storage module is currently used by the server, and the logic judgment module is also connected to the trigger module and the cache module. Specifically, the trigger module is used to collect the face image to be matched. Specifically, an image acquisition device is provided in the trigger module, and the trigger module collects the face image to be matched through the image acquisition device. When the trigger module collects the face image to be matched, the trigger module notifies the logic judgment module to determine whether the storage module is currently used by the server. Specifically, the format of the notification information can be preset between the trigger module and the logic judgment module, so that the logic judgment module can determine whether a subsequent judgment is required based on the notification information sent by the trigger module. Specifically, the notification information can be a trigger information.
[0080] Specifically, when the logic judgment module judges whether the storage module is currently used by the server, a possible implementation method is that when the server downloads the attendance authority information from the storage module, the storage module can send a first notification message to the logic judgment module, and the logic judgment module knows that the storage module has started to be used by the server according to the first notification message; when the server completes downloading from the storage module, the storage module can send a second notification message to the logic judgment module, and the logic judgment module knows that the storage module has ended being used by the server according to the second notification message. If the logic judgment module receives the trigger message sent by the trigger module within the time period from the beginning to the end of the storage module being used by the server, it can be determined that the storage module is currently used by the server.
[0081] S302: If not, notify the trigger module to send the face image to be matched to the storage module, so that the storage module matches the face image to be matched with the pre-stored face image information, and records the attendance information corresponding to the successfully matched target face image.
[0082] If the current storage module is not used by the server, it means that even if the facial image to be matched is directly sent to the storage module, the data of the facial image to be matched will not be lost. Therefore, the logic judgment module notifies the trigger module to send the facial image to be matched to the storage module. The storage module receives the facial image to be matched and matches the facial image to be matched with the pre-saved facial image information, and records the attendance information corresponding to the successfully matched target facial image.
[0083] S303: Otherwise, instruct the trigger module to send the face image to be matched to the cache module for cache.
[0084] If the logic judgment module determines that the current storage module is used by the server, and the face image stored in the storage module is in an unavailable state, then if the face image to be matched is sent to the storage module, the storage module cannot match the face image to be matched with the pre-stored face image information, resulting in an unsuccessful match of the face image to be matched, and may also cause data loss of the face image to be matched. Therefore, the logic judgment module notifies the trigger module to send the face image to be matched to the cache module, and the cache module caches the face image to be matched.
[0085] Because in the embodiment of the present invention, when the logic judgment module determines that the storage module is currently used by the server, the cache module caches the face image to be matched, avoiding the loss of the face image to be matched, thereby ensuring that the terminal card machine can record attendance normally.
[0086] Embodiment 6:
[0087] In order to enable the logic judgment module to obtain information about the length of time the storage module is used by the server, based on the above embodiments, in an embodiment of the present invention, the step of judging whether the storage module is currently used by the server includes:
[0088] According to the current time, the time when the information of the remaining duration sent by the storage module is received, and the information of the remaining duration, it is determined whether the storage module is currently used by the server, wherein the information of the remaining duration is determined by the storage module according to the attendance authority download request sent by the server received, which includes the attendance authority information to be downloaded.
[0089] The server can download the attendance authority information from the storage module of the terminal card machine, and the downloaded attendance authority information is used for attendance information management of the user. Specifically, when the server downloads the attendance authority information from the storage module of the terminal card machine, the server sends an attendance authority download request to the storage module of the terminal card machine, wherein the attendance authority download request includes the attendance authority information to be downloaded, and specifically the attendance authority information to be downloaded includes the identification information of the user whose attendance authority is to be downloaded.
[0090] Because the image acquisition device contained in the trigger module of each terminal card machine is fixed, the resolution of images that each image acquisition device can capture is determined, or the resolution of facial images that the terminal card machine can capture is within a certain range, and the network bandwidth of the terminal card machine's installation environment is also determined, so the time required for the server and the terminal card machine to download a facial image information captured by the terminal card machine is also determined.
[0091] Because the attendance authority download request contains the identification information of the user whose attendance authority is to be downloaded, and the download time of a facial image information is also known, the download time can be estimated based on general circumstances. Specifically, the storage module receives the attendance authority download request, estimates the remaining time used by the server based on the identification information of the user whose attendance authority is to be downloaded, and sends the information of the estimated remaining time to the logic judgment module so that the logic judgment module can know the time the storage module is used by the server.
[0092] When the logic judgment module receives the notification information sent by the trigger module, the logic judgment module estimates the end time of the storage module being used by the server based on the time when the information about the remaining time is received and the remaining time, and determines whether the storage module is currently being used by the server based on whether the time when the notification information is received is before the end time. For example, if the current time is 10:00, i.e., the time when the notification information is received, the time when the information about the remaining time is received is 9:58, and the remaining time is 5 seconds, then the end time of the storage module being used by the server is 10:03. Since 10:00 is before 10:03, it can be determined that the storage module is currently being used by the server. If the time when the notification information is received is 10:04, since 10:04 is after 10:03, it can be determined that the storage module is not currently being used by the server.
[0093] Because the attendance authority download request contains the identification information of the user whose attendance authority is to be downloaded, and the downloading time of a piece of facial image information is also known, the downloading time can be estimated according to the general situation. Specifically, after receiving the attendance authority download request, the storage module can estimate the remaining time used by the server according to the identification information of the user whose attendance authority is to be downloaded contained in the attendance authority download request, and send the estimated remaining time information to the logic judgment module. When actually downloading multiple pieces of facial image information, due to the influence of various factors such as the network, the time used by the storage module to download a piece of facial image information may change, that is, the remaining time estimated by the storage module may be inaccurate.
[0094] Therefore, in order to more accurately determine whether the storage module is currently being used by the server, the storage module can determine the remaining time the storage module is used by the server according to a preset time interval. Specifically, when determining the remaining time the storage module is used by the server, because the attendance authority download request sent by the server contains the user's identification information, that is, the total number of facial image information that needs to be downloaded can be known, and the storage module can also know the first number of facial image information that has actually been downloaded. Therefore, the second number of facial image information that has not been downloaded can be determined, and the remaining time can be estimated based on the second number and the time to download a piece of facial image information.
[0095] Because the storage module periodically sends information about the remaining duration, in order to more accurately determine whether the storage module is currently used by the server, based on the above embodiments, in an embodiment of the present invention, the method further includes:
[0096] According to the received time of the remaining duration information and the remaining duration information, the end time of the use of the storage module is determined; and the last determined end time stored locally is updated.
[0097] Specifically, the logic judgment module can periodically receive the remaining time information sent by the storage module. After receiving the remaining time information each time, the end time of the storage module can be determined according to the current time and the remaining time information. Therefore, the storage module will periodically send the remaining time information. Therefore, after determining the end time each time, the logic judgment module can determine whether the end time is consistent with the last saved end time. If not, the end time determined this time is used to update the last saved end time.
[0098] Because the storage module periodically sends the remaining time information, after the last remaining time information is sent to the logic judgment module, the storage module may not send the notification of the end of the use of the storage module to the logic judgment module, and the logic judgment module can determine whether the use of the storage module has ended based on the locally saved end time. That is to say, if the storage module no longer sends new remaining time information, the logic judgment module can assume that the end time of the use of the storage module is the end time saved locally.
[0099] When the facial image to be matched is cached in the cache module, in order to further perform normal attendance record on the facial image to be matched, based on the above embodiments, in the embodiment of the present invention, the method further includes:
[0100] When the end time of the use of the storage module is reached, the logic judgment module notifies the cache module, so that the cache module sends the face image to be matched to the storage module according to the notification, and the storage module matches the received face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the successfully matched target face image.
[0101] When the storage module is used by the server, if the trigger module collects the face image to be matched, the logic judgment module will notify the trigger module to store the face image to be matched in the cache module. If the face image to be matched is cached in the cache module during the use of the storage module by the server, the attendance of the face image to be matched is recorded after the storage module is used, thereby avoiding the data loss of the face image to be matched during the use of the storage module.
[0102] Specifically, according to the method for determining the remaining time of the storage module being used by the server provided by the above-mentioned embodiments, after determining the remaining time of the storage module being used by the server, the logic judgment module can determine the end time of the storage module being used by the server based on the remaining time information, and when the end time is reached, the logic judgment module notifies the cache module; the cache module sends the face image to be matched in the cache module to the storage module based on the notification of the logic judgment module; the storage module receives the face image to be matched, matches the face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the target face image that is successfully matched.
[0103] When the storage module is used, the facial images to be matched cached in the cache module may include multiple ones. Specifically, when the facial images to be matched are cached in the cache module, the time when the trigger module receives the facial images to be matched is cached in the cache module. When the cache module sends the cached facial images to be matched to the storage module, it also sends the time when the trigger module receives the facial images to be matched to the storage module, so that the storage module can record the attendance information corresponding to the target facial image according to the time.
[0104] Embodiment 7:
[0105] On the basis of the above embodiments, an embodiment of the present invention further provides an electronic device, which includes the above attendance device based on face recognition.
[0106] The electronic device comprises a trigger module, a logic judgment module, a cache module and a storage module;
[0107] The trigger module is used to collect the face image to be matched;
[0108] The logic judgment module is used to judge whether the storage module is currently used by the server, and if not, to notify the trigger module to send the face image to be matched to the storage module; otherwise, to notify the trigger module to send the face image to be matched to the cache module;
[0109] The cache module is used to receive and cache the face image to be matched sent by the trigger module;
[0110] The storage module is used to receive the face image to be matched sent by the trigger module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0111] Further, the storage module is also used to receive an attendance authority download request sent by a server, wherein the attendance authority download request contains attendance authority information to be downloaded; according to the attendance authority information to be downloaded, determine the remaining time of the storage module being used by the server, and send the remaining time information to the logic judgment module;
[0112] The logic judgment module is specifically used to determine whether the storage module is currently used by the server according to the current time, the time when the remaining time information is received, and the remaining time information.
[0113] Furthermore, the storage module is specifically used to determine the remaining time for the storage module to be used by the server according to a preset time interval, the attendance authority information to be downloaded and the attendance authority information that has been downloaded.
[0114] Furthermore, the logic judgment module is also used to determine the end time of the use of the storage module based on the time of the received remaining duration information and the remaining duration information, and to update the last determined end time saved locally.
[0115] Furthermore, the logic judgment module is also used to notify the cache module when the end time of use of the storage module is reached;
[0116] The cache module is further configured to send the face image to be matched to the storage module according to the notification of the logic judgment module;
[0117] The storage module is also used to receive the face image to be matched sent by the cache module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0118] Embodiment 8:
[0119] On the basis of the above embodiments, an embodiment of the present invention further provides an attendance system based on face recognition, the system comprising: a terminal card machine including the above-mentioned attendance device based on face recognition, and a server using the terminal card machine.
[0120] The terminal card machine includes a trigger module, a logic judgment module, a cache module and a storage module;
[0121] The trigger module is used to collect the face image to be matched;
[0122] The logic judgment module is used to judge whether the storage module is currently used by the server, and if not, to notify the trigger module to send the face image to be matched to the storage module; otherwise, to notify the trigger module to send the face image to be matched to the cache module;
[0123] The cache module is used to receive and cache the face image to be matched sent by the trigger module;
[0124] The storage module is used to receive the face image to be matched sent by the trigger module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0125] Further, the storage module is also used to receive an attendance authority download request sent by a server, wherein the attendance authority download request contains attendance authority information to be downloaded; according to the attendance authority information to be downloaded, determine the remaining time of the storage module being used by the server, and send the remaining time information to the logic judgment module;
[0126] The logic judgment module is specifically used to determine whether the storage module is currently used by the server according to the current time, the time when the remaining time information is received, and the remaining time information.
[0127] Furthermore, the storage module is specifically used to determine the remaining time for the storage module to be used by the server according to a preset time interval, the attendance authority information to be downloaded and the attendance authority information that has been downloaded.
[0128] Furthermore, the logic judgment module is also used to determine the end time of the use of the storage module based on the time of the received remaining duration information and the remaining duration information, and to update the last determined end time saved locally.
[0129] Furthermore, the logic judgment module is also used to notify the cache module when the end time of use of the storage module is reached;
[0130] The cache module is further configured to send the face image to be matched to the storage module according to the notification of the logic judgment module;
[0131] The storage module is also used to receive the face image to be matched sent by the cache module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
[0132] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0135] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0136] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An attendance device based on face recognition, It is characterized in that The device comprises: a trigger module, a logic judgment module, a cache module and a storage module; The trigger module is used to collect the face image to be matched; The logic judgment module is used to judge whether the storage module is currently used by the server, and if not, to notify the trigger module to send the face image to be matched to the storage module; otherwise, to notify the trigger module to send the face image to be matched to the cache module; The cache module is used to receive and cache the face image to be matched sent by the trigger module; The storage module is used to receive the face image to be matched sent by the trigger module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image; Wherein, the storage module is also used to receive an attendance authority download request sent by a server, wherein the attendance authority download request contains attendance authority information to be downloaded; according to the attendance authority information to be downloaded, determine the remaining time for the storage module to be used by the server, and send the remaining time information to the logic judgment module; The logic judgment module is specifically used to determine whether the storage module is currently used by the server according to the current time, the time when the information about the remaining time is received, and the information about the remaining time; Wherein, the storage module is specifically used to determine the remaining time for the storage module to be used by the server according to a preset time interval, the attendance authority information to be downloaded and the attendance authority information that has been downloaded.
2. The device according to claim 1, It is characterized in that The logic judgment module is also used to determine the end time of the use of the storage module according to the time of the received remaining duration information and the remaining duration information, and to update the last determined end time stored locally.
3. The device as claimed in claim 2, It is characterized in that The logic judgment module is further used to notify the cache module when the end time of use of the storage module is reached; The cache module is further used to send the face image to be matched to the storage module according to the notification of the logic judgment module; The storage module is also used to receive the face image to be matched sent by the cache module, match the face image to be matched with the pre-stored face image information, and record the attendance information corresponding to the successfully matched target face image.
4. An attendance method based on face recognition, It is characterized in that The method comprises: When the trigger module collects the face image to be matched, the logic judgment module determines whether the storage module is currently used by the server; If not, instruct the trigger module to send the face image to be matched to the storage module, so that the storage module matches the face image to be matched with the pre-stored face image information, and records the attendance information corresponding to the successfully matched target face image; Otherwise, instruct the trigger module to send the face image to be matched to the cache module for cache; Wherein, the determining whether the storage module is currently used by the server includes: According to the current time, the time when the information of the remaining duration sent by the storage module is received, and the information of the remaining duration, determining whether the storage module is currently used by the server, wherein the information of the remaining duration is determined by the storage module according to the attendance authority download request sent by the server received, including the attendance authority information to be downloaded; The storage module is used to determine the remaining time for the storage module to be used by the server according to a preset time interval, the attendance authority information to be downloaded and the attendance authority information that has been downloaded.
5. The method according to claim 4, It is characterized in that The method further comprises: According to the received time of the remaining duration information and the remaining duration information, the end time of the use of the storage module is determined; and the last determined end time stored locally is updated.
6. The method according to claim 5, It is characterized in that The method further comprises: When the end time of the use of the storage module is reached, the logic judgment module notifies the cache module, so that the cache module sends the face image to be matched to the storage module according to the notification, and the storage module matches the received face image to be matched with the pre-saved face image information, and records the attendance information corresponding to the successfully matched target face image.
7. An electronic device, It is characterized in that It comprises the attendance device based on face recognition as described in any one of claims 1-3.
8. An attendance system based on face recognition, It is characterized in that The system comprises: a terminal card machine of the attendance device based on face recognition as described in any one of claims 1 to 3, and a server using the terminal card machine.
