Automatic management method for enterprise attendance and salary calculation

By performing grayscale projection and LBP feature extraction on employee attendance avatars, quickly identifying the face orientation and calculating similarity, the problems of wasted computing resources and extended attendance time in the prior art are solved, and efficient attendance statistics and salary calculations are achieved.

CN120220207APending Publication Date: 2025-06-27BEIJING BOAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510277201.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, in employee attendance, the need to match similarity of images of employees' different face orientations, resulting in waste of computing resources and extended attendance time.

Method used

By obtaining the avatar in the check-in record, converting it to a grayscale image, horizontal grayscale projection is performed to determine the key areas of the face, extracting LBP features, and calculating the similarity to the image with high similarity in the face sample library to determine the check-in person.

Benefits of technology

It saves computing resources, improves the efficiency of attendance statistics, and provides reliable basis for employee salary calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220207A_ABST
    Figure CN120220207A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise attendance and salary calculation automatic management method, and relates to the technical field of face recognition. The method comprises the following steps: converting a head portrait of a target card punching person into a target gray level image, and then performing horizontal gray level projection on each column of pixel points to obtain a gray level projection curve of each column of pixel points; based on slope distribution corresponding to the gray projection curve, determining a face key area in the target gray image so as to determine the face orientation of the head portrait of the target card punching person; extracting an LBP histogram of each region in the target grayscale image; according to the similarity between the LBP histogram of each region and the LBP histogram of the corresponding region in all target sample gray-scale face images corresponding to the face orientation in a sample library, obtaining the similarity between the target gray-scale image and the target sample gray-scale face image so as to determine a clock-in person corresponding to the clock-in record; and determining the salary of the clock-in personnel in the salary accounting period based on the clock-in record. The method disclosed by the invention can save computing resources and improve attendance statistical efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of face recognition, and particularly relates to an automated management method for enterprise attendance and salary calculation. Background Art

[0002] In enterprise management, it is often necessary to calculate employees' salaries in combination with their attendance data.

[0003] In the prior art, part of the attendance is to collect the facial images of employees entering and leaving the entrance and exit areas through an image acquisition unit, and identify the employees entering and leaving the enterprise based on the facial images of the employees. In this process, employees do not need to actively punch the attendance card, so as to realize the automatic attendance of employees. However, in this process, considering that the employees' faces may be tilted in different directions (such as side faces, looking down, etc.), in order to ensure that the employees entering and leaving the enterprise can be accurately identified, it is necessary to pre-enter the facial images of employees with different facial orientations. When performing facial image recognition, it is necessary to perform similarity matching between the obtained facial image and all the pre-entered images of employees with different facial orientations one by one. In this process, a large amount of computing resources are required, and it takes a long time to perform the attendance of the same employee.

[0004] Therefore, how to provide an effective solution to complete employees' attendance conveniently and quickly has become an urgent problem to be solved in the prior art. Summary of the Invention

[0005] The purpose of the present invention is to provide an automated management method, device, electronic device and product for enterprise attendance and salary calculation, so as to solve the above problems existing in the prior art.

[0006] In order to achieve the above purpose, the present invention adopts the following technical solutions:

[0007] In the first aspect, the present invention provides an automated management method for enterprise attendance and salary calculation, including:

[0008] Obtain the punch records of all punch-in personnel in the previous salary calculation period, and each punch record includes the head portrait of the punch-in personnel;

[0009] For the target punch-in personnel head portrait in any punch record, convert the target punch-in personnel head portrait into a grayscale image to obtain a target grayscale image;

[0010] Perform horizontal grayscale projection on each column of pixel points in the target grayscale image to obtain the grayscale projection curve of each column of pixel points in the target grayscale image. The grayscale projection value corresponding to the mth pixel point in the grayscale projection curve is the sum of the grayscale value of the mth pixel point and the grayscale values of all pixel points before the mth pixel point, where m is a positive integer;

[0011] Determine the facial key areas in the target grayscale image based on the slope distribution corresponding to the grayscale projection curves of the pixel points in each column. The facial key areas include the left eye area, the right eye area, and the mouth area;

[0012] Determine the facial orientation corresponding to the target punching-in personnel's head portrait based on the facial key areas in the target grayscale image;

[0013] Segment the target grayscale image into multiple regions, and extract the LBP features of each region in the target grayscale image to obtain the LBP histograms of each region in the target grayscale image;

[0014] Calculate the similarity between the LBP histogram of each region in the target grayscale image and the LBP histograms of the corresponding regions in all target sample grayscale face images in the face sample library whose corresponding facial orientations are the same as the facial orientation corresponding to the target punching-in personnel's head portrait, to obtain the similarity between the target grayscale image and each target sample grayscale face image;

[0015] Determine the punching-in personnel corresponding to any punching-in record based on the similarity between the target grayscale image and each target sample grayscale face image;

[0016] Determine the salaries of all punching-in personnel in the previous salary calculation period based on the punching-in personnel corresponding to all punching-in records in the previous salary calculation period.

[0017] Based on the above - disclosed content, the present invention obtains the punch - in records of all punch - in personnel in the previous salary calculation period. Each punch - in record includes the head portrait of the punch - in personnel. For the target punch - in personnel head portrait in any punch - in record, the target punch - in personnel head portrait is converted into a grayscale image to obtain a target grayscale image. Horizontal grayscale projection is performed on each column of pixel points in the target grayscale image to obtain the grayscale projection curve of each column of pixel points in the target grayscale image. The grayscale projection value corresponding to the m - th pixel point in the grayscale projection curve is the sum of the grayscale value of the m - th pixel point and the grayscale values of all pixel points before the m - th pixel point, where m is a positive integer. Based on the slope distribution corresponding to the grayscale projection curves of each column of pixel points, the facial key areas in the target grayscale image are determined. The facial key areas include the left - eye area, the right - eye area, and the mouth area. Based on the facial key areas in the target grayscale image, the facial orientation corresponding to the target punch - in personnel head portrait is determined. The target grayscale image is segmented into multiple regions, and the LBP features of each region in the target grayscale image are extracted to obtain the LBP histograms of each region in the target grayscale image. Calculate the similarity between the LBP histograms of each region in the target grayscale image and the LBP histograms of the corresponding regions in all target sample grayscale face images in the face sample library whose facial orientation is the same as the facial orientation corresponding to the target punch - in personnel head portrait, to obtain the similarity between the target grayscale image and each target sample grayscale face image. Based on the similarity between the target grayscale image and each target sample grayscale face image, the punch - in personnel corresponding to any punch - in record is determined. Based on the punch - in personnel corresponding to all punch - in records in the previous salary calculation period, the salaries of all punch - in personnel in the previous salary calculation period are determined. In this way, during attendance, the facial orientation corresponding to the punch - in personnel head portrait can be identified in advance, and based on the facial orientation corresponding to the punch - in personnel head portrait, the similarity between the punch - in personnel head portrait and the sample images with the same facial orientation is calculated, without the need to calculate the similarity one by one with a large number of sample images with other facial orientations, thus saving computing resources and improving the efficiency of attendance statistics, providing a reliable basis for the salary calculation of employees.

[0018] In a possible design, the determining the facial key areas in the target grayscale image based on the slope distribution corresponding to the grayscale projection curves of each column of pixel points includes:

[0019] Calculate the slope of the pixel area corresponding to the i - th to the (i + j)-th pixel points in the grayscale projection curve of each column of pixel points, where the initial value of i is 1 and j is a positive integer;

[0020] Increment i by 1, and recalculate the slope of the pixel area corresponding to the i - th to the (i + k)-th pixel points in the grayscale projection curve of each column of pixel points until i + k = W, where W is the pixel width of the target grayscale image;

[0021] Take the overlapping area of consecutive multiple pixel regions with slopes lower than the preset slope threshold in each column of pixel points as the suspected facial key sub-region;

[0022] Based on the suspected facial key sub-regions in each column of pixel points, determine the facial key region in the target grayscale image.

[0023] In a possible design, the determining the facial key region in the target grayscale image based on the suspected facial key sub-regions in each column of pixel points includes:

[0024] Merge adjacent suspected facial key sub-regions in adjacent columns of pixel points to obtain multiple suspected facial key regions;

[0025] Based on the distribution positions of the multiple suspected facial key regions in the target grayscale image, determine the facial key region in the target grayscale image.

[0026] In a possible design, the extracting the LBP features of each region in the target grayscale image to obtain the LBP histogram of each region in the target grayscale image includes:

[0027] Extract the LBP value corresponding to each pixel point in each region;

[0028] Circularly shift the LBP value corresponding to each pixel point left or right by n - 1 bits to obtain n LBP values corresponding to each pixel point, where n is the length of the LBP value corresponding to each pixel point;

[0029] Select the LBP value with the smallest corresponding numerical value from the n LBP values corresponding to each pixel point as the final LBP value corresponding to each pixel point;

[0030] Based on the final LBP values corresponding to each pixel point in each region of the target grayscale image, determine the LBP histogram of each region in the target grayscale image.

[0031] In a possible design, the calculating the similarity between the LBP histogram of each region in the target grayscale image and the LBP histograms of the corresponding regions in all target sample grayscale face images in the face sample library with the same facial orientation as the target punching person's avatar includes:

[0032] Calculate the similarity between the LBP histogram of each region in the target grayscale image and the LBP histograms of the corresponding regions in all target sample grayscale face images in the face sample library with the same facial orientation as the target punching person's avatar through a weighted algorithm.

[0033] In a possible design, the similarity between the target grayscale image and each target sample grayscale face image is where K represents the total number of regions corresponding to the target grayscale image, and S k represents the LBP histogram of the k-th region in the target grayscale image, and M k represents the LBP histogram of the k-th region in the target sample grayscale face image, and ω k represents the weight.

[0034] In a possible design, determining the punch-in person corresponding to any punch-in record based on the similarity between the target grayscale image and each target sample grayscale face image includes:

[0035] Taking the punch-in person corresponding to the target sample grayscale face image with the highest similarity to the target grayscale image and with a similarity higher than a preset similarity threshold as the punch-in person corresponding to any punch-in record.

[0036] In a second aspect, the present invention provides an automated management device for enterprise attendance and salary calculation, including:

[0037] An acquisition unit, configured to acquire punch-in records of all punch-in persons in the previous salary calculation period, and each punch-in record includes a punch-in person's avatar;

[0038] A conversion unit, configured to convert the target punch-in person's avatar in any punch-in record into a grayscale image to obtain a target grayscale image;

[0039] A horizontal grayscale projection unit, configured to perform horizontal grayscale projection on each column of pixel points in the target grayscale image to obtain a grayscale projection curve of each column of pixel points in the target grayscale image, and the grayscale projection value corresponding to the m-th pixel point in the grayscale projection curve is the sum of the grayscale value of the m-th pixel point and the grayscale values of all pixel points before the m-th pixel point, where m is a positive integer;

[0040] A first determination unit, configured to determine a facial key region in the target grayscale image based on the slope distribution corresponding to the grayscale projection curves of each column of pixel points, and the facial key region includes a left eye region, a right eye region, and a mouth region;

[0041] A second determination unit, configured to determine the facial orientation corresponding to the target punch-in person's avatar based on the facial key region in the target grayscale image;

[0042] A segmentation and extraction unit, configured to segment the target grayscale image into multiple regions and extract LBP features of each region in the target grayscale image to obtain LBP histograms of each region in the target grayscale image;

[0043] A calculation unit, configured to calculate the LBP histograms of regions in the target grayscale image, and obtain the similarity between the target grayscale image and each target sample grayscale face image by calculating the similarity between the LBP histograms of corresponding regions in all target sample grayscale face images in the face sample library that have the same facial orientation as the facial orientation corresponding to the target punch-in personnel's avatar;

[0044] A third determination unit, configured to determine the punch-in personnel corresponding to any punch-in record based on the similarity between the target grayscale image and each target sample grayscale face image;

[0045] A fourth determination unit, configured to determine the salaries of all punch-in personnel in the previous salary calculation period based on the punch-in personnel corresponding to all punch-in records in the previous salary calculation period.

[0046] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a transceiver that are communicatively connected in sequence. Among them, the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the enterprise attendance and salary calculation automated management method as described in the first aspect or any possible design of the first aspect.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium, on which instructions are stored. When the instructions are run on a computer, the enterprise attendance and salary calculation automated management method as described in the first aspect or any possible design of the first aspect is executed.

[0048] In a fifth aspect, the present invention provides a computer program product containing instructions. When the instructions are run on a computer, the computer is made to execute the enterprise attendance and salary calculation automated management method as described in the first aspect or any possible design of the first aspect.

[0049] Advantageous effects:

[0050] The enterprise attendance and salary calculation automated management method, device, electronic device, and product provided by the present invention can identify in advance the facial orientation corresponding to the punch-in personnel's avatar during attendance, and calculate the similarity between the punch-in personnel's avatar and the sample images with the same facial orientation based on the facial orientation corresponding to the punch-in personnel's avatar, without having to calculate the similarity with a large number of sample images with other facial orientations one by one, thereby saving computing resources, improving the efficiency of attendance statistics, providing a reliable basis for the salary calculation of employees, and facilitating practical application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flowchart of the enterprise attendance and salary calculation automated management method provided by an embodiment of the present application;

[0052] Figure 2 It is a block diagram schematic diagram of the enterprise attendance and salary calculation automation management device provided by the embodiments of the present application;

[0053] Figure 3 It is a block diagram schematic diagram of the electronic device provided by the embodiments of the present application. Detailed implementation manners

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the present invention in combination with the drawings and the descriptions of the embodiments or the prior art. Obviously, the following descriptions of the structures of the drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. It should be noted here that the descriptions of these embodiments are used to help understand the present invention, but do not constitute a limitation to the present invention.

[0055] It should be understood that although terms such as first and second may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, the first unit can be called the second unit, and similarly, the second unit can be called the first unit, without departing from the scope of the exemplary embodiments of the present invention.

[0056] It should be understood that for the term "and / or" that may appear in this article, it is only a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, B exists alone, and A and B exist simultaneously; for the term " / and" that may appear in this article, it is a description of another association object relationship, indicating that two relationships can exist. For example, A / and B can represent: A exists alone, and A and B exist alone; in addition, for the character " / " that may appear in this article, generally it represents that the front and back associated objects are an "or" relationship.

[0057] In order to improve the efficiency of attendance statistics, the embodiments of the present application provide an enterprise attendance and salary calculation automation management method, device, electronic device and product. The enterprise attendance and salary calculation automation management method, device, electronic device and product can save computing resources and improve the efficiency of attendance statistics.

[0058] The enterprise attendance and salary calculation automation management method provided by the embodiments of the present application can be applied to terminal devices for employee attendance and salary calculation. It can be understood that the execution subject does not constitute a limitation to the embodiments of the present application.

[0059] The enterprise attendance and salary calculation automated management method provided by the embodiments of the present application will be described in detail below.

[0060] As Figure 1 shown, it is a flowchart of the enterprise attendance and salary calculation automated management method provided by the first aspect of the embodiments of the present application. The enterprise attendance and salary calculation automated management method may but is not limited to include the following steps S101 - S109.

[0061] Step S101. Obtain the punch - in records of all punch - in personnel within the previous salary calculation period. Each punch - in record includes the head portrait of the punch - in personnel.

[0062] In the embodiments of the present application, when an employee punches in or enters and exits the enterprise, the head portrait of the punch - in personnel can be obtained through an image acquisition unit, and a punch - in record is generated based on the head portrait of the punch - in personnel.

[0063] When calculating the salary of employees within the previous salary calculation period, the punch - in records of all punch - in personnel within the previous salary calculation period can be obtained. Each punch - in record includes the head portrait of the punch - in personnel.

[0064] Step S102. For the target punch - in personnel head portrait in any punch - in record, convert the target punch - in personnel head portrait into a grayscale image to obtain a target grayscale image.

[0065] The principle of converting the grayscale image is not elaborated in the embodiments of the present application.

[0066] Step S103. Perform horizontal grayscale projection on each column of pixel points in the target grayscale image to obtain the grayscale projection curve of each column of pixel points in the target grayscale image.

[0067] Among them, the grayscale projection value corresponding to the m - th pixel point in the grayscale projection curve is the sum of the grayscale value of the m - th pixel point and the grayscale values of all pixel points before the m - th pixel point, where m is a positive integer.

[0068] In the embodiments of the present application, each column of pixel points in the target grayscale image can be horizontally projected in the horizontal direction. During the horizontal grayscale projection, the grayscale projection value of each pixel point is the sum of the grayscale value of this pixel point and the grayscale values of all pixel points before it (i.e., to its left), obtaining the grayscale projection values corresponding to each pixel point, and then the grayscale projection curve of this column of pixel points is drawn based on the grayscale projection values corresponding to each pixel point.

[0069] For example, if the grayscale value of the first pixel in a certain column of pixels is 10, the grayscale value of the second pixel is 15, and the grayscale value of the third pixel is 20, then after horizontally projecting the grayscale of this column of pixels in the horizontal direction, the grayscale projection value corresponding to the first pixel is 10, the grayscale projection value corresponding to the second pixel is 10 + 15 = 25, and the grayscale projection value corresponding to the third pixel is 10 + 15 + 20 = 45. By analogy, the grayscale projection values corresponding to each pixel in this column of pixels can be obtained.

[0070] Step S104. Based on the slope distribution corresponding to the grayscale projection curves of each column of pixels, determine the facial key regions in the target grayscale image.

[0071] Among them, the facial key regions include the left eye region, the right eye region, and the mouth region.

[0072] Specifically, based on the slope distribution corresponding to the grayscale projection curves of each column of pixels, determining the facial key regions in the target grayscale image may include, but is not limited to, the following steps S1041 - S1044.

[0073] Step S1041. Calculate the slope of the pixel region corresponding to the i-th to the (i + j)-th pixels in the grayscale projection curve of each column of pixels.

[0074] Where the initial value of i is 1, j is a positive integer, and the value of j can be set according to the actual situation.

[0075] Step S1042. Increment i by 1 and recalculate the slope of the pixel region corresponding to the i-th to the (i + k)-th pixels in the grayscale projection curve of each column of pixels until i + k = W, where W is the pixel width of the target grayscale image.

[0076] For example, if the value of j is 4, then at the beginning, calculate the slope of the pixel region corresponding to the 1st to the 5th pixels in the grayscale projection curve of each column of pixels, increment i by 1 and calculate the slope of the pixel region corresponding to the 2nd to the 6th pixels in the grayscale projection curve of each column of pixels, then increment i by 1 again and calculate the slope of the pixel region corresponding to the 3rd to the 7th pixels in the grayscale projection curve of each column of pixels, and so on until i + k = W to stop the calculation.

[0077] Step S1043. Take the overlapping region of multiple consecutive pixel regions with slopes lower than the preset slope threshold in each column of pixels as the suspected facial key sub-regions.

[0078] After converting the head portrait of the person to be clocked in into a grayscale image, the difference in light reflection in the eye area and mouth area in the obtained target grayscale image due to concave or protruding structures will result in lower grayscale values in the eye area and mouth area of the grayscale image, that is, the grayscale values are closer to 0. Based on this principle, the overlapping area of multiple consecutive pixel regions with a slope lower than a preset slope threshold in each column of pixel points can be determined as a suspected facial key sub-region, that is, the overlapping area of multiple consecutive pixel regions with a slope lower than the preset slope threshold may correspond to key regions such as eyes and mouth. Among them, the preset slope threshold can be set according to actual experience.

[0079] Step S1044. Based on the suspected facial key sub-regions in each column of pixel points, determine the facial key regions in the target grayscale image.

[0080] Specifically, the adjacent suspected facial key sub-regions in adjacent columns of pixel points can be merged to obtain multiple suspected facial key regions. Then, based on the distribution positions of the multiple suspected facial key regions in the target grayscale image, determine the facial key regions in the target grayscale image.

[0081] In one or more embodiments, when determining the facial key regions in the target grayscale image based on the distribution positions of the multiple suspected facial key regions in the target grayscale image, the sizes of the multiple suspected facial key regions can also be considered, that is, the suspected facial key regions with sizes less than or equal to a preset size are excluded, and only the distribution positions of the suspected facial key regions with sizes greater than the preset size in the target grayscale image are considered.

[0082] Step S105. Based on the facial key regions in the target grayscale image, determine the facial orientation corresponding to the target head portrait of the person to be clocked in.

[0083] Specifically, the facial orientation corresponding to the target head portrait of the person to be clocked in can be determined according to the position of the facial key regions in the target grayscale image. For example, if the left eye region and the right eye region are roughly symmetrically distributed in the target grayscale image, it can be determined that the facial orientation corresponding to the target head portrait of the person to be clocked in is the front-facing the image acquisition unit.

[0084] Step S106. Divide the target grayscale image into multiple regions, and extract the LBP features of each region in the target grayscale image to obtain the LBP histogram of each region in the target grayscale image.

[0085] When dividing the target grayscale image into multiple regions, the target grayscale image can be divided into regions such as 3×3 or 4×4, and the sizes of the multiple regions can be the same or different.

[0086] After the target grayscale image is segmented into multiple regions, the LBP values corresponding to each pixel point in each region can be extracted. Then, the LBP value corresponding to each pixel point is circularly shifted left or right by n - 1 bits to obtain n LBP values corresponding to each pixel point. Then, an LBP value with the smallest corresponding value is selected from the n LBP values corresponding to each pixel point as the final LBP value corresponding to each pixel point. Based on the final LBP values corresponding to each pixel point in each region of the target grayscale image, the LBP histogram of each region in the target grayscale image is determined. Here, n is the length of the LBP value corresponding to each pixel point.

[0087] For example, if the LBP value corresponding to a certain pixel point is extracted as 10001011 and the length of the LBP value corresponding to this pixel point is 8 bits, it can be circularly shifted to the right by 7 bits. Each time it is circularly shifted to the right by 1 bit, a new LBP value can be obtained. Thus, 7 new LBP values, namely 11000101, 11100010, 01110001, 10111000, 01011100, 00101110, and 00010111, can be obtained in sequence. Adding the original LBP value 10001011 corresponding to this pixel point, 8 LBP values corresponding to this pixel point can be obtained. Then, an LBP value 00010111 with the smallest corresponding value is selected as the final LBP value corresponding to this pixel point. In this way, the LBP values corresponding to each pixel point can have rotational invariance, overcoming the defect of the rotational variability of the LBP operator, so as to improve the accuracy of subsequent image recognition.

[0088] Step S107. Calculate the similarity between the LBP histogram of each region in the target grayscale image and the LBP histogram of the corresponding region in all target sample grayscale face images in the face sample library whose corresponding face orientations are the same as the face orientation corresponding to the target punching-in personnel's head image, to obtain the similarity between the target grayscale image and each target sample grayscale face image.

[0089] In the embodiment of the present application, face images of all employees with different face orientations can be pre-recorded as sample face images, and the sample face images are converted into grayscale images to obtain sample grayscale face images.

[0090] After obtaining the LBP histogram of each region in the target grayscale image, the similarity between the LBP histogram of each region in the target grayscale image and the LBP histogram of the corresponding region in all target sample grayscale face images in the face sample library whose corresponding face orientations are the same as the face orientation corresponding to the target punching-in personnel's head image can be calculated through a weighting algorithm, to obtain the similarity between the target grayscale image and each target sample grayscale face image.

[0091] The similarity between the target grayscale image and each target sample grayscale face image can be expressed as Where K represents the total number of regions corresponding to the target grayscale image, and S k represents the LBP histogram of the k-th region in the target grayscale image, and M k represents the LBP histogram of the k-th region in the target sample grayscale face image, and ω k represents the weight.

[0092] Step S108. Based on the similarity between the target grayscale image and each target sample grayscale face image, determine the person corresponding to any punch-in record.

[0093] Specifically, the person corresponding to the target sample grayscale face image with the highest similarity to the target grayscale image and with a similarity higher than the preset similarity threshold can be used as the person corresponding to any punch-in record. Herein, the preset similarity threshold can be set according to the actual situation.

[0094] Step S109. Based on the persons corresponding to all punch-in records in the previous salary calculation period, determine the salaries of all punch-in persons in the previous salary calculation period.

[0095] In summary, the automated management method for enterprise attendance and salary calculation provided by the present invention obtains the punch records of all punch-in personnel in the previous salary calculation cycle, and each punch record includes the head portrait of the punch-in personnel; for the target punch-in personnel head portrait in any punch record, the target punch-in personnel head portrait is converted into a grayscale image to obtain a target grayscale image; horizontal grayscale projection is performed on each column of pixel points in the target grayscale image to obtain the grayscale projection curve of each column of pixel points in the target grayscale image. The grayscale projection value corresponding to the m-th pixel point in the grayscale projection curve is the sum of the grayscale value of the m-th pixel point and the grayscale values of all pixel points before the m-th pixel point, where m is a positive integer; based on the slope distribution corresponding to the grayscale projection curves of each column of pixel points, the facial key area in the target grayscale image is determined, and the facial key area includes the left eye area, the right eye area, and the mouth area; based on the facial key area in the target grayscale image, the facial orientation corresponding to the target punch-in personnel head portrait is determined; the target grayscale image is segmented into multiple regions, and the LBP features of each region in the target grayscale image are extracted to obtain the LBP histogram of each region in the target grayscale image; the LBP histogram of each region in the target grayscale image is calculated, and the similarity between the LBP histogram of each region in the target grayscale image and the LBP histogram of the corresponding region in all target sample grayscale face images in the face sample library with the same facial orientation as the target punch-in personnel head portrait is obtained, and the similarity between the target grayscale image and each target sample grayscale face image is obtained; based on the similarity between the target grayscale image and each target sample grayscale face image, the punch-in personnel corresponding to any punch record is determined; based on the punch-in personnel corresponding to all punch records in the previous salary calculation cycle, the salaries of all punch-in personnel in the previous salary calculation cycle are determined. In this way, during attendance, the facial orientation corresponding to the punch-in personnel head portrait can be identified in advance, and based on the facial orientation corresponding to the punch-in personnel head portrait, the similarity between the punch-in personnel head portrait and the sample image with the same facial orientation is calculated, without the need to calculate the similarity with a large number of sample images with other facial orientations one by one, thereby saving computing resources, improving the efficiency of attendance statistics, providing a reliable basis for the salary calculation of employees, and facilitating practical application and promotion

[0096] Please refer to Figure 2 , the second aspect of the embodiment of the present application provides an automated management device for enterprise attendance and salary calculation, and the automated management device for enterprise attendance and salary calculation includes:

[0097] An acquisition unit, configured to acquire the punch records of all punch-in personnel in the previous salary calculation cycle, and each punch record includes the head portrait of the punch-in personnel;

[0098] A conversion unit, configured to convert the target punch-in personnel head portrait in any punch record into a grayscale image to obtain a target grayscale image;

[0099] A horizontal grayscale projection unit for performing horizontal grayscale projection on each column of pixel points in the target grayscale image to obtain a grayscale projection curve of each column of pixel points in the target grayscale image, where the grayscale projection value corresponding to the m-th pixel point in the grayscale projection curve is the sum of the grayscale value of the m-th pixel point and the grayscale values of all pixel points before the m-th pixel point, where m is a positive integer;

[0100] A first determination unit for determining a facial key area in the target grayscale image based on the slope distribution corresponding to the grayscale projection curves of each column of pixel points, where the facial key area includes a left eye area, a right eye area, and a mouth area;

[0101] A second determination unit for determining the facial orientation corresponding to the target punching-in personnel's avatar based on the facial key area in the target grayscale image;

[0102] A segmentation and extraction unit for segmenting the target grayscale image into multiple regions and extracting the LBP features of each region in the target grayscale image to obtain the LBP histograms of each region in the target grayscale image;

[0103] A calculation unit for calculating the similarity between the LBP histogram of each region in the target grayscale image and the LBP histograms of the corresponding regions in all target sample grayscale face images in the face sample library whose corresponding facial orientations are the same as the facial orientation corresponding to the target punching-in personnel's avatar, to obtain the similarity between the target grayscale image and each target sample grayscale face image;

[0104] A third determination unit for determining the punching-in personnel corresponding to any punching-in record based on the similarity between the target grayscale image and each target sample grayscale face image;

[0105] A fourth determination unit for determining the salaries of all punching-in personnel in the previous salary calculation period based on the punching-in personnel corresponding to all punching-in records in the previous salary calculation period.

[0106] For the working process, working details, and technical effects of the enterprise attendance and salary calculation automation management device provided in the second aspect of this embodiment, reference can be made to the first aspect of the embodiment, and details will not be repeated here.

[0107] As Figure 3 shown, a third aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a transceiver that are communicatively connected in sequence. Among them, the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the enterprise attendance and salary calculation automation management method as described in the first aspect of the embodiment.

[0108] Specifically, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in first-out memory (FIFO), and / or last-in first-out memory (FILO), etc.; the processor may not be limited to using a microprocessor of the STM32F105 series, a processor of architectures such as ARM (Advanced RISC Machines), X86, or a processor integrated with an NPU (neural-network processing units); the transceiver may include, but is not limited to, a WiFi (Wireless Fidelity) wireless transceiver, a Bluetooth wireless transceiver, a General Packet Radio Service (GPRS) wireless transceiver, a ZigBee (a low-power local area network protocol based on the IEEE 802.15.4 standard) wireless transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver, etc.

[0109] In the fourth aspect of this embodiment, a computer-readable storage medium storing instructions for implementing the enterprise attendance and salary calculation automated management method described in the first aspect of the embodiment is provided, that is, instructions are stored on the computer-readable storage medium, and when the instructions run on a computer, they execute the enterprise attendance and salary calculation automated management method described in the first aspect. Among them, the computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, floppy disks, optical discs, hard disks, flash memories, USB flash drives, and / or Memory Sticks, etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0110] In the fifth aspect of this embodiment, a computer program product containing instructions is provided, and when the instructions run on a computer, the computer is caused to execute the enterprise attendance and salary calculation automated management method described in the first aspect of the embodiment. Among them, the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0111] It should be understood that specific details are provided in the following description to facilitate a complete understanding of the example embodiments. However, those of ordinary skill in the art should understand that the example embodiments can be implemented without these specific details. For example, a system may be shown in a block diagram to avoid obscuring the example with unnecessary details. In other instances, well-known processes, structures, and technologies may not be shown with unnecessary details to avoid obscuring the example embodiments.

[0112] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for automated management of enterprise attendance and salary calculation, characterized in that: include: Get the clock-in records of all clock-in personnel in the previous salary accounting period. Each clock-in record includes the head portrait of the clock-in personnel. For a head portrait of a target clocking-in person in any clocking-in record, convert the head portrait of the target clocking-in person into a grayscale image to obtain a target grayscale image; Performing horizontal grayscale projection on each column of pixels in the target grayscale image to obtain a grayscale projection curve of each column of pixels in the target grayscale image, wherein the grayscale projection value corresponding to the m-th pixel in the grayscale projection curve is the sum of the grayscale value of the m-th pixel and the grayscale values ​​of all pixels before the m-th pixel, where m is a positive integer; Based on the slope distribution corresponding to the grayscale projection curve of each column of pixel points, determining the key facial areas in the target grayscale image, wherein the key facial areas include a left eye area, a right eye area, and a mouth area; Determining the facial orientation corresponding to the head portrait of the target clocking-in person based on the facial key area in the target grayscale image; The target grayscale image is divided into a plurality of regions, and the LBP features of each region in the target grayscale image are extracted to obtain the LBP histogram of each region in the target grayscale image; Calculate the similarity of the LBP histogram of each area in the target grayscale image with the LBP histogram of the corresponding area in all target sample grayscale face images in the face sample library whose corresponding facial orientation is the same as the facial orientation corresponding to the head portrait of the target punching person, and obtain the similarity between the target grayscale image and each target sample grayscale face image; Based on the similarity between the target grayscale image and each target sample grayscale face image, determining the punch-in person corresponding to the arbitrary punch-in record; Based on the punch-in personnel corresponding to all punch-in records in the previous salary accounting cycle, the wages of all punch-in personnel in the previous salary accounting cycle are determined.

2. The enterprise attendance and salary calculation automation management method according to claim 1 is characterized in that: The step of determining the facial key area in the target grayscale image based on the slope distribution corresponding to the grayscale projection curve of each column of pixels includes: Calculate the slope of the pixel area corresponding to the i-th to i+j-th pixel points in the grayscale projection curve of each column of pixel points, where the initial value of i is 1 and j is a positive integer; Add 1 to i and recalculate the slope of the pixel area corresponding to the i-th to i+k-th pixel points in the grayscale projection curve of each column of pixels until i+k=W, where W is the pixel width of the target grayscale image; The overlapping area of ​​multiple consecutive pixel areas whose slopes in each column of pixels are lower than a preset slope threshold is taken as a suspected facial key sub-area; Based on the suspected key facial sub-regions in each column of pixels, the key facial regions in the target grayscale image are determined.

3. The enterprise attendance and salary calculation automation management method according to claim 2 is characterized in that: The determining of the facial key area in the target grayscale image based on the suspected facial key sub-area in each column of pixels includes: Merging adjacent suspected facial key sub-regions in adjacent columns of pixels to obtain multiple suspected facial key regions; Based on the distribution positions of the multiple suspected facial key areas in the target grayscale image, the facial key areas in the target grayscale image are determined.

4. The enterprise attendance and salary calculation automation management method according to claim 1 is characterized in that: The extracting LBP features of each region in the target grayscale image to obtain the LBP histogram of each region in the target grayscale image includes: Extract the LBP value corresponding to each pixel in each area; The LBP value corresponding to each pixel is circularly shifted left or right by n-1 bits to obtain n LBP values ​​corresponding to each pixel, where n is the length of the LBP value corresponding to each pixel; Select an LBP value with the smallest corresponding value from the n LBP values ​​corresponding to each pixel as the final LBP value corresponding to each pixel; Based on the final LBP value corresponding to each pixel point in each area of ​​the target grayscale image, the LBP histogram of each area in the target grayscale image is determined.

5. The enterprise attendance and salary calculation automation management method according to claim 1 is characterized in that: The calculating of the similarity of the LBP histogram of each area in the target grayscale image and the LBP histogram of the corresponding area in all target sample grayscale face images in the face sample library whose corresponding face orientation is the same as the face orientation corresponding to the head portrait of the target punching person includes: The LBP histogram of each area in the target grayscale image is calculated by a weighted algorithm, and the similarity with the LBP histogram of the corresponding area in all target sample grayscale face images in the face sample library whose corresponding facial orientation is the same as the facial orientation corresponding to the target punching person's head portrait is obtained.

6. The enterprise attendance and salary calculation automation management method according to claim 5 is characterized in that: The similarity between the target grayscale image and each target sample grayscale face image is Where K represents the total number of regions corresponding to the target grayscale image, S k represents the LBP histogram of the kth region in the target grayscale image, M k represents the LBP histogram of the kth region in the target sample grayscale face image, ω k Represents weight.

7. The enterprise attendance and salary calculation automation management method according to claim 1 is characterized in that: The step of determining the punch-in person corresponding to any punch-in record based on the similarity between the target grayscale image and each target sample grayscale face image comprises: The check-in person corresponding to the target sample grayscale face image having the highest similarity to the target grayscale image and a similarity higher than a preset similarity threshold is used as the check-in person corresponding to the arbitrary check-in record.

8. An enterprise attendance and salary calculation automatic management device, characterized in that: include: The acquisition unit is used to obtain the clock-in records of all clock-in personnel in the previous salary accounting cycle. Each clock-in record includes a headshot of the clock-in personnel. A conversion unit, for converting a head portrait of a target clocking-in person in any clocking-in record into a grayscale image to obtain a target grayscale image; a horizontal grayscale projection unit, configured to perform horizontal grayscale projection on each column of pixels in the target grayscale image to obtain a grayscale projection curve of each column of pixels in the target grayscale image, wherein the grayscale projection value corresponding to the m-th pixel in the grayscale projection curve is the sum of the grayscale value of the m-th pixel and the grayscale values ​​of all pixels before the m-th pixel, wherein m is a positive integer; A first determining unit is used to determine the key facial areas in the target grayscale image based on the slope distribution corresponding to the grayscale projection curve of each column of pixel points, wherein the key facial areas include a left eye area, a right eye area, and a mouth area; A second determination unit is used to determine the facial orientation corresponding to the head portrait of the target clocking-in person based on the facial key area in the target grayscale image; A segmentation and extraction unit, used for segmenting the target grayscale image into a plurality of regions, and extracting the LBP features of each region in the target grayscale image to obtain an LBP histogram of each region in the target grayscale image; A calculation unit is used to calculate the LBP histogram of each area in the target grayscale image and the similarity of the LBP histogram of the corresponding area in all target sample grayscale face images in the face sample library whose corresponding facial orientation is the same as the facial orientation corresponding to the head portrait of the target punching person, so as to obtain the similarity between the target grayscale image and each target sample grayscale face image; A third determination unit, configured to determine the punch-in person corresponding to the arbitrary punch-in record based on the similarity between the target grayscale image and each target sample grayscale face image; The fourth determining unit is used to determine the wages of all punching personnel in the previous salary accounting period based on the punching personnel corresponding to all punching records in the previous salary accounting period.

9. An electronic device, characterized in that: It comprises a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the enterprise attendance and salary calculation automation management method as described in any one of claims 1 to 7.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or the instruction is executed by a computer, the method for automated management of enterprise attendance and salary calculation as claimed in any one of claims 1 to 7 is implemented.